← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18137: Replace headerbar in event-capture, tracker-capture and cache-clean. Also sets defaults for a cle...

 

------------------------------------------------------------
revno: 18137
committer: Mark Polak <markpo@xxxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-01-28 20:03:29 +0100
message:
  Replace headerbar in event-capture, tracker-capture and cache-clean. Also sets defaults for a clean instance.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-cache-cleaner/index.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-cache-cleaner/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/app.js
  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-apps/src/main/webapp/dhis-web-cache-cleaner/index.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-cache-cleaner/index.html	2014-12-17 14:17:16 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-cache-cleaner/index.html	2015-01-28 19:03:29 +0000
@@ -64,8 +64,7 @@
         <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js"></script>
 
         <link type="text/css" rel="stylesheet" href="../dhis-web-commons/font-awesome/css/font-awesome.min.css"/>
-        <link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/light_blue/light_blue.css"/>
-        <link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/widgets.css"/>     
+        <link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/widgets.css"/>
         <link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/menu.css">
 
         <link type="text/css" rel="stylesheet" href="styles/style.css">
@@ -73,15 +72,7 @@
     </head>
 
     <body>
-        <div id="header" ng-controller="HeaderController">
-            <div class="container-heading">
-                <img ng-click="home()" id="headerBanner" src="../dhis-web-commons/css/light_blue/logo_banner.png" style="cursor:pointer" title="{{'dhis2_home'| translate}}">                    
-            </div>            
-            <div id="headerMessage" class="bold"></div>
-
-            <div d2-menu></div>
-
-        </div>
+        <d2-header-bar></d2-header-bar>
 
         <div id="leftBar"></div>
         <div class="page" id="mainPage" ng-controller="MainController">

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-cache-cleaner/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-cache-cleaner/scripts/app.js	2014-12-15 14:00:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-cache-cleaner/scripts/app.js	2015-01-28 19:03:29 +0000
@@ -14,7 +14,7 @@
           'd2Controllers',
 		  'angularLocalStorage', 
 		  'pascalprecht.translate',
-          'd2Menu'])
+          'd2HeaderBar'])
               
 .value('DHIS2URL', '..')
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html	2015-01-20 14:36:12 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html	2015-01-28 19:03:29 +0000
@@ -83,8 +83,7 @@
         <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js"></script>
 
         <link type="text/css" rel="stylesheet" href="../dhis-web-commons/font-awesome/css/font-awesome.min.css"/>
-        <link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/light_blue/light_blue.css"/>
-        <link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/widgets.css"/>     
+        <link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/widgets.css"/>
         <link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/menu.css">
         
         <link type="text/css" rel="stylesheet" href="styles/style.css">
@@ -92,15 +91,7 @@
     </head>
 
     <body>
-        <div id="header" ng-controller="HeaderController">
-            <div class="container-heading">
-                <img ng-click="home()" id="headerBanner" src="../dhis-web-commons/css/light_blue/logo_banner.png" style="cursor:pointer" title="{{'dhis2_home'| translate}}">                    
-            </div>            
-            <div id="headerMessage" class="bold"></div>
-
-            <div d2-menu></div>
-
-        </div>
+        <d2-header-bar></d2-header-bar>
         
         <div ng-view></div>
         

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/app.js	2014-12-15 14:00:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/app.js	2015-01-28 19:03:29 +0000
@@ -16,7 +16,7 @@
           'd2Controllers',
 		  'angularLocalStorage', 
 		  'pascalprecht.translate',
-          'd2Menu'])
+          'd2HeaderBar'])
               
 .value('DHIS2URL', '..')
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html	2015-01-20 14:36:12 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html	2015-01-28 19:03:29 +0000
@@ -126,15 +126,7 @@
 
     </head>
     <body>
-        <div id="header" ng-controller="HeaderController">
-            <div class="container-heading">
-                <img ng-click="home()" id="headerBanner" src="../dhis-web-commons/css/light_blue/logo_banner.png" style="cursor:pointer" title="{{'dhis2_home'| translate}}">                    
-            </div>            
-            <div id="headerMessage" class="bold"></div>
-            
-            <div d2-menu></div>
-
-        </div>    
+        <d2-header-bar></d2-header-bar>
 
         <div class="container-1" data-ng-view=''></div>    
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/app.js	2014-12-19 16:55:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/app.js	2015-01-28 19:03:29 +0000
@@ -17,7 +17,7 @@
          'd2Controllers',
          'angularLocalStorage',
          'ui.select2',
-         'd2Menu',
+         'd2HeaderBar',
          'ngCsv',
          'nvd3ChartDirectives',
          'pascalprecht.translate'])

=== 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 17:14:10 +0000
+++ 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
@@ -1075,6 +1075,7 @@
                     var ctrl = $scope;
                     var baseUrl = dhis2.settings.getBaseUrl();
                     var defaultStyle = 'light_blue';
+                    var defaultStylesheetUrl = 'light_blue/light_blue.css';
                     var stylesLocation = 'dhis-web-commons/css';
 
                     ctrl.headerBar = {
@@ -1126,11 +1127,11 @@
                     }
 
                     function setHeaderTitle(applicationTitle) {
-                        ctrl.headerBar.title = applicationTitle || '';
+                        ctrl.headerBar.title = applicationTitle || 'District Health Information Software 2';
                     }
 
                     function setHeaderLink(startModule) {
-                        ctrl.headerBar.link = [baseUrl, startModule, 'index.action'].join('/');
+                        ctrl.headerBar.link = [baseUrl, startModule || 'dhis-web-dashboard-integration', 'index.action'].join('/');
                     }
 
                     function requestUserStyle() {
@@ -1144,7 +1145,7 @@
                     }
 
                     function getStylesheetUrl(stylesheet) {
-                        return [baseUrl, stylesLocation, stylesheet].join('/');
+                        return [baseUrl, stylesLocation, stylesheet || defaultStylesheetUrl].join('/');
                     }
 
                     function getStyleName(userStyle) {