make stars work, move date around, tweak css some more gloda-facet
authorDavid Ascher <david@mozillamessaging.com>
Wed, 02 Sep 2009 12:03:47 -0700
branchgloda-facet
changeset 3641 2e690e95603d952d8454490b4270bff37afeded4
parent 3640 16d6884c3416cdfb179575e708357edebf18ce8e
child 3642 12bf0fbdad4dce649b4a79e683bc69643096bd57
push idunknown
push userunknown
push dateunknown
make stars work, move date around, tweak css some more
mail/base/content/glodaFacetBindings.xml
mail/base/content/glodaFacetView.css
mail/base/content/glodaFacetView.xhtml
mail/themes/gnomestripe/jar.mn
mail/themes/gnomestripe/mail/glodaFacetView.css
mail/themes/pinstripe/jar.mn
mail/themes/pinstripe/mail/glodaFacetView.css
mail/themes/qute/jar.mn
mail/themes/qute/mail/glodaFacetView.css
--- a/mail/base/content/glodaFacetBindings.xml
+++ b/mail/base/content/glodaFacetBindings.xml
@@ -45,16 +45,21 @@
           xmlns:xbl="http://www.mozilla.org/xbl"
           xmlns:svg="http://www.w3.org/2000/svg">
 
 <!-- ===== Constraints ===== -->
 
 <binding id="query-explanation">
   <content>
   </content>
