Bug 489773 - Invitation dialog has flaws (regression). r=philipp
authorMartin Schroeder <mschroeder@mozilla.x-home.org>
Sat, 20 Jun 2009 23:19:37 +0200
changeset 2901 67ab9ddecfbeff1778a33424246ff6ed6f822799
parent 2900 2d3cf3e28937ae494ecaff9bf699305481dea68c
child 2902 963ded786cb7ece231cb490664fda7290c274e2e
push id2351
push usermschroeder@mozilla.x-home.org
push dateSat, 20 Jun 2009 21:20:10 +0000
treeherdercomm-central@67ab9ddecfbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs489773
Bug 489773 - Invitation dialog has flaws (regression). r=philipp
calendar/base/content/dialogs/calendar-invitations-dialog.css
calendar/base/content/dialogs/calendar-invitations-list.xml
calendar/base/themes/pinstripe/dialogs/calendar-invitations-dialog.css
calendar/base/themes/winstripe/dialogs/calendar-invitations-dialog.css
--- a/calendar/base/content/dialogs/calendar-invitations-dialog.css
+++ b/calendar/base/content/dialogs/calendar-invitations-dialog.css
@@ -14,16 +14,17 @@
  * The Original Code is Sun Microsystems code.
  *
  * The Initial Developer of the Original Code is Sun Microsystems.
  * Portions created by the Initial Developer are Copyright (C) 2006
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Thomas Benisch <thomas.benisch@sun.com>
+ *   Martin Schroeder <mschroeder@mozilla.x-home.org>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
@@ -31,19 +32,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 calendar-invitations-richlistbox {
   -moz-binding: url(chrome://calendar/content/calendar-invitations-list.xml#calendar-invitations-richlistbox);
-  -moz-user-focus: normal;
 }
 
 calendar-invitations-richlistitem {
   -moz-binding: url(chrome://calendar/content/calendar-invitations-list.xml#calendar-invitations-richlistitem);
-  -moz-user-focus: none;
 }
 
 calendar-invitations-richlistitem[selected="true"] {
   -moz-user-focus: normal;
 }
--- a/calendar/base/content/dialogs/calendar-invitations-list.xml
+++ b/calendar/base/content/dialogs/calendar-invitations-list.xml
@@ -13,18 +13,20 @@
    - License.
    -
    - The Original Code is Sun Microsystems code.
    -
    - The Initial Developer of the Original Code is Sun Microsystems.
    - Portions created by the Initial Developer are Copyright (C) 2006
    - the Initial Developer. All Rights Reserved.
    -
-   - Contributor(s): Thomas Benisch <thomas.benisch@sun.com>
+   - Contributor(s):
+   -   Thomas Benisch <thomas.benisch@sun.com>
    -   Philipp Kewisch <mozilla@kewis.ch>
+   -   Martin Schroeder <mschroeder@mozilla.x-home.org>
    -
    - Alternatively, the contents of this file may be used under the terms of
    - either the GNU General Public License Version 2 or later (the "GPL"), or
    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
    - in which case the provisions of the GPL or the LGPL are applicable instead
    - of those above. If you wish to allow use of your version of this file only
    - under the terms of either the GPL or the LGPL, and not to allow others to
    - use your version of this file under the terms of the MPL, indicate your
@@ -74,22 +76,22 @@
           <xul:label anonid="organizer" crop="end"/>
           <xul:label anonid="spacer" value="" hidden="true"/>
         </xul:vbox>
         <xul:vbox>
           <xul:button anonid="accept"
             class="calendar-invitations-richlistitem-accept-button
             calendar-invitations-richlistitem-button"
             label="&calendar.invitations.list.accept.button.label;"
-            hidden="true" oncommand="accept();"/>
+            oncommand="accept();"/>
           <xul:button anonid="decline"
             class="calendar-invitations-richlistitem-decline-button
             calendar-invitations-richlistitem-button"
             label="&calendar.invitations.list.decline.button.label;"
-            hidden="true" oncommand="decline();"/>
+            oncommand="decline();"/>
         </xul:vbox>
       </xul:hbox>
     </content>
 
     <implementation>
       <!-- fields -->
       <field name="mDateFormatter">null</field>
       <field name="mCalendarItem">null</field>
@@ -238,31 +240,10 @@
       </method>
 
       <method name="decline">
         <body><![CDATA[
           this.participationStatus = "DECLINED";
         ]]></body>
       </method>
     </implementation>
-
-    <handlers>
-      <handler event="DOMAttrModified"><![CDATA[
-        if (event.attrName != "selected" ||
-            event.originalTarget.getAttribute("anonid") !=
-            "invitations-listitem") {
-          return;
-        }
-        var acceptButton = document.getAnonymousElementByAttribute(
-            this, "anonid", "accept");
-        var declineButton = document.getAnonymousElementByAttribute(
-            this, "anonid", "decline");
-        if (event.newValue == "true") {
-            acceptButton.removeAttribute("hidden");
-            declineButton.removeAttribute("hidden");
-        } else if (event.newValue == "false") {
-            acceptButton.setAttribute("hidden", "true");
-            declineButton.setAttribute("hidden", "true");
-        }
-      ]]></handler>
-    </handlers>
   </binding>
 </bindings>
--- a/calendar/base/themes/pinstripe/dialogs/calendar-invitations-dialog.css
+++ b/calendar/base/themes/pinstripe/dialogs/calendar-invitations-dialog.css
@@ -14,16 +14,17 @@
  * The Original Code is Sun Microsystems code.
  *
  * The Initial Developer of the Original Code is Sun Microsystems.
  * Portions created by the Initial Developer are Copyright (C) 2006
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Thomas Benisch <thomas.benisch@sun.com>
+ *   Martin Schroeder <mschroeder@mozilla.x-home.org>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
@@ -40,31 +41,34 @@
 }
 
 .calendar-invitations-updating-icon {
   list-style-image: url("chrome://global/skin/icons/loading_16.png");
   opacity: 0.5;
 }
 
 calendar-invitations-richlistbox {
-  background-color: white;
+  background-color: -moz-Field;
+  color: -moz-FieldText;
   border: 1px solid #7F9DB9;
 }
 
 calendar-invitations-richlistitem {
   padding-top: 6px;
   padding-bottom: 6px;
   -moz-padding-start: 7px;
   -moz-padding-end: 7px;
   min-height: 25px;
   border-bottom: 1px dotted #C0C0C0;
 }
 
 calendar-invitations-richlistitem[selected="true"] {
-  background-image: url("chrome://mozapps/skin/downloads/downloadSelected.png") !important;
+  background-image: url("chrome://mozapps/skin/extensions/itemEnabledFader.png");
+  background-color: Highlight;
+  color: HighlightText;
   border-bottom: 1px dotted #7F9DB9;
 }
 
 .calendar-invitations-richlistitem-title {
   font-weight: bold;
 }
 
 .calendar-invitations-richlistitem-icon[status="NEEDS-ACTION"] {
@@ -79,16 +83,21 @@ calendar-invitations-richlistitem[select
 
 .calendar-invitations-richlistitem-icon[status="DECLINED"] {
   list-style-image: url("chrome://calendar/skin/calendar-invitations-dialog-list-images.png");
   -moz-image-region: rect(0px 96px 32px 64px);
 }
 
 .calendar-invitations-richlistitem-button {
   margin-bottom: 10px;
+  visibility: hidden;
+}
+
+calendar-invitations-richlistitem[selected="true"] .calendar-invitations-richlistitem-button {
+  visibility: visible;
 }
 
 .calendar-invitations-richlistitem-button .button-icon {
   margin-top: 0px;
   margin-bottom: 0px;
   -moz-margin-start: 0px;
   -moz-margin-end: 5px;
 }
--- a/calendar/base/themes/winstripe/dialogs/calendar-invitations-dialog.css
+++ b/calendar/base/themes/winstripe/dialogs/calendar-invitations-dialog.css
@@ -14,16 +14,17 @@
  * The Original Code is Sun Microsystems code.
  *
  * The Initial Developer of the Original Code is Sun Microsystems.
  * Portions created by the Initial Developer are Copyright (C) 2006
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Thomas Benisch <thomas.benisch@sun.com>
+ *   Martin Schroeder <mschroeder@mozilla.x-home.org>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
@@ -40,31 +41,34 @@
 }
 
 .calendar-invitations-updating-icon {
   list-style-image: url("chrome://global/skin/icons/loading_16.png");
   opacity: 0.5;
 }
 
 calendar-invitations-richlistbox {
-  background-color: white;
+  background-color: -moz-Field;
+  color: -moz-FieldText;
   border: 1px solid #7F9DB9;
 }
 
 calendar-invitations-richlistitem {
   padding-top: 6px;
   padding-bottom: 6px;
   -moz-padding-start: 7px;
   -moz-padding-end: 7px;
   min-height: 25px;
   border-bottom: 1px dotted #C0C0C0;
 }
 
 calendar-invitations-richlistitem[selected="true"] {
-  background-image: url("chrome://mozapps/skin/downloads/downloadSelected.png") !important;
+  background-image: url("chrome://mozapps/skin/extensions/itemEnabledFader.png");
+  background-color: Highlight;
+  color: HighlightText;
   border-bottom: 1px dotted #7F9DB9;
 }
 
 .calendar-invitations-richlistitem-title {
   font-weight: bold;
 }
 
 .calendar-invitations-richlistitem-icon[status="NEEDS-ACTION"] {
@@ -79,16 +83,21 @@ calendar-invitations-richlistitem[select
 
 .calendar-invitations-richlistitem-icon[status="DECLINED"] {
   list-style-image: url("chrome://calendar/skin/calendar-invitations-dialog-list-images.png");
   -moz-image-region: rect(0px 96px 32px 64px);
 }
 
 .calendar-invitations-richlistitem-button {
   margin-bottom: 10px;
+  visibility: hidden;
+}
+
+calendar-invitations-richlistitem[selected="true"] .calendar-invitations-richlistitem-button {
+  visibility: visible;
 }
 
 .calendar-invitations-richlistitem-button .button-icon {
   margin-top: 0px;
   margin-bottom: 0px;
   -moz-margin-start: 0px;
   -moz-margin-end: 5px;
 }