=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js 2011-05-24 07:32:08 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js 2011-05-26 14:44:02 +0000 @@ -33,6 +33,13 @@ // Support functions // ----------------------------------------------- +// Array Remove - By John Resig (MIT Licensed) +Array.remove = function(array, from, to) { + var rest = array.slice((to || from) + 1 || array.length); + array.length = from < 0 ? array.length + from : from; + return array.push.apply(array, rest); +}; + /* perform dblclick action on the sourceId */ function dhisPaging_moveAllSelected(sourceId) { @@ -99,10 +106,11 @@ if( jQuery.isArray(settings[removeArray]) ) { var remove_idx = jQuery.inArray(option_id, settings[removeArray]); - settings[removeArray].splice(remove_idx, remove_idx+1); + Array.remove(settings[removeArray], remove_idx, remove_idx); + //settings[removeArray].splice(remove_idx, remove_idx+1); } }); - + if(settings[removeArray] && settings[removeArray].length > 0) { settings.params[removeArray] = settings[removeArray].join(","); } else { === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupsAction.java 2011-05-25 13:17:19 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupsAction.java 2011-05-26 14:44:02 +0000 @@ -33,6 +33,7 @@ import java.util.List; import org.hisp.dhis.dataelement.DataElementGroup; +import org.hisp.dhis.dataelement.DataElementGroupSet; import org.hisp.dhis.dataelement.DataElementService; import org.hisp.dhis.dataelement.comparator.DataElementGroupNameComparator; import org.hisp.dhis.paging.ActionPagingSupport; @@ -62,6 +63,13 @@ // Input & output // ------------------------------------------------------------------------- + private Integer includeDataElementGroupId; + + public void setIncludeDataElementGroupId( Integer includeDataElementGroupId ) + { + this.includeDataElementGroupId = includeDataElementGroupId; + } + private String key; public void setKey( String key ) @@ -110,6 +118,12 @@ if ( filterNoGroupSet ) { FilterUtils.filter( dataElementGroups, new DataElementGroupWithoutGroupSetFilter() ); + + if ( includeDataElementGroupId != null ) + { + DataElementGroupSet groupSet = dataElementService.getDataElementGroupSet( includeDataElementGroupId ); + dataElementGroups.addAll( groupSet.getMembers() ); + } } if ( removeDataElementGroups.size() > 0 ) === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupsAction.java 2011-05-25 13:19:47 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupsAction.java 2011-05-26 14:44:02 +0000 @@ -33,6 +33,7 @@ import java.util.List; import org.hisp.dhis.indicator.IndicatorGroup; +import org.hisp.dhis.indicator.IndicatorGroupSet; import org.hisp.dhis.indicator.IndicatorService; import org.hisp.dhis.indicator.comparator.IndicatorGroupNameComparator; import org.hisp.dhis.paging.ActionPagingSupport; @@ -61,6 +62,13 @@ // Input & Output // ------------------------------------------------------------------------- + private Integer includeIndicatorGroupSetId; + + public void setIncludeIndicatorGroupSetId( Integer includeIndicatorGroupId ) + { + this.includeIndicatorGroupSetId = includeIndicatorGroupId; + } + private String key; public void setKey( String key ) @@ -108,6 +116,12 @@ if ( filterNoGroupSet ) { FilterUtils.filter( indicatorGroups, new IndicatorGroupWIthoutGroupSetFilter() ); + + if ( includeIndicatorGroupSetId != null ) + { + IndicatorGroupSet groupSet = indicatorService.getIndicatorGroupSet( includeIndicatorGroupSetId ); + indicatorGroups.addAll( groupSet.getMembers() ); + } } if ( removeIndicatorGroups.size() > 0 ) === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitGroupsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitGroupsAction.java 2011-05-26 12:49:27 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitGroupsAction.java 2011-05-26 14:44:02 +0000 @@ -34,6 +34,7 @@ import org.hisp.dhis.organisationunit.OrganisationUnitGroup; import org.hisp.dhis.organisationunit.OrganisationUnitGroupService; +import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet; import org.hisp.dhis.organisationunit.comparator.OrganisationUnitGroupNameComparator; import org.hisp.dhis.paging.ActionPagingSupport; import org.hisp.dhis.system.filter.OrganisationUnitGroupWithoutGroupSetFilter; @@ -62,6 +63,13 @@ // Input & output // ------------------------------------------------------------------------- + private Integer includeOrganisationUnitGroupId; + + public void setIncludeOrganisationUnitGroupId( Integer includeOrganisationUnitGroupId ) + { + this.includeOrganisationUnitGroupId = includeOrganisationUnitGroupId; + } + private String key; public void setKey( String key ) @@ -112,6 +120,13 @@ if ( filterNoGroupSet ) { FilterUtils.filter( organisationUnitGroups, new OrganisationUnitGroupWithoutGroupSetFilter() ); + + if ( includeOrganisationUnitGroupId != null ) + { + OrganisationUnitGroupSet groupSet = organisationUnitGroupService + .getOrganisationUnitGroupSet( includeOrganisationUnitGroupId ); + organisationUnitGroups.addAll( groupSet.getOrganisationUnitGroups() ); + } } if ( removeOrganisationUnitGroups.size() > 0 ) === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupForm.vm 2011-05-24 17:04:43 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupForm.vm 2011-05-26 14:44:02 +0000 @@ -13,9 +13,9 @@ jQuery(function() { jQuery("#availableDataElementsList").dblclick(dhisPaging_availableList_dblclick("availableDataElementsList", "groupMembers", "removeDataElements")); jQuery("#groupMembers").dblclick(dhisPaging_selectedList_dblclick("groupMembers", "availableDataElementsList", "removeDataElements")); - + var removeDataElementsList = getRemoveDataElements(); - + jQuery("#availableDataElementsList").dhisPaging({ source: "../dhis-web-commons-ajax-json/getDataElements.action", iterator: "dataElements", === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupSet.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupSet.vm 2011-05-25 13:17:19 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupSet.vm 2011-05-26 14:44:02 +0000 @@ -29,6 +29,7 @@ removeDataElementGroups: removeDataElementGroupsList, params: { filterNoGroupSet: true, + includeDataElementGroupId: $dataElementGroupSet.id, removeDataElementGroups: removeDataElementGroupsList.join(",") } }); @@ -38,7 +39,9 @@

