← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13113: remove list activeitem highlight when deselecting menu on the list

 

------------------------------------------------------------
revno: 13113
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-12-03 09:20:15 +0100
message:
  remove list activeitem highlight when deselecting menu on the list
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-03 07:59:35 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.contextmenu.js	2013-12-03 08:20:15 +0000
@@ -83,6 +83,8 @@
   });
 
   $list.on('click.context', 'td', function( e ) {
+    $list.find('td').removeClass(config.menuItemActiveClass);
+
     if( $menu.is(":visible") ) {
       $menu.hide();
       return false;
@@ -93,7 +95,6 @@
 
     var $target = $(e.target);
 
-    $list.find('td').removeClass(config.menuItemActiveClass);
     $target.addClass(config.menuItemActiveClass);
 
     $.each(config.listItemProps, function( idx, val ) {