dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07882
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2329: DataSet Locking - Applied the improving orgunit tree in common from Tri. Thanks so much.
------------------------------------------------------------
revno: 2329
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-10-07 16:15:41 +0700
message:
DataSet Locking - Applied the improving orgunit tree in common from Tri. Thanks so much.
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeMultipleSelect.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/CollectiveDataLockingAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingForm.vm
--
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/oust/selectionTreeMultipleSelect.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeMultipleSelect.vm 2010-10-07 08:40:58 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeMultipleSelect.vm 2010-10-07 09:15:41 +0000
@@ -25,7 +25,7 @@
<input type="button" value="$i18n.getString( 'unselect_in_group' )" onclick="unSelectOrganisationUnitByGroup()" style="width:12em">
<input type="button" value="$i18n.getString( 'select_all' )" onclick="selectAllTree()" style="width:12em"/>
<input type="button" value="$i18n.getString( 'select_children' )" onclick="selectChildren()" style="width:12em"/>
- <div id="selectionTree" style="padding:5px;"></div>
+ <div id="selectionTree" style="padding:5px;width:100%"></div>
</div>
</div>
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/CollectiveDataLockingAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/CollectiveDataLockingAction.java 2010-10-06 21:15:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/CollectiveDataLockingAction.java 2010-10-07 09:15:41 +0000
@@ -53,11 +53,6 @@
public class CollectiveDataLockingAction
implements Action
{
-
- private static final String SELECTED = "selected";
-
- private static final String CHILDTREE = "childtree";
-
Collection<Period> periods = new ArrayList<Period>();
Collection<DataSet> dataSets = new ArrayList<DataSet>();
@@ -144,13 +139,6 @@
this.selectBetweenLockUnlock = selectBetweenLockUnlock;
}
- private String selectionValue = new String();
-
- public void setSelectionValue( String selectionValue )
- {
- this.selectionValue = selectionValue;
- }
-
// -------------------------------------------------------------------------
// Input
// -------------------------------------------------------------------------
@@ -183,25 +171,9 @@
Set<Source> selectedSources = new HashSet<Source>();
selectedOrganisationUnits = selectionTreeManager.getSelectedOrganisationUnits();
-
- if ( selectionValue.equalsIgnoreCase( SELECTED ) )
- {
- selectedSources = organisationUnitService.convert( selectedOrganisationUnits );
-
- this.executeCollectiveDataLock( selectedSources, currentUserName );
- }
- else if ( selectionValue.equalsIgnoreCase( CHILDTREE ) )
- {
- selectedSources = new HashSet<Source>();
-
- for ( OrganisationUnit organisationUnitsElement : selectedOrganisationUnits )
- {
- selectedSources.addAll( organisationUnitService.convert( organisationUnitService
- .getOrganisationUnitWithChildren( organisationUnitsElement.getId() ) ) );
- }
-
- this.executeCollectiveDataLock( selectedSources, currentUserName );
- }
+ selectedSources = organisationUnitService.convert( selectedOrganisationUnits );
+
+ this.executeCollectiveDataLock( selectedSources, currentUserName );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingForm.vm 2010-10-06 21:15:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingForm.vm 2010-10-07 09:15:41 +0000
@@ -4,7 +4,7 @@
validation( 'lockingForm', function( form )
{
validateCollectiveDataLockingForm( form );
- } );
+ });
});
</script>
@@ -75,22 +75,14 @@
<tr>
<td>#organisationUnitSelectionTree( true, true, false )</td>
</tr>
- <tr></tr>
- </table>
- <table>
+ <tr></tr>
<tr>
<td>
- <select id="selectionValue" name="selectionValue" enabled="true">
- <option value="selected" selected>$i18n.getString( "selected" )</option>
- <option value="childtree">$i18n.getString( "child_tree" )</option>
- </select>
- </td>
- <td>
<input type="submit" id="lock" name="lock" onclick="setClickedButtonElementValue( true )" value="$i18n.getString( 'lock' )" style="width:10em" disabled="true"/>
<input type="submit" id="unlock" name="unlock" onclick="setClickedButtonElementValue( false )" value="$i18n.getString( 'unlock' )" style="width:10em" disabled="true"/>
</td>
</tr>
- </table>
+ </table>
</form>
<span id="message"></span>