dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10044
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2737: Made it impossible to un-select organisation unit in the tree in data entry. Huge cause of confus...
------------------------------------------------------------
revno: 2737
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-01-25 10:45:14 +0100
message:
Made it impossible to un-select organisation unit in the tree in data entry. Huge cause of confusion for users when ie. double-clicking.
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.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/ouwt/ouwt.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js 2010-12-06 03:08:31 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js 2011-01-25 09:45:14 +0000
@@ -29,6 +29,7 @@
{
var listenerFunction;
var multipleSelectionAllowed = false;
+ var unselectAllowed = false;
this.setListenerFunction = function( listenerFunction_ )
{
@@ -39,6 +40,11 @@
{
multipleSelectionAllowed = allowed;
};
+
+ this.setUnselectAllowed = function( allowed )
+ {
+ unselectAllowed = allowed;
+ }
this.select = function( unitId )
{
@@ -46,7 +52,7 @@
var linkTags = unitTag.getElementsByTagName( 'a' );
- if ( linkTags[0].className == 'selected' )
+ if ( linkTags[0].className == 'selected' && unselectAllowed )
{
$.post(organisationUnitTreePath + "removeorgunit.action",{
id:unitId
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js 2010-12-16 13:23:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js 2011-01-25 09:45:14 +0000
@@ -8,6 +8,7 @@
}
selection.setListenerFunction( organisationUnitSelected );
+selection.setUnselectAllowed( true );
// -----------------------------------------------------------------------------
// View details