$i18n.getString( "update_dataelementgroupset" ) : $dataElementGroupSet.name

+ + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupSet.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupSet.vm 2011-05-25 13:17:19 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupSet.vm 2011-05-26 14:44:02 +0000 @@ -3,11 +3,11 @@ function getRemoveIndicatorGroups() { var list = [ #foreach( $indicatorGroup in $selectedGroups ) - ${indicatorGroup.id} + ${indicatorGroup.id}, #end ]; - return list; + return list; } jQuery(document).ready( function() { @@ -29,6 +29,7 @@ removeIndicatorGroups: removeIndicatorGroupsList, params: { filterNoGroupSet: true, + includeIndicatorGroupSetId: $indicatorGroupSet.id, removeIndicatorGroups: removeIndicatorGroupsList.join(",") } }); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm 2011-03-16 16:52:50 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm 2011-05-26 14:44:02 +0000 @@ -1,8 +1,30 @@ +

$i18n.getString( "create_new_org_unit_group_set" ) #openHelp( "ou_groupsets_edit" )

+
$i18n.getString( "details" )
@@ -35,50 +57,38 @@
$i18n.getString( "details" )
- - - + + + - + - - - - - + + + - - - - - - - -
$i18n.getString( "available_groups" ) $i18n.getString( "selected_groups" )
< $i18n.getString( "filters" ) >
- + -
-
-
- +
+
+
+
- +
- - -
+ +

+ + +

+
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupSetForm.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupSetForm.js 2011-04-11 11:36:18 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupSetForm.js 2011-05-26 14:44:02 +0000 @@ -1,6 +1,6 @@ jQuery(document).ready(function() { validation2('addOrganisationUnitGroupSetForm', function(form) { - validateAddOrganisationGroupSet(form) + form.submit(); }, { 'beforeValidateHandler' : function() { selectAllById('selectedGroups'); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupSetForm.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupSetForm.js 2011-04-11 11:36:18 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupSetForm.js 2011-05-26 14:44:02 +0000 @@ -1,6 +1,6 @@ jQuery(document).ready(function() { validation2('updateOrganisationUnitGroupSetForm', function(form) { - validateAddOrganisationGroupSet(form) + form.submit(); }, { 'beforeValidateHandler' : function() { selectAllById('selectedGroups'); @@ -8,9 +8,5 @@ 'rules' : getValidationRules("organisationUnitGroupSet") }); - checkValueIsExist("name", "validateOrganisationUnitGroupSet.action", { - id : $organisationUnitGroupSet.id - }); - changeCompulsory(getFieldValue('compulsory')); }); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm 2011-03-16 16:52:50 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm 2011-05-26 14:44:02 +0000 @@ -1,12 +1,53 @@

$i18n.getString( "edit_org_unit_group_set" ) #openHelp( "ou_groupsets_edit" )

+ + @@ -39,53 +80,42 @@
$i18n.getString( "details" )
- - - + + + - + - - - - - + + + - - - - - - - -
$i18n.getString( "available_groups" ) $i18n.getString( "selected_groups" )
< $i18n.getString( "filters" ) >
- + -
-
-
- +
+
+
+
- #foreach ( $group in $selectedGroups ) #end
- - -
+ +

+ + +

+