+  <handlers>
+    <handler event="click"><![CDATA[
+    logEvent(event);
+    ]]></handler>
+  </handlers>
   <implementation>
     <!-- Indicate that we are based on a fulltext search-->
     <method name="setFulltext">
       <parameter name="aMsgSearcher" />
       <body><![CDATA[
         while (this.lastChild)
           this.removeChild(this.lastChild);
 
@@ -951,23 +956,26 @@
           <html:div anonid="author-group" class="message-author-group">
             <html:span anonid="from" class="message-from-label"></html:span>
             <html:span anonid="author" class="message-author"></html:span>
           </html:div>
           <html:div anonid="recipients-group" class="message-recipients-group">
             <html:span anonid="to" class="message-to-label"></html:span>
             <html:div anonid="recipients" class="message-recipients"/>
           </html:div>
+          <html:span anonid="date" class="message-date"></html:span>
         </html:div>
-        <html:div anonid="subject" class="message-subject"></html:div>
+        <html:div class="message-subject-group">
+          <html:span anonid="star" class="message-star"></html:span>
+          <html:span anonid="subject" class="message-subject"></html:span>
+          <html:span anonid="tags" class="message-tags"></html:span>
+        </html:div>
       </html:div>
-      <html:div anonid="tags" class="message-tags"></html:div>
     </html:div>
     <html:pre anonid="snippet" class="message-body"></html:pre>
-    <html:span anonid="date" class="message-date"></html:span>
   </content>
   <implementation>
     <constructor><![CDATA[
       this.build();
     ]]></constructor>
     <method name="build">
       <body><![CDATA[
         let message = this.message;
@@ -1002,16 +1010,21 @@
           for each (let [, recip] in Iterator(message.recipients)) {
             let recipNode = document.createElement("span");
             recipNode.setAttribute("class", "message-recipient");
             recipNode.textContent = recip.contact.name;
             recipNode.setAttribute("title", "BARGH");
             recipientsNode.appendChild(recipNode);
           }
         }
+        
+        let starNode = anonElem("star");
+        if (message.starred) {
+          starNode.setAttribute("starred", "true")
+        }
 
         // - Tags
         let tagsNode = anonElem("tags");
         if ("tags" in message && message.tags.length) {
           let _msgTagService = Components.classes["@mozilla.org/messenger/tagservice;1"].
                                     getService(Components.interfaces.nsIMsgTagService);
           for each (let [, tag] in Iterator(message.tags)) {
             let tagNode = document.createElement("span");
--- a/mail/base/content/glodaFacetView.css
+++ b/mail/base/content/glodaFacetView.css
@@ -452,17 +452,32 @@ h1, h2, h3 {
 
 .message-addresses-group {
   float: right;
   text-align: right;
 }
 
 .message-date {
   color: #999;
-  font-size: 90%;
+  float: right;
+}
+
+.message-star[starred="true"] {
+  display: inline-block;
+  width: 16px !important;
+  height: 16px;
+}
+
+.message-addresses-group {
+  padding-left: 1em;
+}
+
+.message-subject-group {
+  margin-right: 1em;
+  padding-left: .5em;
 }
 
 .message-author, .message-recipients {
   text-align: right;
   display: inline;
   color: #222;
 }
 
@@ -472,20 +487,19 @@ h1, h2, h3 {
 .message-recipient:after {
   content: ", ";
 }
 .message-recipient:last-child:after {
   content: "";
 }
 
 .message-subject {
-/*  white-space: nowrap; */
-  /* overflow: hidden; */
   font-size: 115%;
   font-weight: bold;
+  line-height: 1.2em;
   color: #555;
 }
 .message-body {
   color: #555;
   padding-left: 1em;
   font-family: monospace;
   font-size: 110%;
 }
--- a/mail/base/content/glodaFacetView.xhtml
+++ b/mail/base/content/glodaFacetView.xhtml
@@ -17,31 +17,31 @@
   <!-- XBL bindings CSS -->
   <link rel="stylesheet"
       href="chrome://messenger/content/glodaFacetBindings.css"
       type="text/css"></link>
   <link rel="stylesheet" media="screen" type="text/css"
         href="chrome://messenger/skin/tagColors.css"/>
   <!-- Themes -->
   <link rel="stylesheet"
-      href="chrome://messenger/content/glodaFacetView.css"
+      href="chrome://messenger/skin/glodaFacetView.css"
       type="text/css"></link>
   <!-- Global Context -->
   <script type="application/javascript;version=1.8"
       src="chrome://messenger/content/glodaFacetView.js"></script>
   <!-- Libs -->
   <script type="application/javascript;version=1.8"
       src="chrome://messenger/content/jquery.js"></script>
   <script type="application/javascript;version=1.8"
       src="chrome://messenger/content/protovis-r2.6-modded.js"></script>
   <!-- Facet Binding Stuff that doesn't belong in XBL -->
   <script type="application/javascript;version=1.8"
       src="chrome://messenger/content/glodaFacetVis.js"></script>
 </head>
-<body onload="reachOutAndTouchFrame()">
+<body id="body" onload="reachOutAndTouchFrame()">
   <div class="facets facets-sidebar" id="facets">
     <h1 id="filter-header-label">&glodaFacetView.filters.label;</h1>
     <div id="facet-fromMe" class="facetious" type="boolean" attr="fromMe"
          uninitialized="true" />
     <div id="facet-toMe" class="facetious" type="boolean" attr="toMe"
          uninitialized="true" />
     <div id="facet-star" class="facetious" type="boolean" attr="star"
          uninitialized="true"/><br />
--- a/mail/themes/gnomestripe/jar.mn
+++ b/mail/themes/gnomestripe/jar.mn
@@ -20,16 +20,17 @@ classic.jar:
   skin/classic/messenger/folderMenus.css                      (mail/folderMenus.css)
   skin/classic/messenger/folderPane.css                       (mail/folderPane.css)
   skin/classic/messenger/subscribe.css                        (mail/subscribe.css)
   skin/classic/messenger/virtualFolderListDialog.css          (mail/virtualFolderListDialog.css)
   skin/classic/messenger/searchDialog.css                     (mail/searchDialog.css)
   skin/classic/messenger/msgSelectOffline.css                 (mail/msgSelectOffline.css)
   skin/classic/messenger/filterDialog.css                     (mail/filterDialog.css)
   skin/classic/messenger/multimessageview.css                 (mail/multimessageview.css)
+  skin/classic/messenger/glodaFacetView.css                   (mail/glodaFacetView.css)
   skin/classic/messenger/dialogs.css                          (mail/dialogs.css)
   skin/classic/messenger/newmailalert.css                     (mail/newmailalert.css)
 * skin/classic/messenger/tabmailBindings.xml                  (mail/tabmailBindings.xml)
   skin/classic/messenger/tabmail.css                          (mail/tabmail.css)
   skin/classic/messenger/editContactOverlay.css               (mail/editContactOverlay.css)
   skin/classic/messenger/starred48.png                        (mail/starred48.png)
   skin/classic/messenger/contactStarred.png                   (mail/contactStarred.png)
   skin/classic/messenger/starContact.png                      (mail/starContact.png)
new file mode 100644
--- /dev/null
+++ b/mail/themes/gnomestripe/mail/glodaFacetView.css
@@ -0,0 +1,6 @@
+@import url("chrome://messenger/content/glodaFacetView.css");
+
+.message-star[starred="true"] {
+  background-image: url("chrome://messenger/skin/icons/flag-col.png");
+}
+
--- a/mail/themes/pinstripe/jar.mn
+++ b/mail/themes/pinstripe/jar.mn
@@ -1,10 +1,11 @@
 classic.jar:
 % skin messenger classic/1.0 %skin/classic/messenger/
+  skin/classic/messenger/glodaFacetView.css                      (mail/glodaFacetView.css)
   skin/classic/messenger/multimessageview.css                    (mail/multimessageview.css)
   skin/classic/messenger/dialogs.css                             (mail/dialogs.css)
   skin/classic/messenger/messenger.css                           (mail/messenger.css)
   skin/classic/messenger/primaryToolbar.css                      (mail/primaryToolbar.css)
   skin/classic/messenger/accountCentral.css                      (mail/accountCentral.css)
   skin/classic/messenger/accountCreation.css                     (mail/accountCreation.css)
   skin/classic/messenger/accountManage.css                       (mail/accountManage.css)
   skin/classic/messenger/accountWizard.css                       (mail/accountWizard.css)
new file mode 100644
--- /dev/null
+++ b/mail/themes/pinstripe/mail/glodaFacetView.css
@@ -0,0 +1,6 @@
+@import url("chrome://messenger/content/glodaFacetView.css");
+
+.message-star[starred="true"] {
+  background-image: url("chrome://messenger/skin/icons/flaggedmail.png");
+}
+
--- a/mail/themes/qute/jar.mn
+++ b/mail/themes/qute/jar.mn
@@ -50,16 +50,17 @@ classic.jar:
   skin/classic/messenger/folderPane.css                       (mail/folderPane.css)
   skin/classic/messenger/subscribe.css                        (mail/subscribe.css)
   skin/classic/messenger/virtualFolderListDialog.css          (mail/virtualFolderListDialog.css)
   skin/classic/messenger/searchDialog.css                     (mail/searchDialog.css)
   skin/classic/messenger/msgSelectOffline.css                 (mail/msgSelectOffline.css)
   skin/classic/messenger/filterDialog.css                     (mail/filterDialog.css)
   skin/classic/messenger/dialogs.css                          (mail/dialogs.css)
   skin/classic/messenger/multimessageview.css                 (mail/multimessageview.css)
+  skin/classic/messenger/glodaFacetView.css                   (mail/glodaFacetView.css)
   skin/classic/messenger/newmailalert.css                     (mail/newmailalert.css)
 * skin/classic/messenger/tabmailBindings.xml                  (mail/tabmailBindings.xml)
   skin/classic/messenger/tabmail.css                          (mail/tabmail.css)
   skin/classic/messenger/editContactOverlay.css               (mail/editContactOverlay.css)
   skin/classic/messenger/starred48.png                        (mail/starred48.png)
   skin/classic/messenger/contactStarred.png                   (mail/contactStarred.png)
   skin/classic/messenger/starContact.png                      (mail/starContact.png)
   skin/classic/messenger/activity/activity.css                   (mail/activity/activity.css)
new file mode 100644
--- /dev/null
+++ b/mail/themes/qute/mail/glodaFacetView.css
@@ -0,0 +1,6 @@
+@import url("chrome://messenger/content/glodaFacetView.css");
+
+.message-star[starred="true"] {
+  background-image: url("chrome://messenger/skin/icons/flag-col.png");
+}
+