dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04586
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1535: Assign MultiDatasets to Orgunit - Working ...
------------------------------------------------------------
revno: 1535
committer: hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-03-03 13:40:08 +0700
message:
Assign MultiDatasets to Orgunit - Working ...
added:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/multiDataSet.js
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/NoAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module_vi_VN.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/showAssignMultiDataSetForm.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-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/NoAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/NoAction.java 2009-11-03 09:05:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/NoAction.java 2010-03-03 06:40:08 +0000
@@ -36,6 +36,11 @@
public class NoAction
extends ActionSupport
{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
public String execute()
{
return SUCCESS;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties 2010-02-02 13:21:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties 2010-03-03 06:40:08 +0000
@@ -105,4 +105,8 @@
section_management = Dataset Section management
intro_dataset = Create, update, view and delete data sets. A data set is a collection of data elements for which data is entered. This page also lets you define custom data entry screens and option lists.
intro_dataset_section = Create, update, view and delete data set sections. Sections can be inserted into data sets to make them more comprehensible.
-edit_compulsory_data_elements = Edit compulsory data elements
\ No newline at end of file
+edit_compulsory_data_elements = Edit compulsory data elements
+assign_multidataset = Assign multi-datasets to orgunit
+assign_multidataset_manage = Assign multi-datasets to orgunit Management
+available_datasets = Available DataSets
+selected_datasets = Selected DataSets
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module_vi_VN.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module_vi_VN.properties 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module_vi_VN.properties 2010-03-03 06:40:08 +0000
@@ -1,62 +1,66 @@
#DHIS2 resource - generated by I18n Resource Editor for locale "Vietnamese (Vietnam)"
#Tue Nov 14 14:21:44 ICT 2006
-routine=Routine
-frequency=Th\u1EDDi \u0111i\u1EC3m
-add_dataset=Th\u00EAm t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u
-cancel=H\u1EE7y b\u1ECF
-define_inheritance=\u0110\u1ECBnh ngh\u0129a s\u1EF1 k\u1EBF th\u1EEBa
-duplicate_names=T\u00EAn t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u \u0111\u00E3 \u0111\u01B0\u1EE3c d\u00F9ng
-specify_name=Vui l\u00F2ng ch\u1EC9 \u0111\u1ECBnh t\u00EAn
-name=T\u00EAn
-illegal_associations=M\u1ED9t t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u kh\u00F4ng th\u1EC3 \u0111\u01B0\u1EE3c g\u00E1n cho hai \u0111\u01A1n v\u1ECB m\u00E0 m\u1ED9t \u0111\u01A1n v\u1ECB l\u00E0 cha tr\u1EF1c ti\u1EBFp hay gi\u00E1n ti\u1EBFp c\u1EE7a \u0111\u01A1n v\u1ECB kia.
-no_orgunit_is_selected=Kh\u00F4ng c\u00F3 \u0111\u01A1n v\u1ECB n\u00E0o \u0111\u01B0\u1EE3c ch\u1ECDn
-selected_data_elements=Nh\u1EEFng ph\u1EA7n t\u1EED d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c ch\u1ECDn
-dataset_details=Chi ti\u1EBFt t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u
-all=T\u1EA5t c\u1EA3
-edit=S\u1EEDa
-show_details=Xem chi ti\u1EBFt
-operations=Thao t\u00E1c
-failed_to_delete=Kh\u00F4ng th\u1EC3 x\u00F3a.Kh\u00F4ng cho ph\u00E9p x\u00F3a dataset \u0111\u01B0\u1EE3c tham chi\u1EBFu b\u1EDFi dataset kh\u00E1c
-remove=X\u00F3a
-add_new=Th\u00EAm m\u1EDBi
-update_dataset=C\u1EADp nh\u1EADt t\u1EADp d\u1EEF li\u1EC7u
-add_new_dataset=Th\u00EAm m\u1EDBi t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u
-semi-permanent=Semi-permanent
-select_none=Kh\u00F4ng ch\u1ECDn
-edit_dataset=S\u1EEDa t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u
-confirm_delete=B\u1EA1n c\u00F3 ch\u1EAFc l\u00E0 mu\u1ED1n x\u00F3a t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u n\u00E0y kh\u00F4ng?
-id=Id
-dataset_menu=Dataset menu
-define=\u0110\u1ECBnh ngh\u0129a
-data_elements_defined_in_parent_dataset=Ph\u1EA7n t\u1EED d\u1EEF li\u1EC7u \u0111\u00E3 \u0111\u1ECBnh ngh\u0129a trong t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u cha
-select_level=Ch\u1ECDn c\u1EA5p
-number_of_data_elements=S\u1ED1 ph\u1EA7n t\u1EED d\u1EEF li\u1EC7u
-parent_dataset=T\u1EADp h\u1EE3p d\u1EEF li\u1EC7u cha
-available_data_elements=Ph\u1EA7n t\u1EED d\u1EEF li\u1EC7u c\u00F3 s\u1EB5n
-level_must_be_int=C\u1EA5p ph\u1EA3i l\u00E0 m\u1ED9t s\u1ED1 nguy\u00EAn
-group_filter=L\u1ECDc theo nh\u00F3m
-define_dataset_inheritance=\u0110\u1ECBnh ngh\u0129a s\u1EF1 k\u1EBF th\u1EEBa t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u
-define_dataset_associations=G\u00E1n t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u cho \u0111\u01A1n v\u1ECB
-assign=G\u00E1n
-define_associations=G\u00E1n t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u cho \u0111\u01A1n v\u1ECB
-dataset_management=Qu\u1EA3n l\u00FD t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u
-overview=T\u1ED5ng quan
-type=Lo\u1EA1i
-section_management = Quản lý section
-add_section=Thêm section
-dataset_list=Danh sách tập hợp dữ liệu
-label=Nhãn
-specify_label=Vui lòng nhập nhãn
-duplicate_section_names=Section này đã tồn tại.
-dataset=Tập hợp dữ liệu
-choose_dataset=Chưa chọn tập hợp dữ liệu
-sort_section=Sắp xếp section
-available_sections=Danh sách Section chưa sắp xếp
-selected_sections=Danh sách Section đã chọn
-apply=Cập nhật
-section_details=Chi tiết Section
-edit_section= Edit Section
-selected_section_elements= Danh sách Element đã chọn
-available_section_elements= Danh sách Element chưa chọn
-update_section= Cập nhật section
-
+routine = Routine
+frequency = Th\u1eddi \u0111i\u1ec3m
+add_dataset = Th\u00eam t\u1eadp h\u1ee3p d\u1eef li\u1ec7u
+cancel = H\u1ee7y b\u1ecf
+define_inheritance = \u0110\u1ecbnh ngh\u0129a s\u1ef1 k\u1ebf th\u1eeba
+duplicate_names = T\u00ean t\u1eadp h\u1ee3p d\u1eef li\u1ec7u \u0111\u00e3 \u0111\u01b0\u1ee3c d\u00f9ng
+specify_name = Vui l\u00f2ng ch\u1ec9 \u0111\u1ecbnh t\u00ean
+name = T\u00ean
+illegal_associations = M\u1ed9t t\u1eadp h\u1ee3p d\u1eef li\u1ec7u kh\u00f4ng th\u1ec3 \u0111\u01b0\u1ee3c g\u00e1n cho hai \u0111\u01a1n v\u1ecb m\u00e0 m\u1ed9t \u0111\u01a1n v\u1ecb l\u00e0 cha tr\u1ef1c ti\u1ebfp hay gi\u00e1n ti\u1ebfp c\u1ee7a \u0111\u01a1n v\u1ecb kia.
+no_orgunit_is_selected = Kh\u00f4ng c\u00f3 \u0111\u01a1n v\u1ecb n\u00e0o \u0111\u01b0\u1ee3c ch\u1ecdn
+selected_data_elements = Nh\u1eefng ph\u1ea7n t\u1eed d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c ch\u1ecdn
+dataset_details = Chi ti\u1ebft t\u1eadp h\u1ee3p d\u1eef li\u1ec7u
+all = T\u1ea5t c\u1ea3
+edit = S\u1eeda
+show_details = Xem chi ti\u1ebft
+operations = Thao t\u00e1c
+failed_to_delete = Kh\u00f4ng th\u1ec3 x\u00f3a.Kh\u00f4ng cho ph\u00e9p x\u00f3a dataset \u0111\u01b0\u1ee3c tham chi\u1ebfu b\u1edfi dataset kh\u00e1c
+remove = X\u00f3a
+add_new = Th\u00eam m\u1edbi
+update_dataset = C\u1eadp nh\u1eadt t\u1eadp d\u1eef li\u1ec7u
+add_new_dataset = Th\u00eam m\u1edbi t\u1eadp h\u1ee3p d\u1eef li\u1ec7u
+semi-permanent = Semi-permanent
+select_none = Kh\u00f4ng ch\u1ecdn
+edit_dataset = S\u1eeda t\u1eadp h\u1ee3p d\u1eef li\u1ec7u
+confirm_delete = B\u1ea1n c\u00f3 ch\u1eafc l\u00e0 mu\u1ed1n x\u00f3a t\u1eadp h\u1ee3p d\u1eef li\u1ec7u n\u00e0y kh\u00f4ng?
+id = Id
+dataset_menu = Dataset menu
+define = \u0110\u1ecbnh ngh\u0129a
+data_elements_defined_in_parent_dataset = Ph\u1ea7n t\u1eed d\u1eef li\u1ec7u \u0111\u00e3 \u0111\u1ecbnh ngh\u0129a trong t\u1eadp h\u1ee3p d\u1eef li\u1ec7u cha
+select_level = Ch\u1ecdn c\u1ea5p
+number_of_data_elements = S\u1ed1 ph\u1ea7n t\u1eed d\u1eef li\u1ec7u
+parent_dataset = T\u1eadp h\u1ee3p d\u1eef li\u1ec7u cha
+available_data_elements = Ph\u1ea7n t\u1eed d\u1eef li\u1ec7u c\u00f3 s\u1eb5n
+level_must_be_int = C\u1ea5p ph\u1ea3i l\u00e0 m\u1ed9t s\u1ed1 nguy\u00ean
+group_filter = L\u1ecdc theo nh\u00f3m
+define_dataset_inheritance = \u0110\u1ecbnh ngh\u0129a s\u1ef1 k\u1ebf th\u1eeba t\u1eadp h\u1ee3p d\u1eef li\u1ec7u
+define_dataset_associations = G\u00e1n t\u1eadp h\u1ee3p d\u1eef li\u1ec7u cho \u0111\u01a1n v\u1ecb
+assign = G\u00e1n
+define_associations = G\u00e1n t\u1eadp h\u1ee3p d\u1eef li\u1ec7u cho \u0111\u01a1n v\u1ecb
+dataset_management = Qu\u1ea3n l\u00fd t\u1eadp h\u1ee3p d\u1eef li\u1ec7u
+overview = T\u1ed5ng quan
+type = Lo\u1ea1i
+section_management = Quản lý section
+add_section = Thêm section
+dataset_list = Danh sách tập hợp dữ liệu
+label = Nhãn
+specify_label = Vui lòng nhập nhãn
+duplicate_section_names = Section này đã tồn tại.
+dataset = Tập hợp dữ liệu
+choose_dataset = Chưa chọn tập hợp dữ liệu
+sort_section = Sắp xếp section
+available_sections = Danh sách Section chưa sắp xếp
+selected_sections = Danh sách Section đã chọn
+apply = Cập nhật
+section_details = Chi tiết Section
+edit_section = Edit Section
+selected_section_elements = Danh sách Element đã chọn
+available_section_elements = Danh sách Element chưa chọn
+update_section = Cập nhật section
+assign_multidataset = G\u00e1n nhi\u1ec1u t\u1eadp h\u1ee3p d\u1eef li\u1ec7u
+assign_multidataset_manage = Qu\u1ea3n l\u00fd g\u00e1n \u0111a t\u1eadp h\u1ee3p d\u1eef li\u1ec7u cho c\u00e1c \u0111\u01a1n v\u1ecb
+available_datasets = T\u1eadp h\u1ee3p d\u1eef li\u1ec7u hi\u1ec7n c\u00f3
+selected_datasets = T\u1eadp h\u1ee3p d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c ch\u1ecdn
+filter = B\u1ed9 l\u1ecdc
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml 2010-03-03 04:33:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml 2010-03-03 06:40:08 +0000
@@ -322,7 +322,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-dataset/showAssignMultiDataSetForm.vm</param>
<param name="menu">/dhis-web-maintenance-dataset/menu.vm</param>
- <param name="javascripts">javascript/dataSet.js</param>
+ <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/multiDataSet.js</param>
</action>
</package>
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/multiDataSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/multiDataSet.js 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/multiDataSet.js 2010-03-03 06:40:08 +0000
@@ -0,0 +1,105 @@
+
+// ----------------------------------------------------------------------
+// List
+// ----------------------------------------------------------------------
+
+function initLists()
+{
+ var id;
+
+ var list = document.getElementById( 'selectedDataSets' );
+
+ for ( id in selectedDataSets )
+ {
+ list.add( new Option( selectedDataSets[id], id ), null );
+ }
+
+ list = document.getElementById( 'availableDataSets' );
+
+ for ( id in availableDataSets )
+ {
+ list.add( new Option( availableDataSets[id], id ), null );
+ }
+}
+
+function filterSelectedDataSets()
+{
+ var filter = document.getElementById( 'selectedDataSetsFilter' ).value;
+ var list = document.getElementById( 'selectedDataSets' );
+
+ list.options.length = 0;
+
+ for ( var id in selectedDataSets )
+ {
+ var value = selectedDataSets[id];
+
+ if ( value.toLowerCase().indexOf( filter.toLowerCase() ) != -1 )
+ {
+ list.add( new Option( value, id ), null );
+ }
+ }
+}
+
+function filterAvailableDataSets()
+{
+ var filter = document.getElementById( 'availableDataSetsFilter' ).value;
+ var list = document.getElementById( 'availableDataSets' );
+
+ list.options.length = 0;
+
+ for ( var id in availableDataSets )
+ {
+ var value = availableDataSets[id];
+
+ if ( value.toLowerCase().indexOf( filter.toLowerCase() ) != -1 )
+ {
+ list.add( new Option( value, id ), null );
+ }
+ }
+}
+
+function addSelectedDataSets()
+{
+ var list = document.getElementById( 'availableDataSets' );
+
+ while ( list.selectedIndex != -1 )
+ {
+ var selectedList = byId( 'selectedDataSets' );
+ var id = list.options[list.selectedIndex].value;
+
+ selectedDataSets[id] = availableDataSets[id];
+
+ addOptionToList( selectedList, id, selectedDataSets[id] );
+
+ list.remove( list.selectedIndex );
+
+ delete availableDataSets[id];
+ }
+
+ //Not filter anymore
+ //filterDataSetMembers();
+ //filterAvailableDataElements();
+}
+
+function removeDataSetMembers()
+{
+ var list = document.getElementById( 'selectedDataSets' );
+
+ while ( list.selectedIndex != -1 )
+ {
+ var availableList = byId( 'availableDataSets' );
+ var id = list.options[list.selectedIndex].value;
+
+ availableDataSets[id] = selectedDataSets[id];
+
+ addOptionToList( availableList, id, availableDataSets[id] );
+
+ list.remove( list.selectedIndex );
+
+ delete selectedDataSets[id];
+ }
+
+ //Not filter anymore
+ //filterDataSetMembers();
+ //filterAvailableDataElements();
+}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/showAssignMultiDataSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/showAssignMultiDataSetForm.vm 2010-03-03 04:33:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/showAssignMultiDataSetForm.vm 2010-03-03 06:40:08 +0000
@@ -1,4 +1,4 @@
-<h3>$i18n.getString( "assign_multidataset" )</h3>
+<h3>$i18n.getString( "assign_multidataset_manage" )</h3>
<form id="assignMultiDataSetForm" action="saveAssignMultiDataSetForOrgunit.action" method="post" >
@@ -7,22 +7,18 @@
<th>$i18n.getString( "available_datasets" )</th><td></td><th>$i18n.getString( "selected_datasets" )</th>
</tr>
<tr>
- <td><input type="text" id="availableDataSetsFilter" onkeyup="filterAvailableDataSets()" style="width:25em"></td>
+ <td><input type="text" id="availableDataSetsFilter" onkeyup="filterAvailableDataSets()" style="width:25em" /></td>
<td style="text-align:center">< $i18n.getString( "filters" ) ></td>
- <td><input type="text" id="selectedDataSetsFilter" onkeyup="filterSelectedDataSets()" style="width:25em"></td>
+ <td><input type="text" id="selectedDataSetsFilter" onkeyup="filterSelectedDataSets()" style="width:25em" /></td>
</tr>
<tr>
<td>
- <select id="availableDataSets" size="2" multiple="multiple" style="min-width:25em; height:25em" ondblclick="addSelectedDataSets()">
- #foreach($dataSet in $availableDataSets)
- <option value='$dataSet' >$encoder.htmlEncode( $dataSet.name )</option>
- #end
- </select>
+ <select id="availableDataSets" size="2" multiple="multiple" style="min-width:25em; height:25em" ondblclick="addSelectedDataSets()" />
</td>
<td style="text-align:center">
- <input type="button" value=">" title="$i18n.getString('move_selected')" onclick="addSelectedDataSets()"><br>
- <input type="button" value="<" title="$i18n.getString('remove_selected')" onclick="removeSelectedDataSets()">
+ <input type="button" value=">" title="$i18n.getString('move_selected')" onclick="addSelectedDataSets()" /><br/>
+ <input type="button" value="<" title="$i18n.getString('remove_selected')" onclick="removeSelectedDataSets()" />
</td>
<td>