dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28942
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14538: Merge from Mark Polak. Top menu fixes.
Merge authors:
Mark Polak (markpo)
------------------------------------------------------------
revno: 14538 [merge]
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-03-30 22:47:31 +0200
message:
Merge from Mark Polak. Top menu fixes.
modified:
dhis-2/dhis-services/dhis-service-i18n/src/main/resources/i18n_global.properties
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/modules.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/green/green.css
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/india/india.css
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css
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/vietnam/vietnam.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.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-services/dhis-service-i18n/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-services/dhis-service-i18n/src/main/resources/i18n_global.properties 2014-03-26 09:44:22 +0000
+++ dhis-2/dhis-services/dhis-service-i18n/src/main/resources/i18n_global.properties 2014-03-30 20:47:31 +0000
@@ -782,5 +782,4 @@
app_order_custom=My own order (Custom)
-app_order_name_asc=Name (Ascending)
-app_order_name_desc=Name (Descending)
+app_order_name_alpha=Alphabetical
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/modules.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/modules.vm 2014-03-19 23:35:11 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/modules.vm 2014-03-30 10:32:05 +0000
@@ -6,9 +6,8 @@
<i class="fa fa-arrows"></i> $i18n.getString( "app_draggable_description" )
</p>
<select id="menuOrderBy">
- <option selected value="custom">-- $i18n.getString( "app_order_custom" ) --</option>
- <option value="name-asc">$i18n.getString( "app_order_name_asc" )</option>
- <option value="name-desc">$i18n.getString( "app_order_name_desc" )</option>
+ <option selected value="custom">$i18n.getString( "app_order_custom" )</option>
+ <option value="name-asc">$i18n.getString( "app_order_name_alpha" )</option>
</select>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/green/green.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/green/green.css 2014-03-25 21:41:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/green/green.css 2014-03-30 20:47:31 +0000
@@ -81,113 +81,6 @@
font-size: 16px;
}
-#menuLinkArea
-{
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-
-.menuLink
-{
- height: 44px;
- width: 100px;
- font-size: 9pt;
- text-align: center;
- line-height: 44px;
- cursor: pointer;
- color: #fff;
-}
-
-a.menuLink:hover
-{
- text-decoration: none;
-}
-
-#menuLink1
-{
- position: absolute;
- left: 695px;
-}
-
-#menuLink2
-{
- position: absolute;
- left: 795px;
-}
-
-#menuLink3
-{
- position: absolute;
- left: 895px;
-}
-
-#menuDropDown1
-{
- position: absolute;
- top: 44px;
- left: 695px;
-}
-
-#menuDropDown2
-{
- position: absolute;
- top: 44px;
- left: 795px;
-}
-
-#menuDropDown3
-{
- position: absolute;
- top: 44px;
- left: 795px;
-}
-
-.menuDropDownArea
-{
- font-size: 9pt;
- color: #fff;
- border-right: 1px solid #3f5841;
- border-bottom: 1px solid #3f5841;
- border-left: 1px solid #3f5841;
- padding-left: 4px;
- padding-right: 4px;
- width: 189px;
- max-height: 610px;
- overflow-y: auto;
- background-color: #467e4a;
- display: none;
- z-index: 10;
- border-bottom-left-radius: 3px;
- border-bottom-right-radius: 3px;
- box-shadow: #ccc 0px 1px 1px 0px;
-}
-
-.menuDropDownBox
-{
- list-style-type: none;
- padding: 0;
- margin: 10px 0;
-}
-
-.menuDropDownBox a
-{
- display: block;
- padding-top: 8px;
- padding-left: 10px;
- padding-bottom: 7px;
- padding-right: 10px;
- color: #fff;
- border-radius: 3px;
- cursor: pointer;
-}
-
-.menuDropDownBox a:hover
-{
- text-decoration: none;
- background-color: #679a6d;
-}
-
/*----------------------------------------------------------------------------*/
/* DropDown Menu */
/*----------------------------------------------------------------------------*/
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/india/india.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/india/india.css 2014-03-25 21:41:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/india/india.css 2014-03-30 20:47:31 +0000
@@ -81,113 +81,6 @@
font-size: 16px;
}
-#menuLinkArea
-{
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-
-.menuLink
-{
- height: 44px;
- width: 100px;
- font-size: 9pt;
- text-align: center;
- line-height: 44px;
- cursor: pointer;
- color: #fff;
-}
-
-a.menuLink:hover
-{
- text-decoration: none;
-}
-
-#menuLink1
-{
- position: absolute;
- left: 695px;
-}
-
-#menuLink2
-{
- position: absolute;
- left: 795px;
-}
-
-#menuLink3
-{
- position: absolute;
- left: 895px;
-}
-
-#menuDropDown1
-{
- position: absolute;
- top: 44px;
- left: 695px;
-}
-
-#menuDropDown2
-{
- position: absolute;
- top: 44px;
- left: 795px;
-}
-
-#menuDropDown3
-{
- position: absolute;
- top: 44px;
- left: 795px;
-}
-
-.menuDropDownArea
-{
- font-size: 9pt;
- color: #fff;
- border-right: 1px solid #888;
- border-bottom: 1px solid #888;
- border-left: 1px solid #888;
- padding-left: 4px;
- padding-right: 4px;
- width: 189px;
- max-height: 610px;
- overflow-y: auto;
- background-color: #518a0f;
- display: none;
- z-index: 10;
- border-bottom-left-radius: 3px;
- border-bottom-right-radius: 3px;
- box-shadow: #ccc 0px 1px 1px 0px;
-}
-
-.menuDropDownBox
-{
- list-style-type: none;
- padding: 0;
- margin: 10px 0;
-}
-
-.menuDropDownBox a
-{
- display: block;
- padding-top: 8px;
- padding-left: 10px;
- padding-bottom: 7px;
- padding-right: 10px;
- color: #fff;
- border-radius: 3px;
- cursor: pointer;
-}
-
-.menuDropDownBox a:hover
-{
- text-decoration: none;
- background-color: #f5790b;
-}
-
/*----------------------------------------------------------------------------*/
/* DropDown Menu */
/*----------------------------------------------------------------------------*/
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css 2014-03-25 21:41:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css 2014-03-30 20:47:31 +0000
@@ -81,113 +81,6 @@
font-size: 16px;
}
-#menuLinkArea
-{
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-
-.menuLink
-{
- height: 44px;
- width: 100px;
- font-size: 9pt;
- text-align: center;
- line-height: 44px;
- cursor: pointer;
- color: #fff;
-}
-
-a.menuLink:hover
-{
- text-decoration: none;
-}
-
-#menuLink1
-{
- position: absolute;
- left: 695px;
-}
-
-#menuLink2
-{
- position: absolute;
- left: 795px;
-}
-
-#menuLink3
-{
- position: absolute;
- left: 895px;
-}
-
-#menuDropDown1
-{
- position: absolute;
- top: 44px;
- left: 695px;
-}
-
-#menuDropDown2
-{
- position: absolute;
- top: 44px;
- left: 795px;
-}
-
-#menuDropDown3
-{
- position: absolute;
- top: 44px;
- left: 795px;
-}
-
-.menuDropDownArea
-{
- font-size: 9pt;
- color: #fff;
- border-right: 1px solid #888;
- border-bottom: 1px solid #888;
- border-left: 1px solid #888;
- padding-left: 4px;
- padding-right: 4px;
- width: 189px;
- max-height: 610px;
- overflow-y: auto;
- background-color: #276696;
- display: none;
- z-index: 10;
- border-bottom-left-radius: 3px;
- border-bottom-right-radius: 3px;
- box-shadow: #ccc 0 1px 1px 0;
-}
-
-.menuDropDownBox
-{
- list-style-type: none;
- padding: 0;
- margin: 10px 0;
-}
-
-.menuDropDownBox a
-{
- display: block;
- padding-top: 8px;
- padding-left: 10px;
- padding-bottom: 7px;
- padding-right: 10px;
- color: #fff;
- border-radius: 3px;
- cursor: pointer;
-}
-
-.menuDropDownBox a:hover
-{
- text-decoration: none;
- background-color: #4A89BA;
-}
-
/*----------------------------------------------------------------------------*/
/* DropDown Menu */
/*----------------------------------------------------------------------------*/
=== 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-25 21:53:50 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/menu.css 2014-03-30 20:47:31 +0000
@@ -1,3 +1,75 @@
+#menuLinkArea
+{
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+
+.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;
+ color: #fff;
+ border-right: 1px solid #888;
+ border-bottom: 1px solid #888;
+ border-left: 1px solid #888;
+ padding-left: 4px;
+ padding-right: 4px;
+ width: 189px;
+ max-height: 610px;
+ overflow-y: auto;
+ background-color: #276696;
+ display: none;
+ z-index: 10;
+ filter: alpha(opacity=94);
+ opacity: 0.94;
+ border-bottom-left-radius: 3px;
+ border-bottom-right-radius: 3px;
+ box-shadow: #ccc 0 1px 1px 0;
+}
+
+.menuDropDownBox
+{
+ list-style-type: none;
+ padding: 0;
+ margin: 10px 0;
+}
+
+.menuDropDownBox a
+{
+ display: block;
+ padding-top: 8px;
+ padding-left: 10px;
+ padding-bottom: 7px;
+ padding-right: 10px;
+ color: #fff;
+ border-radius: 3px;
+ cursor: pointer;
+}
+
+.menuDropDownBox a:hover
+{
+ text-decoration: none;
+ background-color: #4A89BA;
+}
+
+/****************************************************/
+
.app-menu:after {
clear: both;
content: "";
@@ -56,6 +128,11 @@
.app-menu .app-menu-item:hover {
border: 1px dashed #9ec5df;
background-color: #e9f5fb;
+ box-shadow: none;
+ -moz-box-shadow: none;
+ -o-box-shadow: none;
+ -ie-box-shadow: none;
+ -webkit-box-shadow: none;
}
.app-menu-item-description {
@@ -72,7 +149,7 @@
/**
* When hovered display the description and hide the favorites icon
*/
-.app-menu li:hover a .app-menu-item-description {
+ .app-menu li:hover a .app-menu-item-description {
position: absolute;
top: 0;
right: 0;
@@ -87,11 +164,18 @@
border-radius: 5px;
}
+.app-menu li.ui-sortable-helper:hover a .app-menu-item-description {
+ display: none;
+}
+
+.app-menu li.ui-sortable-helper:hover a {
+ background-color: rgba(49, 98, 197, 0.50);
+}
+
.app-menu-item .app-menu-item-description span {
color: #7fc9fd;
display: block;
font-size: 1em;
- font-weight: bold;
padding: 0;
padding-bottom: 5px;
margin: 0;
@@ -102,6 +186,7 @@
}
.app-menu a.app-menu-item .fa.fa-bookmark {
+ color: #276696;
font-size: 2em;
position: absolute;
right: 15px;
@@ -130,10 +215,6 @@
top: 5px;
}
-#menuLink1 {
- left: 762px;
-}
-
/**
* App menu dropdown box
*/
@@ -221,6 +302,7 @@
border-radius: 5px;
display: table-cell;
vertical-align: middle;
+ text-decoration: none;
}
.apps-menu-more a:hover {
@@ -228,18 +310,18 @@
background-color: #4A89BA;
}
+.menu-placeholder {
+ width: 100%;
+ text-align: center;
+ vertical-align: middle;
+}
+
/**
* Overrides
* TODO: Merge these with the main stylesheet
*/
#menuDropDown1 {
- top: 55px;
- left: 603px;
-}
-#menuDropDown3 {
- top: 55px;
- left: 733px;
}
hr.app-separator {
@@ -253,10 +335,36 @@
#menuDropDown1 .caret-up-background,
#menuDropDown1 .caret-up-border {
- left: 182px;
+ left: 296px;
}
#menuDropDown3 .caret-up-background,
#menuDropDown3 .caret-up-border {
- left: 182px;
+ left: 292px;
+}
+
+.drop-down-menu-link {
+ cursor: pointer;
+ display: block;
+}
+
+#menuLinkArea {
+ max-width: 1300px;
+}
+
+#menuLinkArea li {
+ float: right;
+}
+
+.show-menu {
+ display: block;
+}
+
+/*
+ * Media queries for the menu
+ */
+@media only screen and (max-width: 590px) {
+ #headerText {
+ display: none;
+ }
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/vietnam/vietnam.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/vietnam/vietnam.css 2014-03-25 21:41:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/vietnam/vietnam.css 2014-03-30 20:47:31 +0000
@@ -81,113 +81,6 @@
font-size: 16px;
}
-#menuLinkArea
-{
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-
-.menuLink
-{
- height: 44px;
- width: 100px;
- font-size: 9pt;
- text-align: center;
- line-height: 44px;
- cursor: pointer;
- color: #fff;
-}
-
-a.menuLink:hover
-{
- text-decoration: none;
-}
-
-#menuLink1
-{
- position: absolute;
- left: 695px;
-}
-
-#menuLink2
-{
- position: absolute;
- left: 795px;
-}
-
-#menuLink3
-{
- position: absolute;
- left: 895px;
-}
-
-#menuDropDown1
-{
- position: absolute;
- top: 44px;
- left: 695px;
-}
-
-#menuDropDown2
-{
- position: absolute;
- top: 44px;
- left: 795px;
-}
-
-#menuDropDown3
-{
- position: absolute;
- top: 44px;
- left: 795px;
-}
-
-.menuDropDownArea
-{
- font-size: 9pt;
- color: #fff;
- border-right: 1px solid #888;
- border-bottom: 1px solid #888;
- border-left: 1px solid #888;
- padding-left: 4px;
- padding-right: 4px;
- width: 189px;
- max-height: 610px;
- overflow-y: auto;
- background-color: #b91010;
- display: none;
- z-index: 10;
- border-bottom-left-radius: 3px;
- border-bottom-right-radius: 3px;
- box-shadow: #ccc 0px 1px 1px 0px;
-}
-
-.menuDropDownBox
-{
- list-style-type: none;
- padding: 0;
- margin: 10px 0;
-}
-
-.menuDropDownBox a
-{
- display: block;
- padding-top: 8px;
- padding-left: 10px;
- padding-bottom: 7px;
- padding-right: 10px;
- color: #fff;
- border-radius: 3px;
- cursor: pointer;
-}
-
-.menuDropDownBox a:hover
-{
- text-decoration: none;
- background-color: #cf4343;
-}
-
/*----------------------------------------------------------------------------*/
/* DropDown Menu */
/*----------------------------------------------------------------------------*/
=== 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-24 21:37:25 +0000
+++ 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
@@ -357,7 +357,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>${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>${description}</div>';
markup += ' </a>';
markup += '</li>';
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js 2014-01-22 12:06:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js 2014-03-30 10:32:05 +0000
@@ -57,6 +57,39 @@
{
hideDropDownTimeout();
} );
+
+
+ $('.drop-down-menu-link').get().forEach(function (element, index, elements) {
+ var id = $(element).parent().attr('id'),
+ dropdown_menu = $('div#' + id.split('_')[0]);
+
+ $(element).click(function () {
+ var open = false;
+
+ return function () {
+ if (open === true) {
+ $(dropdown_menu).attr('data-clicked-open', 'false');
+ hideDropDown();
+ open = false;
+ } else {
+ $(dropdown_menu).attr('data-clicked-open', 'true');
+ showDropDown(dropdown_menu.attr('id'));
+ open = true;
+ }
+ }
+ }());
+ });
+
+ $(window).resize(function () {
+ $('.app-menu-dropdown').get().forEach(function (element, index, elements) {
+ var newDropDownId = '#' + $(element).attr('id'),
+ position = $(newDropDownId + '_button').position();
+
+ $(newDropDownId).css('position', 'absolute');
+ $(newDropDownId).css('top', '55px');
+ $(newDropDownId).css('left', Math.ceil(position.left - Math.ceil(parseInt($(newDropDownId).innerWidth(), 10) - 108)) + 'px');
+ });
+ });
}
function setTableStyles()
@@ -88,10 +121,16 @@
function showDropDown( id )
{
+ var newDropDownId = "#" + id,
+ position = $(newDropDownId + '_button').position();
+
cancelHideDropDownTimeout();
-
- var newDropDownId = "#" + id;
-
+
+ $(newDropDownId).css('position', 'absolute');
+ $(newDropDownId).css('top', '55px');
+ $(newDropDownId).css('left', Math.ceil(position.left - Math.ceil(parseInt($(newDropDownId).innerWidth(), 10) - 108)) + 'px');
+
+
if ( dropDownId != newDropDownId )
{
hideDropDown();
@@ -106,6 +145,9 @@
{
if ( dropDownId )
{
+ if ($( dropDownId ).attr( 'data-clicked-open' ) === 'true') {
+ return;
+ }
$( dropDownId ).hide();
dropDownId = null;
=== 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-19 23:35:11 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2014-03-30 10:58:16 +0000
@@ -87,26 +87,26 @@
</span>
<ul id="menuLinkArea">
- <li>
- <a id="menuLink1" href="../dhis-web-commons-about/modules.action" class="menuLink">
- <i class="fa fa-th"></i>$i18n.getString( "applications" )
- </a>
- </li>
- <li>
- <a id="menuLink3" href="../dhis-web-commons-about/functions.action" class="menuLink">
+ <li id="menuDropDown3_button">
+ <a id="menuLink3" class="menuLink 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">
+ <i class="fa fa-th"></i>$i18n.getString( "applications" )
+ </a>
+ </li>
</ul>
- <div id="menuDropDown1" class="menuDropDownArea app-menu-dropdown" >
+ <div id="menuDropDown1" class="menuDropDownArea app-menu-dropdown menuLink1_menu" >
<div class="caret-up-border"></div>
<div class="caret-up-background"></div>
- <ul class="menuDropDownBox"></ul>
+ <ul class="menuDropDownBox"><li class="menu-placeholder"><img src="../images/ajax-loader-bar.gif"></li></ul>
<div class="apps-menu-more"><a href="../dhis-web-commons-about/modules.action">$i18n.getString( "more_applications" )</a></div>
</div>
- <div id="menuDropDown3" class="menuDropDownArea app-menu-dropdown">
+ <div id="menuDropDown3" class="menuDropDownArea app-menu-dropdown ui-helper-clearfix menuLink3_menu">
<div class="caret-up-border"></div>
<div class="caret-up-background"></div>
<ul class="menuDropDownBox">