← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19261: Minor fix to header-bar

 

------------------------------------------------------------
revno: 19261
committer: Mark Polak <markpo@xxxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-06-02 17:24:23 +0200
message:
  Minor fix to header-bar
  
  UserSettings api returns the first Accept header value
  as the Content-Type of the response. This breaks default
  angular.$http behavior as the content type does not match
  the result. Now sets text/plain as the Accept header for
  /userSettings/currentStyle.
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	2015-05-31 11:14:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js	2015-06-02 15:24:23 +0000
@@ -1164,7 +1164,7 @@
                     function requestUserStyle() {
                         var currentUserStyleUrl = [baseUrl, 'api', 'userSettings', 'currentStyle'].join('/');
 
-                        return $http.get(currentUserStyleUrl, {responseType: 'text', cache: true});
+                        return $http.get(currentUserStyleUrl, {responseType: 'text', cache: true, headers: {'Accept': 'text/plain'}});
                     }
 
                     function getStyleLogoUrl(styleName) {