dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12595
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3913: made analysisForm use ajax-loading (for dataSets)
------------------------------------------------------------
revno: 3913
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-06-15 12:09:05 +0200
message:
made analysisForm use ajax-loading (for dataSets)
modified:
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.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-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm 2011-03-18 14:58:26 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm 2011-06-15 10:09:05 +0000
@@ -1,5 +1,18 @@
<script type="text/javascript">
jQuery(document).ready(function(){
+ jQuery("#availableDataSets").dhisAjaxSelect({
+ source: "../dhis-web-commons-ajax-json/getDataSets.action",
+ iterator: "dataSets",
+ connectedTo: 'dataSets',
+ handler: function(item) {
+ var option = jQuery("<option />");
+ option.text( item.name );
+ option.attr( "value", item.id );
+
+ return option;
+ }
+ });
+
datePickerInRange( 'fromDate' , 'toDate' );
});
@@ -33,35 +46,33 @@
</tr>
</table>
- <table>
+<table style="margin-top: 15px; margin-bottom: 15px;">
+ <col style="width: 450px"/>
+ <col/>
+ <col style="width: 450px"/>
+
<tr>
<th style="min-width:325px;">$i18n.getString( "available_data_sets" )</th>
- <td></td>
+ <th></th>
<th style="min-width:325px;">$i18n.getString( "selected_data_sets" )</th>
</tr>
+
<tr>
<td>
- <select id="availableDataSets" name="availableDataSets" multiple="multiple" style="min-width:325px" size="8" ondblclick="moveSelectedById( 'availableDataSets', 'dataSets' )">
- #foreach ( $dataSet in $dataSets )
- <option value="$dataSet.id">$encoder.htmlEncode( "$dataSet.name" )</option>
- #end
- </select>
- </td>
- <td align="center">
- <input type="button" value=">" title="$i18n.getString( 'move_selected' )" style="width:40px" onclick="moveSelectedById( 'availableDataSets', 'dataSets' )"><br>
- <input type="button" value="<" title="$i18n.getString( 'move_all' )" style="width:40px" onclick="moveSelectedById( 'dataSets', 'availableDataSets' )"><br>
- <input type="button" value=">>" title="$i18n.getString( 'remove_selected' )" style="width:40px" onclick="moveAllById( 'availableDataSets', 'dataSets' )"><br>
- <input type="button" value="<<" title="$i18n.getString( 'remove_all' )" style="width:40px" onclick="moveAllById( 'dataSets', 'availableDataSets' )">
- </td>
- <td>
- <select id="dataSets" name="dataSets" multiple="multiple" style="min-width:325px" size="8" ondblclick="moveSelectedById( 'dataSets', 'availableDataSets' )">
- </select>
- </td>
- </tr>
- <tr>
- <td colspan="3" style="height:10px">
+ <select id="availableDataSets" name="availableDataSets" multiple="multiple" style="height: 200px; width: 100%;"></select>
+ </td>
+
+ <td style="text-align:center">
+ <input type="button" value=">" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableDataSets' );"/><br/>
+ <input type="button" value="<" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'dataSets' );"/><br/>
+ <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableDataSets' );"/><br/>
+ <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'dataSets' );"/>
</td>
- </tr>
+
+ <td>
+ <select id="dataSets" name="dataSets" multiple="multiple" style="height: 200px; width: 100%; margin-top: 22px">
+ </td>
+ </tr>
</table>
<table>