[Pkg-mozext-commits] [compactheader] 143/441: New version 1.1.6beta1: Flat buttons in customization dialog.
David Prévot
taffit at moszumanska.debian.org
Wed Mar 18 12:28:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository compactheader.
commit b488385533ae077081e9cb8f1dad493d45788858
Author: joachim.herb <none at none>
Date: Sat Feb 6 13:35:18 2010 +0000
New version 1.1.6beta1:
Flat buttons in customization dialog.
---
.../CompactHeader/content/compactHeaderOverlay.js | 59 ++++++++++++++++++++++
chrome/CompactHeader/skin/mac/osdef.css | 14 ++---
2 files changed, 66 insertions(+), 7 deletions(-)
diff --git a/chrome/CompactHeader/content/compactHeaderOverlay.js b/chrome/CompactHeader/content/compactHeaderOverlay.js
index 43573cd..d800116 100644
--- a/chrome/CompactHeader/content/compactHeaderOverlay.js
+++ b/chrome/CompactHeader/content/compactHeaderOverlay.js
@@ -60,6 +60,11 @@ org.mozdev.compactHeader.pane = function() {
const COHE_EXTENSION_UUID = "{58D4392A-842E-11DE-B51A-C7B855D89593}";
+// var regex = {
+// /* taken from https://bugzilla.mozilla.org/show_bug.cgi?id=57104 */
+// links : /((\w+):\/\/[^<>()'"\s]+|www(\.[-\w]+){2,})/
+// };
+//
var gCoheCollapsedHeaderViewMode = false;
var gCoheBuiltCollapsedView = false;
@@ -321,6 +326,54 @@ org.mozdev.compactHeader.pane = function() {
});
}
+ function linkifySubject(subjectValueStr) {
+ var subjectNode = document.getElementById(subjectValueStr);
+ while(subjectNode.childNodes.length > 0) {
+ subjectNode.removeChild(subjectNode.firstChild)
+ }
+ var subject = currentHeaderData['subject'].headerValue;
+
+ if (regex.links.test(subject)) {
+ var text = subject;
+ /* utility function to split text and links */
+ function linkify(text) {
+ var matches = regex.links.exec(text);
+ var pre, post = null;
+ [pre, post] = text.split(matches[1]);
+ var link = document.createElement("a");
+ link.appendChild(document.createTextNode(matches[1]));
+ link.setAttribute("href", matches[1]);
+ link.setAttribute("class","text-link");
+ link.setAttribute("onclick", "org.mozdev.compactHeader.pane.subjectLinkOnClickListenter(event);");
+ return [pre,link,post];
+ }
+ /* loop through multiple possible links in the subject */
+ while(text && regex.links.test(text)) {
+ var pre, link, post = null;
+ [pre,link,post] = linkify(text);
+ /* we can't assume that any pre or post text was given, only a link */
+ if (pre && pre.length > 0)
+ subjectNode.appendChild(document.createTextNode(pre));
+ subjectNode.appendChild(link);
+ text = post;
+ }
+ if (text && text.length > 0)
+ subjectNode.appendChild(document.createTextNode(text));
+ } else {
+ subjectNode.appendChild(document.createTextNode(subject));
+ }
+ }
+
+ /* :::: Subject Link onClick Listener Functions :::: */
+ pub.subjectLinkOnClickListenter = function(event) {
+ if (event.originalTarget && event.originalTarget.getAttribute("href")) {
+ try {
+ messenger.launchExternalURL(event.originalTarget.getAttribute("href"));
+ } catch (e) { Application.console.log(e); }
+ }
+ }
+
+
// make sure the appropriate fields within the currently displayed view header mode
// are collapsed or visible...
function coheUpdateHeaderView()
@@ -340,6 +393,12 @@ org.mozdev.compactHeader.pane = function() {
} else {
RSSLinkify.newSubject.setAttribute("collapsed", "true");
RSSLinkify.oldSubject.setAttribute("collapsed", "false");
+// if (gCoheCollapsedHeaderViewMode) {
+// //linkifySubject('collapsed1LsubjectBox');
+// }
+// else {
+// linkifySubject('expandedsubjectBox');
+// }
}
} else {
if (RSSLinkify.newSubject) {
diff --git a/chrome/CompactHeader/skin/mac/osdef.css b/chrome/CompactHeader/skin/mac/osdef.css
index 33e9784..082d959 100644
--- a/chrome/CompactHeader/skin/mac/osdef.css
+++ b/chrome/CompactHeader/skin/mac/osdef.css
@@ -55,6 +55,7 @@ toolbar[iconsize="small"] .hdrOtherActionsButton {
padding: 0px;
}
+/*
toolbox[labelalign="end"] toolbar[mode="full"] .hdrJunkButton .toolbarbutton-icon,
toolbox[labelalign="end"] toolbar[mode="full"] toolbarpaletteitem .hdrJunkButton .toolbarbutton-icon {
display: -moz-box;
@@ -70,11 +71,12 @@ toolbox[labelalign="end"] toolbar[mode="full"] toolbarpaletteitem .hdrJunkButton
padding-top: 0px !important;
padding-bottom: 0px !important;
}
-
+*/
+/*
toolbarpaletteitem[place="palette"] .msgHeaderView-button-out {
-moz-appearance: button;
}
-
+*/
.msgHeaderView-button-out-item .msgHeaderView-button-out,
.msgHeaderView-button-out {
-moz-appearance: none;
@@ -107,11 +109,14 @@ toolbar[mode="text"] toolbarpaletteitem .msgHeaderView-button .toolbarbutton-tex
-moz-padding-end: 0px !important;
}
+/*
+toolbarpaletteitem[place="palette"] .msgHeaderView-flat-button-out-item,
toolbarpaletteitem[place="palette"] .msgHeaderView-flat-button-out-item .msgHeaderView-flat-button-out,
toolbarpaletteitem[place="palette"] .msgHeaderView-flat-button-out,
toolbarpaletteitem[place="palette"] .msgHeaderView-flat-button {
-moz-appearance: button;
}
+*/
.msgHeaderView-flat-button-out-item .msgHeaderView-flat-button-out,
.msgHeaderView-flat-button-out {
@@ -175,11 +180,6 @@ toolbar[mode="text"] toolbarpaletteitem .msgHeaderView-flat-button-out .toolbarb
-moz-padding-end: 0px !important;
}
-toolbarpaletteitem[place="palette"] .msgHeaderView-flat-button-out-item {
- -moz-appearance: button;
-}
-
-
toolbox[labelalign="end"] toolbar[mode="full"] .msgHeaderView-button-out .toolbarbutton-text,
toolbox[labelalign="end"] toolbar[mode="full"] .msgHeaderView-flat-button-out .toolbarbutton-text {
-moz-margin-start: 2px !important;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/compactheader.git
More information about the Pkg-mozext-commits
mailing list