← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14582: Merge from Mark. Menu fixes.

 

Merge authors:
  Mark Polak (markpo)
------------------------------------------------------------
revno: 14582 [merge]
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-04-01 11:42:54 +0200
message:
  Merge from Mark. Menu fixes.
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/menu.css
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm


--
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/css/menu.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/menu.css	2014-03-30 21:39:17 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/menu.css	2014-03-31 19:15:33 +0000
@@ -10,33 +10,6 @@
     float: right;
 }
 
-.menuLink
-{
-    height: 44px;
-    width: 100px;
-    font-size: 9pt;
-    text-align: center;
-    line-height: 44px;
-    cursor: pointer;
-    color: #fff;
-}
-
-a.menuLink:hover
-{
-    text-decoration: none;
-}
-
-.menuDropDownArea
-{
-    font-size: 9pt;
-    border-right: 1px solid #888;
-    border-bottom: 1px solid #888;
-    border-left: 1px solid #888;
-    max-height: 610px;
-    display: none;
-    z-index: 10;
-}
-
 .menuDropDownBox
 {
     list-style-type: none;
@@ -57,8 +30,6 @@
     color: #000;
 }
 
-/****************************************************/
-
 .app-menu:after {
     clear: both;
     content: "";
@@ -165,6 +136,13 @@
     margin: 0;
 }
 
+.app-menu-item .app-menu-item-description p {
+    height: 35px;
+    margin: 0;
+    overflow: hidden;
+    padding: 0;
+}
+
 .app-menu li:hover a .fa.fa-bookmark {
     display: none;
 }
@@ -188,17 +166,28 @@
 /**
  * App menu item
  */
-.menuLink {
+.menu-link {
+    color: #fff;
+    cursor: pointer;
+    font-size: 9pt;
+    height: 44px;
+    line-height: 44px;
+    text-align: center;
     width: 105px;
 }
 
-.menuLink i.fa {
+.menu-link i.fa {
     font-size: 2em;
     padding-right: 10px;
     position: relative;
     top: 5px;
 }
 
+a.menu-link:hover
+{
+    text-decoration: none;
+}
+
 /**
  * App menu dropdown box
  */
@@ -208,9 +197,13 @@
     border-radius: 2px;
     box-shadow: rgba(0, 0, 0, 0.24) 0px 2px 8px 0px;
     color: #000;
+    display: none;
+    font-size: 9pt;
+    max-height: 610px;
     overflow-y: inherit;
     padding: 10px;
     width: 360px;
+    z-index: 10;
 }
 
 .app-menu-dropdown ul {

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.js	2014-03-30 10:58:16 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.js	2014-03-31 18:24:59 +0000
@@ -82,14 +82,13 @@
          **********************************************************************/
 
         function processTranslations(translations) {
-            var itemIndex,
-                items = dhis2.menu.getApps();
+            var items = dhis2.menu.getApps();
 
             items.forEach(function (element, index, items) {
                 if (element.id && translations[element.id]) {
                     items[index].name = translations.get(element.id);
                 }
-                if (element.description === '' && translations.get('intro_' + element.id) !== element.id){
+                if (element.description === '' && translations.get('intro_' + element.id) !== 'intro_' + element.id){
                     element.description = translations['intro_' + element.id];
                 }
             });
@@ -357,7 +356,7 @@
     markup += '  <a href="${defaultAction}" class="app-menu-item" title="${name}">';
     markup += '    <img src="${icon}" onError="javascript: this.onerror=null; this.src = \'../icons/program.png\';">';
     markup += '    <span>${name}</span>';
-    markup += '    <div class="app-menu-item-description"><span class="bold">${name}</span><i class="fa fa-arrows"></i>${description}</div>';
+    markup += '    <div class="app-menu-item-description"><span class="bold">${name}</span><i class="fa fa-arrows"></i><p>${description}</p></div>';
     markup += '  </a>';
     markup += '</li>';
 
@@ -425,9 +424,7 @@
 
                     //Render the dropdown menu
                     renderDropDownFavorites();
-                },
-                //Constrict the draggable elements to the parent element
-                containment: 'parent'
+                }
             };
 
         renderAppManager(selector);

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2014-03-30 10:58:16 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2014-03-31 19:15:33 +0000
@@ -88,12 +88,12 @@
       
       <ul id="menuLinkArea">
         <li id="menuDropDown3_button">
-            <a id="menuLink3" class="menuLink drop-down-menu-link">
+            <a id="menuLink3" class="menu-link drop-down-menu-link">
               <i class="fa fa-user"></i>$i18n.getString( "profile" )
           </a>
         </li>
         <li id="menuDropDown1_button">
-          <a id="menuLink1" class="menuLink drop-down-menu-link">
+          <a id="menuLink1" class="menu-link drop-down-menu-link">
             <i class="fa fa-th"></i>$i18n.getString( "applications" )
           </a>
           </li>