dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40636
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20637: minor refactoring of left-bar menu in tracker/event-capture apps
------------------------------------------------------------
revno: 20637
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-10-12 16:21:42 +0200
message:
minor refactoring of left-bar menu in tracker/event-capture apps
added:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/left-bar.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/left-bar.html
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.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
=== added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/left-bar.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/left-bar.html 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/left-bar.html 2015-10-12 14:21:42 +0000
@@ -0,0 +1,25 @@
+<span id="showLeftBar">
+ <a href="javascript:dhis2.leftBar.showAnimated()" title="$i18n.getString('show_menu' )"><i class="fa fa-arrow-right leftBarIcon"></i></a>
+</span>
+<div id="leftBar">
+ <div id="hideLeftBar">
+ <a href="index.action" title="{{'show_main_menu'| translate}}" id="showMainMenuLink"><i class="fa fa-home leftBarIcon"></i></a>
+ <a href="javascript:dhis2.leftBar.hideAnimated()" title="{{'hide_menu'| translate}}" id="hideMainMenuLink"><i class="fa fa-arrow-left leftBarIcon"></i></a>
+ <a href="javascript:dhis2.leftBar.extendAnimated()" title="{{'extend_menu'| translate}}" id="extendMainMenuLink"><i class="fa fa-arrow-right leftBarIcon"></i></a>
+ </div>
+ <div style="margin-top:20px">
+ <img id="searchIcon" src="../images/search.png" style="cursor: pointer" title="{{searchOusLabel}}">
+ <span id="searchSpan" style="width:100%;display:none;">
+ <input type="text" id="searchField" name="key"/>
+ <input type="button" value="{{findLabel}}" onclick="selection.findByName()"/>
+ </span>
+ </div>
+ <div id="orgUnitTree">
+ <ul>
+ </ul>
+ </div>
+ <img id="ouwt_loader" src="../images/ajax-loader-bar.gif"/>
+ <div class="small-horizonal-spacing" ng-if="!treeLoaded">
+ {{'loading_tree'| translate}}
+ </div>
+</div>
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/left-bar.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/left-bar.html 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/left-bar.html 2015-10-12 14:21:42 +0000
@@ -0,0 +1,31 @@
+<span id="showLeftBar">
+ <a href="javascript:dhis2.leftBar.showAnimated()" title="$i18n.getString('show_menu' )"><i class="fa fa-arrow-right leftBarIcon"></i></a>
+</span>
+<div id="leftBar">
+ <div id="hideLeftBar">
+ <a href="index.action" title="{{'show_main_menu'| translate}}" id="showMainMenuLink"><i class="fa fa-home leftBarIcon"></i></a>
+ <a href="javascript:dhis2.leftBar.hideAnimated()" title="{{'hide_menu'| translate}}" id="hideMainMenuLink"><i class="fa fa-arrow-left leftBarIcon"></i></a>
+ <a href="javascript:dhis2.leftBar.extendAnimated()" title="{{'extend_menu'| translate}}" id="extendMainMenuLink"><i class="fa fa-arrow-right leftBarIcon"></i></a>
+ </div>
+ <div class="left-bar-menu" ng-controller="LeftBarMenuController">
+ <ul class="nav nav-pills nav-stacked">
+ <li><a href ng-click="showHome()">{{'registration_and_data_entry'| translate}}</a></li>
+ <li><a href ng-click="showReportTypes()">{{'reports'| translate}}</a></li>
+ </ul>
+ </div>
+ <div style="margin-top:20px">
+ <img id="searchIcon" src="../images/search.png" style="cursor: pointer" title="{{searchOusLabel}}">
+ <span id="searchSpan" style="width:100%;display:none;">
+ <input type="text" id="searchField" name="key"/>
+ <input type="button" value="{{findLabel}}" onclick="selection.findByName()"/>
+ </span>
+ </div>
+ <div id="orgUnitTree">
+ <ul>
+ </ul>
+ </div>
+ <img id="ouwt_loader" src="../images/ajax-loader-bar.gif"/>
+ <div class="small-horizonal-spacing" ng-if="!treeLoaded">
+ {{'loading_tree'| translate}}
+ </div>
+</div>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2015-09-17 11:21:04 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2015-10-12 14:21:42 +0000
@@ -27,32 +27,7 @@
return {
restrict: 'E',
- template: '<span id="showLeftBar">\n\
- <a href="javascript:dhis2.leftBar.showAnimated()" title="$i18n.getString(\'show_menu\' )">\n\
- <i class="fa fa-arrow-right leftBarIcon"></i></a>\n\
- </span>\n\
- <div id="leftBar">\n\
- <div id="hideLeftBar">\n\
- <a href="index.action" title="{{\'show_main_menu\' | translate}}" id="showMainMenuLink"><i class="fa fa-home leftBarIcon"></i></a>\n\
- <a href="javascript:dhis2.leftBar.hideAnimated()" title="{{\'hide_menu\' | translate}}" id="hideMainMenuLink"><i class="fa fa-arrow-left leftBarIcon"></i></a>\n\
- <a href="javascript:dhis2.leftBar.extendAnimated()" title="{{\'extend_menu\' | translate}}" id="extendMainMenuLink"><i class="fa fa-arrow-right leftBarIcon"></i></a>\n\
- </div>\n\
- <div style="margin-top:20px">\n\
- <img id="searchIcon" src="../images/search.png" style="cursor: pointer" title="{{searchOusLabel}}">\n\
- <span id="searchSpan" style="width:100%;display:none;">\n\
- <input type="text" id="searchField" name="key"/>\n\
- <input type="button" value="{{findLabel}}" onclick="selection.findByName()"/>\n\
- </span>\n\
- </div>\n\
- <div id="orgUnitTree">\n\
- <ul>\n\
- </ul>\n\
- </div>\n\
- <img id="ouwt_loader" src="../images/ajax-loader-bar.gif"/>\n\
- <div class="small-horizonal-spacing" ng-if="!treeLoaded">\n\
- {{\'loading_tree\'| translate}}\n\
- </div>\n\
- </div>',
+ templateUrl: 'views/left-bar.html',
link: function (scope, element, attrs) {
$("#searchIcon").click(function () {