dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34786
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17841: Fixed bug - Drill down context menu of Data Browser doesn't display.
------------------------------------------------------------
revno: 17841
committer: Tran Chau<tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-12-30 22:10:24 +0700
message:
Fixed bug - Drill down context menu of Data Browser doesn't display.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserGrid.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.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-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserGrid.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserGrid.vm 2014-05-31 11:11:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserGrid.vm 2014-12-30 15:10:24 +0000
@@ -1,8 +1,22 @@
<style type="text/css">
div#drillDownMenu
{
- position: absolute;
- display: none;
+ background-color: #f7f7f7;
+ border: 1px solid #ddd;
+ border-bottom-left-radius: 3px;
+ border-bottom-right-radius: 3px;
+ box-shadow: 0 1px 1px 0 #ccc;
+ color: #000;
+ font-size: 9pt;
+ max-height: 610px;
+ opacity: 0.98;
+ overflow-y: auto;
+ padding-left: 4px;
+ padding-right: 4px;
+ position: absolute;
+ width: 189px;
+ z-index: 9;
+ display:none;
}
th.formatLabel
@@ -10,15 +24,23 @@
text-align: center;
}
+.menuDropDownBox
+{
+ margin: 10px 0;
+ padding: 0;
+}
+
.menuDropDownBox li
{
- cursor:pointer
+ cursor:pointer;
+ padding: 10px 10px;
+ border-radius: 3px;
}
.menuDropDownBox li:hover
{
text-decoration: none;
- background-color: #4A89BA;
+ background-color: #eee;
}
</style>
@@ -75,7 +97,7 @@
<!-- Drill-down menu -->
-<div id="drillDownMenu" class="menuDropDownArea" onmouseover="cancelHideDropDownTimeout()" onmouseout="hideDropDownTimeout()">
+<div id="drillDownMenu" class="menuDropDownArea">
<ul class="menuDropDownBox">
<li onclick="viewDrillDownData( 'descendant_level' )">$i18n.getString( "view_data_at_descendant_levels" ) </li>
<li onclick="viewDrillDownData( 'current_level' )">$i18n.getString( "view_data_at_this_level" ) </li>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.js 2012-06-08 02:43:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.js 2014-12-30 15:10:24 +0000
@@ -120,4 +120,54 @@
var url = "exportResult.action?type=" + type;
window.location.href = url;
-}
\ No newline at end of file
+}
+
+
+// -----------------------------------------------------------------------------
+// Menu functions
+// -----------------------------------------------------------------------------
+
+var menuTimeout = 500;
+var closeTimer = null;
+var dropDownId = null;
+
+function showDropDown( id )
+{
+ cancelHideDropDownTimeout();
+
+ var newDropDownId = "#" + id;
+
+ if ( dropDownId != newDropDownId )
+ {
+ hideDropDown();
+
+ dropDownId = newDropDownId;
+
+ $( dropDownId ).show();
+ }
+}
+
+function hideDropDown()
+{
+ if ( dropDownId )
+ {
+ $( dropDownId ).hide();
+
+ dropDownId = null;
+ }
+}
+
+function hideDropDownTimeout()
+{
+ closeTimer = window.setTimeout( "hideDropDown()", menuTimeout );
+}
+
+function cancelHideDropDownTimeout()
+{
+ if ( closeTimer )
+ {
+ window.clearTimeout( closeTimer );
+
+ closeTimer = null;
+ }
+}