← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21778: Update currentStyle to keyStyle for headerbar

 

------------------------------------------------------------
revno: 21778
committer: Mark Polak <markpo@xxxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-01-18 16:12:35 +0100
message:
  Update currentStyle to keyStyle for headerbar
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js	2016-01-07 22:31:16 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js	2016-01-18 15:12:35 +0000
@@ -1079,8 +1079,8 @@
                 /**
                  * @description
                  * Priority of the color scheme that is being loaded is as follows
-                 * 1. /api/userSettings/currentStyle
-                 * 2. /api/systemSettings {currentStyle property on the systemSettings object}
+                 * 1. /api/userSettings/keyStyle
+                 * 2. /api/systemSettings {keyStyle property on the systemSettings object}
                  * 3. The default style as defined in this function using the `defaultStyle` variable
                  */
                 function d2HeaderBarController($scope, $http) {
@@ -1112,12 +1112,12 @@
                         return requestUserStyle()
                             .catch(function () {
                                 console && console.info && console.info('Unable to load usersettings, falling back to systemSettings');
-                                localStorage.setItem('dhis2.menu.ui.headerBar.userStyle', systemSettings.currentStyle);
-                                return systemSettings.currentStyle;
+                                localStorage.setItem('dhis2.menu.ui.headerBar.userStyle', systemSettings.keyStyle);
+                                return systemSettings.keyStyle;
                             })
                             .then(function (userStyleUrl) {
                                 return {
-                                    userStyleUrl: userStyleUrl || systemSettings.currentStyle,
+                                    userStyleUrl: userStyleUrl || systemSettings.keyStyle,
                                     logo: systemSettings.keyCustomTopMenuLogo,
                                     title: systemSettings.applicationTitle,
                                     link: systemSettings.startModule
@@ -1184,7 +1184,7 @@
                     }
 
                     function requestUserStyle() {
-                        var currentUserStyleUrl = [baseUrl, 'api', 'userSettings', 'currentStyle'].join('/');
+                        var currentUserStyleUrl = [baseUrl, 'api', 'userSettings', 'keyStyle'].join('/');
 
                         return $http.get(currentUserStyleUrl, {responseType: 'text', cache: true, headers: {'Accept': 'text/plain'}})
                             .then(function (response) {