dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30318
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15392: Fixes menu in event-capture additionally adds menu scroll buttons
------------------------------------------------------------
revno: 15392
committer: Mark Polak <markpo@xxxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-05-24 10:58:21 +0200
message:
Fixes menu in event-capture additionally adds menu scroll buttons
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
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/fr.json
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html
--
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-05-08 20:57:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/menu.css 2014-05-24 08:58:21 +0000
@@ -328,18 +328,16 @@
width:100px;
}
-.apps-menu-more
-{
+.apps-menu-bottom-button {
display: table;
height: 34px;
padding-top: 8px;
text-align: center;
- width: 360px;
- margin-top: 5px;
+ margin-top: 5px;
+ float: left;
}
-.apps-menu-more a
-{
+.apps-menu-bottom-button a {
color: #4A89BA;
border: 1px solid #ccc;
background-color: #f5f5f7;
@@ -349,13 +347,28 @@
text-decoration: none;
}
-.apps-menu-more a:hover
+.apps-scroll {
+ width: 85px;
+ margin-left: 5px;
+}
+
+.apps-menu-bottom-button a:hover
{
color: #fff;
border: 1px solid #4A89BA;
background-color: #4A89BA;
}
+.apps-menu-more
+{
+ width: 180px;
+}
+
+.apps-menu-more a
+{
+
+}
+
.menu-placeholder
{
width: 100%;
=== 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-05-08 20:57:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.menu.js 2014-05-24 08:58:21 +0000
@@ -395,8 +395,6 @@
$('#appsDropDown').addClass('app-menu-dropdown ui-helper-clearfix');
$(selector).html('');
$.tmpl( "appMenuItemTemplate", apps).appendTo(selector);
- $('#appsDropDown .menu-drop-down-scroll .apps-menu-more').remove();
- $('.apps-menu-more').clone().css('display', 'table').addClass('ui-helper-clearfix').appendTo($('#appsDropDown .menu-drop-down-scroll'));
}
function renderAppManager(selector) {
@@ -621,16 +619,13 @@
* Adds a scrolling mechanism that makes space for the scrollbar and shows/hides the more apps button
*/
$('.menu-drop-down-scroll').scroll(function (event) {
- var self = $(this),
- moreAppsElement = $('#appsDropDown > .apps-menu-more');
+ var self = $(this);
if (self.scrollTop() < 10) {
- moreAppsElement.show();
self.parent().css('width', '360px');
self.parent().parent().css('width', '360px');
} else {
if (self.innerHeight() === 375 ) {
- moreAppsElement.hide();
self.parent().css('width', '384px');
self.parent().parent().css('width', '384px');
}
@@ -748,6 +743,31 @@
});
});
+ $('.apps-scroll-up').click(function (event) {
+ var scrollDistance = 330,
+ scrollTop = $('.menu-drop-down-scroll').scrollTop();
+
+ event.preventDefault();
+
+ $('.menu-drop-down-scroll').animate({
+ scrollTop: scrollTop - scrollDistance
+ }, 200);
+ });
+
+ $('.apps-scroll-down').click(function (event) {
+ var scrollDistance = 330,
+ scrollTop = $('.menu-drop-down-scroll').scrollTop();
+
+ event.preventDefault();
+
+ if (scrollTop < 110) {
+ scrollDistance += 40;
+ }
+ $('.menu-drop-down-scroll').animate({
+ scrollTop: scrollTop + scrollDistance
+ }, 200);
+ });
+
});
})(jQuery, dhis2.menu);
=== 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-05-06 09:20:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2014-05-24 08:58:21 +0000
@@ -133,7 +133,9 @@
<ul class="menuDropDownBox"><li class="menu-placeholder"><img src="../images/ajax-loader-bar.gif"></li></ul>
</div>
</div>
- <div class="apps-menu-more"><a href="../dhis-web-commons-about/modules.action">$i18n.getString( "more_applications" )</a></div>
+ <div class="apps-menu-bottom-button apps-menu-more"><a href="../dhis-web-commons-about/modules.action">$i18n.getString( "more_applications" )</a></div>
+ <div class="apps-menu-bottom-button apps-scroll apps-scroll-up"><a class="fa fa-caret-up" href="#"></a></div>
+ <div class="apps-menu-bottom-button apps-scroll apps-scroll-down"><a class="fa fa-caret-down" href="#"></a></div>
</div>
<div id="profileDropDown" class="menuDropDownArea app-menu-dropdown ui-helper-clearfix profileMenuLink_menu">
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json 2014-05-22 12:58:32 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json 2014-05-24 08:58:21 +0000
@@ -73,6 +73,7 @@
"profile": "Profile",
"applications": "Apps",
"more_applications": "More apps",
+ "search_apps": "Search apps",
"settings": "Settings",
"account": "Account",
"help": "Help",
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/fr.json'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/fr.json 2014-05-22 10:22:11 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/fr.json 2014-05-24 08:58:21 +0000
@@ -72,6 +72,7 @@
"profile": "Profil",
"applications": "Apps",
"more_applications": "Plus d'apps",
+ "search_apps": "Recherche d'apps",
"settings": "Paramètres",
"account": "Compte",
"help": "Aide",
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html 2014-05-22 12:58:32 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html 2014-05-24 08:58:21 +0000
@@ -100,10 +100,16 @@
<div class="caret-up-background"></div>
<div class="menu-drop-down-wrap">
<div class="menu-drop-down-scroll">
+ <div class="apps-search-wrap">
+ <input id="apps-search" class="apps-search" type="text" placeholder="{{'search_apps' | translate}}">
+ <span id="apps-search-clear" class="fa fa-times-circle"></span>
+ </div>
<ul class="menuDropDownBox"><li class="menu-placeholder"><img src="../images/ajax-loader-bar.gif"></li></ul>
</div>
</div>
- <div class="apps-menu-more"><a href="../dhis-web-commons-about/modules.action">{{'more_applications'| translate}}</a></div>
+ <div class="apps-menu-bottom-button apps-menu-more"><a href="../dhis-web-commons-about/modules.action">{{'more_applications'| translate}}</a></div>
+ <div class="apps-menu-bottom-button apps-scroll apps-scroll-up"><a class="fa fa-caret-up" href="#"></a></div>
+ <div class="apps-menu-bottom-button apps-scroll apps-scroll-down"><a class="fa fa-caret-down" href="#"></a></div>
</div>
<div id="profileDropDown" class="menuDropDownArea app-menu-dropdown ui-helper-clearfix profileMenuLink_menu">