dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #02530
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 847: Put the sorting of dataelements and indicators back to like it was.
------------------------------------------------------------
revno: 847
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Sat 2009-10-10 18:04:11 +0200
message:
Put the sorting of dataelements and indicators back to like it was.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/SaveIndicatorSortOrderAction.java
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/sortIndicatorForm.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/java/org/hisp/dhis/dd/action/indicator/SaveIndicatorSortOrderAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/SaveIndicatorSortOrderAction.java 2009-08-20 08:17:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/SaveIndicatorSortOrderAction.java 2009-10-10 16:04:11 +0000
@@ -86,4 +86,3 @@
return SUCCESS;
}
}
-
=== 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-09-09 05:41:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/sortDataElementForm.vm 2009-10-10 16:04:11 +0000
@@ -1,44 +1,22 @@
<h3>$i18n.getString( "data_element_sort_order" )</h3>
-<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>
- <br>
- <a href="javascript:sortList( 'sourceSataElements', 'ASC' );"><img align="absmiddle" src="images/sort_ascending.png" style="border:#666666 thin solid;cursor:pointer;width:20px;"></a>
- <a href="javascript:sortList( 'sourceSataElements', 'DES' );"><img align="absmiddle" src="images/sort_descending.png" style="border:#666666 thin solid;cursor:pointer;width:20px;"></a>
- </td>
- <td align="center">
- <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>
- <br>
- <a href="javascript:sortList( 'targetDataElements', 'ASC' );"><img align="absmiddle" src="images/sort_ascending.png" style="border:#666666 thin solid;cursor:pointer;width:20px;"></a>
- <a href="javascript:sortList( 'targetDataElements', 'DES' );"><img align="absmiddle" src="images/sort_descending.png" style="border:#666666 thin solid;cursor:pointer;width:20px;"></a>
- </td>
- </tr>
-</table>
-<div style="position:fixed;top:200px;right:10px;background-color:#D9F674">
- <a href="javascript:moveSelectedOptionToTop( 'targetDataElements' );"><img align="absmiddle" src="../images/move_top.png" style="cursor:pointer;width:20px;"></a><br><br>
- <a href="javascript:moveUpSelectedOption( 'targetDataElements' );"><img align="absmiddle" src="../images/move_up.png" style="cursor:pointer;width:20px;"></a><br><br>
- <a href="javascript:moveDownSelectedOption( 'targetDataElements' );"><img align="absmiddle" src="../images/move_down.png" style="cursor:pointer;width:20px;"></a><br><br>
- <a href="javascript:moveSelectedOptionToBottom( 'targetDataElements' );"><img align="absmiddle" src="../images/move_bottom.png" style="cursor:pointer;width:20px;"></a>
-</div>
+<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>
+
+<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
@@ -50,9 +28,7 @@
<script type="text/javascript">
function submitForm()
{
- moveAllById('sourceSataElements' , 'targetDataElements' );
- selectAllById( "targetDataElements" );
+ selectAllById( "dataElements" );
document.getElementById( "sortOrderForm" ).submit();
}
-
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/sortIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/sortIndicatorForm.vm 2009-09-09 05:41:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/sortIndicatorForm.vm 2009-10-10 16:04:11 +0000
@@ -2,45 +2,22 @@
<h3>$i18n.getString( "indicator_sort_order" )</h3>
<form id="sortOrderForm" action="saveIndicatorSortOrder.action" method="post">
-
-<table>
- <tr>
- <th>$i18n.getString( "indicator" )</th>
- <th></th>
- <th>$i18n.getString( "indicator_sort_order" )</th>
- </tr>
- <tr>
- <td>
- <select multiple id="sourceIndicators" size="25" ondblclick="moveSelectedById('sourceIndicators','indicators');" style="min-width:400px;">
- #foreach ( $indicator in $indicators )
- <option value="$indicator.id">$indicator.name</option>
- #end
- </select>
- <br>
- <a href="javascript:sortList( 'sourceIndicators', 'ASC' );"><img align="absmiddle" src="images/sort_ascending.png" style="border:#666666 thin solid;cursor:pointer;width:20px;"></a>
- <a href="javascript:sortList( 'sourceIndicators', 'DES' );"><img align="absmiddle" src="images/sort_descending.png" style="border:#666666 thin solid;cursor:pointer;width:20px;"></a>
-
- </td>
- <td align="center">
- <input type="button" value=">" onclick="moveSelectedById('sourceIndicators','indicators');"/><br>
- <input type="button" value="<" onclick="moveSelectedById('indicators' , 'sourceIndicators' );"/><br>
- <input type="button" value=">>" onclick="moveAllById('sourceIndicators' , 'indicators' );"/><br>
- <input type="button" value="<<" onclick="moveAllById('indicators' , 'sourceIndicators' );"/>
- </td>
- <td>
- <select multiple id="indicators" name="indicators" size="25" style="min-width:400px;" ondblclick="moveSelectedById('indicators' , 'sourceIndicators' );"></select>
- <br>
- <a href="javascript:sortList( 'indicators', 'ASC' );"><img align="absmiddle" src="images/sort_ascending.png" style="border:#666666 thin solid;cursor:pointer;width:20px;"></a>
- <a href="javascript:sortList( 'indicators', 'DES' );"><img align="absmiddle" src="images/sort_descending.png" style="border:#666666 thin solid;cursor:pointer;width:20px;"></a>
- </td>
- </tr>
-</table>
- <div style="position:fixed;top:200px;right:10px;background-color:#D9F674">
- <a href="javascript:moveSelectedOptionToTop( 'indicators' );"><img align="absmiddle" src="../images/move_top.png" style="cursor:pointer;width:20px;"></a><br><br>
- <a href="javascript:moveUpSelectedOption( 'indicators' );"><img align="absmiddle" src="../images/move_up.png" style="cursor:pointer;width:20px;"></a><br><br>
- <a href="javascript:moveDownSelectedOption( 'indicators' );"><img align="absmiddle" src="../images/move_down.png" style="cursor:pointer;width:20px;"></a><br><br>
- <a href="javascript:moveSelectedOptionToBottom( 'indicators' );"><img align="absmiddle" src="../images/move_bottom.png" style="cursor:pointer;width:20px;"></a>
- </div>
+
+<p>
+<input type="button" value="$i18n.getString( 'move_up' )" style="width:130px" onclick="moveUpSelectedOption( 'indicators' )"><input
+type="button" value="$i18n.getString( 'move_down' )" style="width:130px" onclick="moveDownSelectedOption( 'indicators' )"><input
+type="button" value="$i18n.getString( 'move_to_top' )" style="width:130px" onclick="moveSelectedOptionToTop( 'indicators' )"><input
+type="button" value="$i18n.getString( 'move_to_bottom' )" style="width:130px" onclick="moveSelectedOptionToBottom( 'indicators' )">
+</p>
+
+<p>
+<select multiple id="indicators" name="indicators" size="25" style="width:680px">
+#foreach ( $indicator in $indicators )
+ <option value="$indicator.id">$indicator.name</option>
+#end
+</select>
+</p>
+
<p>
<input type="button" value="$i18n.getString( 'save' )" style="width:130px" onclick="submitForm()"><input
type="button" value="$i18n.getString( 'cancel' )" style="width:130px" onclick="window.location.href='indicator.action'">
@@ -51,7 +28,6 @@
<script type="text/javascript">
function submitForm()
{
- moveAllById('sourceIndicators' , 'indicators' );
selectAllById( "indicators" );
document.getElementById( "sortOrderForm" ).submit();
}