Bug 1536757 - Initialise calendar views prefpane correctly. r=Paenglab
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 21 Mar 2019 11:33:43 +1300
changeset 26141 f50cb5efc43d
parent 26140 c63aa39de7fe
child 26142 2ab8c7d1987f
push id15691
push usermozilla@jorgk.com
push dateThu, 21 Mar 2019 22:19:15 +0000
treeherdercomm-central@f50cb5efc43d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersPaenglab
bugs1536757
Bug 1536757 - Initialise calendar views prefpane correctly. r=Paenglab
calendar/base/content/preferences/views.js
--- a/calendar/base/content/preferences/views.js
+++ b/calendar/base/content/preferences/views.js
@@ -28,19 +28,19 @@ Preferences.addAll([
  * Global Object to hold methods for the views pref pane
  */
 var gViewsPane = {
     /**
      * Initialize the views pref pane. Sets up dialog controls to match the
      * values set in prefs.
      */
     init: function() {
-        this.updateViewEndMenu(document.getElementById("daystarthour").value);
-        this.updateViewStartMenu(document.getElementById("dayendhour").value);
-        this.updateViewWorkDayCheckboxes(document.getElementById("weekstarts").value);
+        this.updateViewEndMenu(Preferences.get("calendar.view.daystarthour").value);
+        this.updateViewStartMenu(Preferences.get("calendar.view.dayendhour").value);
+        this.updateViewWorkDayCheckboxes(Preferences.get("calendar.week.start").value);
         this.initializeViewStartEndMenus();
     },
 
     /**
      * Initialize the strings for the  "day starts at" and "day ends at"
      * menulists. This is needed to respect locales that use AM/PM.
      */
     initializeViewStartEndMenus: function() {