← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13583: minor change to context-menu, if switching the Y direction makes it goes outside the browser.. sw...

 

------------------------------------------------------------
revno: 13583
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-01-06 13:30:46 +0100
message:
  minor change to context-menu, if switching the Y direction makes it goes outside the browser.. switch back
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.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-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js	2013-12-30 18:38:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js	2014-01-06 12:30:46 +0000
@@ -127,6 +127,10 @@
 
     if( (menuHeight + pageY) > winHeight ) {
       pageY -= menuHeight;
+
+      if( pageY < 0 ) {
+          pageY = e.pageY;
+      }
     }
 
     $menu.css({left: pageX, top: pageY});