Fix bug 768207 - Make the cache checkbox default-on in the new calendar dialog. r=redDragon,a=philipp
authorPhilipp Kewisch <mozilla@kewis.ch>
Sat, 02 May 2015 18:06:49 +0200
changeset 26040 36189f77dfe989e3ba209d7eed2dac5e8b2bceea
parent 26039 3450fc9588a9f089ec14686a9f8c1f872ee5a166
child 26041 a6b8669b874611915bd10d7ef484ca71ee1b2ac1
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersredDragon, philipp
bugs768207
Fix bug 768207 - Make the cache checkbox default-on in the new calendar dialog. r=redDragon,a=philipp
calendar/resources/content/calendarCreation.js
calendar/resources/content/calendarCreation.xul
--- a/calendar/resources/content/calendarCreation.js
+++ b/calendar/resources/content/calendarCreation.js
@@ -77,18 +77,20 @@ function onSelectProvider(type) {
                             .createInstance(Components.interfaces.calICalendar);
     } catch (e) {}
 
     if (tempCal && tempCal.getProperty("cache.always")) {
         cache.oldValue = cache.checked;
         cache.checked = true;
         cache.disabled = true;
     } else {
-        cache.checked = cache.oldValue || false;
-        cache.oldValue = null;
+        if (cache.oldValue !== undefined) {
+            cache.checked = cache.oldValue;
+            cache.oldValue = undefined;
+        }
         cache.disabled = false;
     }
 }
 
 /**
  * Checks if the required information is set so that the wizard can advance. On
  * an error, notifications are shown and the wizard can not be advanced.
  */
--- a/calendar/resources/content/calendarCreation.xul
+++ b/calendar/resources/content/calendarCreation.xul
@@ -66,16 +66,17 @@
                              required="true"
                              type="search"
                              oncommand="checkRequired();"
                              ondragexit="checkRequired();"/>
                 </row>
                 <row>
                      <label/>
                      <checkbox id="cache"
+                               checked="true"
                                label="&calendarproperties.cache3.label;"/>
                 </row>
                 <notificationbox id="location-notifications" flex="1"/>
                 <!--
                 <description>&locationpage.login.description;</description>
                 <row align="center">
                     <label value="&locationpage.username.label;" control="calendar-username"/>
                     <textbox id="calendar-username"/>