← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 637: update new way for sort dataelement in datadictionery module

 

------------------------------------------------------------
revno: 637
committer: Tran Thanh Tri <Tran Thanh Tri@compaq>
branch nick: trunk
timestamp: Tue 2009-09-08 13:42:19 +0700
message:
  update new way for sort dataelement in datadictionery module
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/sortDataElementForm.vm
  local/vn/dhis-web-vn-report/src/main/webapp/dhis-web-vn-report/reportItems.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-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/sortDataElementForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/sortDataElementForm.vm	2009-03-31 20:02:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/sortDataElementForm.vm	2009-09-08 06:42:19 +0000
@@ -1,22 +1,35 @@
 
 <h3>$i18n.getString( "data_element_sort_order" )</h3>
 
-<form id="sortOrderForm" action="saveDataElementSortOrder.action" method="post">
-    
-<p>
-<input type="button" value="$i18n.getString( 'move_up' )" style="width:130px" onclick="moveUpSelectedOption( 'dataElements' )"><input 
-type="button" value="$i18n.getString( 'move_down' )" style="width:130px" onclick="moveDownSelectedOption( 'dataElements' )"><input
-type="button" value="$i18n.getString( 'move_to_top' )" style="width:130px" onclick="moveSelectedOptionToTop( 'dataElements' )"><input
-type="button" value="$i18n.getString( 'move_to_bottom' )" style="width:130px" onclick="moveSelectedOptionToBottom( 'dataElements' )">
-</p>
+<form id="sortOrderForm" action="saveDataElementSortOrder.action" method="post"> 
+<table>
+	<tr>
+		<th>$i18n.getString( "data_element" )</th>
+		<th></th>
+		<th>$i18n.getString( "data_element_sort_order" )</th>
+	</tr>
+	<tr>
+		<td>
+			<select multiple id="sourceSataElements" size="25" ondblclick="moveSelectedById('sourceSataElements','targetDataElements');" style="min-width:400px;">
+				#foreach ( $element in $dataElements )
+				<option value="$element.id">$element.name</option>
+				#end
+			</select>
+		</td>
+		<td>
+			<input type="button" value=">" onclick="moveSelectedById('sourceSataElements','targetDataElements');"/><br>
+			<input type="button" value="<" onclick="moveSelectedById('targetDataElements' , 'sourceSataElements' );"/><br>
+			<input type="button" value=">>" onclick="moveAllById('sourceSataElements' , 'targetDataElements' );"/><br>
+			<input type="button" value="<<" onclick="moveAllById('targetDataElements' , 'sourceSataElements' );"/>
+		</td>
+		<td>
+			<select multiple id="targetDataElements" name="dataElements" size="25" style="min-width:400px;" ondblclick="moveSelectedById('targetDataElements' , 'sourceSataElements' );">
+				
+			</select>
+		</td>
+	</tr>
+</table>
 
-<p>
-<select multiple id="dataElements" name="dataElements" size="25" style="width:680px">
-#foreach ( $element in $dataElements )
-    <option value="$element.id">$element.name</option>
-#end
-</select>
-</p>
 
 <p>
 <input type="button" value="$i18n.getString( 'save' )" style="width:130px" onclick="submitForm()"><input 
@@ -28,7 +41,9 @@
 <script type="text/javascript">
     function submitForm()
     {
-        selectAllById( "dataElements" );
+		moveAllById('sourceSataElements' , 'targetDataElements' );
+        selectAllById( "targetDataElements" );
         document.getElementById( "sortOrderForm" ).submit();
     }
+	
 </script>

=== modified file 'local/vn/dhis-web-vn-report/src/main/webapp/dhis-web-vn-report/reportItems.vm'
--- local/vn/dhis-web-vn-report/src/main/webapp/dhis-web-vn-report/reportItems.vm	2009-09-07 16:54:40 +0000
+++ local/vn/dhis-web-vn-report/src/main/webapp/dhis-web-vn-report/reportItems.vm	2009-09-08 06:42:19 +0000
@@ -128,6 +128,8 @@
 </div>
 </form>
 
+
+
 <!-- This form use for  Calculation -->
 
 <div id="calculation" style="position:fixed;display:none;width:800px;z-index:10002;background-color: white;border: medium solid silver;height:300px;padding:20px;">