dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32490
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16588: Fixes menu issue where profile would sometimes be displayed before apps and fixes broken font-awe...
------------------------------------------------------------
revno: 16588
committer: Mark Polak <markpo@xxxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-08-30 11:50:16 +0200
message:
Fixes menu issue where profile would sometimes be displayed before apps and fixes broken font-awesome icon for clearing the searchbar
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 2014-08-26 07:05:04 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js 2014-08-30 09:50:16 +0000
@@ -115,7 +115,7 @@
templates.search = '<div class="apps-search-wrap">' +
'<input class="apps-search" type="text" placeholder="{{search_apps}}">' +
- '<span class="apps-search-clear fa fa-times-circle"></span>' +
+ '<i class="apps-search-clear fa fa-times-circle"></i>' +
'</div>';
templates.extraLink = '<div class="apps-menu-bottom-button apps-menu-more"><a href="{{url}}">{{text}}</a></div>';
@@ -537,7 +537,12 @@
}
//Add the linkItem to the menu
- jqLite(document.querySelector('#' + defaultMenu.container + ' ul')).append(linkItem);
+ //Make sure that the application button element is always positioned after the profile
+ if (document.querySelector('#applicationsButton') !== null) {
+ jqLite(document.querySelector('#applicationsButton')).before(linkItem);
+ } else {
+ jqLite(document.querySelector('#' + defaultMenu.container + ' ul')).append(linkItem);
+ }
});
defaultMenu.eventsHandlers.push(function (menuElement) {
@@ -952,7 +957,6 @@
helpPageLink = json;
}
});
-
dhis2.menu.ui.createMenu("profile", [
{
name: "settings",
@@ -978,7 +982,7 @@
{
name: "help",
namespace: "/dhis-web-commons-about",
- defaultAction: helpPageLink.defaultAction,
+ defaultAction: helpPageLink.defaultAction || "", //FIXME: This sets the help url to an empty string when the ajax call failed. We should find an alternative.
icon: "../icons/function-account.png",
description: ""
},