← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18153: Also bootstrap menu when helpurl request fails

 

------------------------------------------------------------
revno: 18153
committer: Mark Polak <markpo@xxxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-02-02 17:30:47 +0100
message:
  Also bootstrap menu when helpurl request fails
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-01-28 19:03:29 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js	2015-02-02 16:30:47 +0000
@@ -951,16 +951,20 @@
         try {
             jQuery.ajax({
                 type : "GET",
-                url : "../dhis-web-commons/menu/getHelpPageLinkModule.action",
+                url : dhis2.settings.getBaseUrl() + "/dhis-web-commons/menu/getHelpPageLinkModule.action",
                 dataType : "json",
                 success : function(json) {
                     helpPageLink = json;
                     bootstrapMenu();
+                },
+                failure: function () {
+                    bootstrapMenu();
                 }
             });
         } catch (e) {
-            if (console && console.error)
+            if (console && console.error) {
                 console.error(e.message, e.stack);
+            }
         }
     };