=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2014-07-15 20:49:30 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2014-07-15 21:26:02 +0000 @@ -109,8 +109,7 @@ $( ".item" ).droppable( { accept: ".item", - over: dhis2.db.dropOver, - out: dhis2.db.dropOut + over: dhis2.db.dropOver } ); $( ".dropItem" ).droppable( { @@ -143,20 +142,15 @@ dhis2.db.dropOver = function( event, ui ) { + $( ".dropItem" ).not( "#dropLast" ).hide(); var itemId = $( this ).attr( "id" ); var dropItemId = "drop-" + itemId; $( "#" + dropItemId ).show(); } -dhis2.db.dropOut = function( event, ui ) -{ - var itemId = $( this ).attr( "id" ); - var dropItemId = "drop-" + itemId; - $( "#" + dropItemId ).hide(); -} - dhis2.db.lastDropOver = function( event, ui ) { + $( ".dropItem" ).not( "#dropLast" ).hide(); $( this ).removeClass( "blankDropItem" ).css( "display", "block" ); }