dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13014
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4093: implemented ajax-load in data dictionary
------------------------------------------------------------
revno: 4093
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-07-07 14:08:34 +0300
message:
implemented ajax-load in data dictionary
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/GetDataDictionaryMembersAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataDictionaryForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataDictionaryForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.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-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js 2011-06-19 17:25:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js 2011-07-07 11:08:34 +0000
@@ -240,7 +240,12 @@
$.getJSON(settings.filter.source, function(json)
{
$filter_select.empty();
- $filter_select.append("<option>All</option>");
+
+ if( settings.filter.label !== undefined ) {
+ $filter_select.append("<option>[ All / " + settings.filter.label + " ]</option>");
+ } else {
+ $filter_select.append("<option>[ All ]</option>");
+ }
$.each(json[settings.filter.iterator], function(i, item)
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/GetDataDictionaryMembersAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/GetDataDictionaryMembersAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/GetDataDictionaryMembersAction.java 2011-07-07 11:08:34 +0000
@@ -35,16 +35,13 @@
import org.hisp.dhis.datadictionary.DataDictionary;
import org.hisp.dhis.datadictionary.DataDictionaryService;
import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.indicator.IndicatorService;
import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
import com.opensymphony.xwork2.Action;
/**
* @author Lars Helge Overland
- * @version $Id$
*/
public class GetDataDictionaryMembersAction
implements Action
@@ -53,20 +50,6 @@
// Dependencies
// -------------------------------------------------------------------------
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- private IndicatorService indicatorService;
-
- public void setIndicatorService( IndicatorService indicatorService )
- {
- this.indicatorService = indicatorService;
- }
-
private DataDictionaryService dataDictionaryService;
public void setDataDictionaryService( DataDictionaryService dataDictionaryService )
@@ -125,13 +108,6 @@
return selectedDataElements;
}
- private List<DataElement> availableDataElements = new ArrayList<DataElement>();
-
- public List<DataElement> getAvailableDataElements()
- {
- return availableDataElements;
- }
-
private List<Indicator> selectedIndicators = new ArrayList<Indicator>();
public List<Indicator> getSelectedIndicators()
@@ -139,13 +115,6 @@
return selectedIndicators;
}
- private List<Indicator> availableIndicators = new ArrayList<Indicator>();
-
- public List<Indicator> getAvailableIndicators()
- {
- return availableIndicators;
- }
-
private DataDictionary dataDictionary;
public DataDictionary getDataDictionary()
@@ -176,20 +145,6 @@
displayPropertyHandler.handle( selectedIndicators );
}
- // ---------------------------------------------------------------------
- // Get available elements
- // ---------------------------------------------------------------------
-
- availableDataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
- availableDataElements.removeAll( selectedDataElements );
- Collections.sort( availableDataElements, dataElementComparator );
- displayPropertyHandler.handle( availableDataElements );
-
- availableIndicators = new ArrayList<Indicator>( indicatorService.getAllIndicators() );
- availableIndicators.removeAll( selectedIndicators );
- Collections.sort( availableIndicators, indicatorComparator );
- displayPropertyHandler.handle( availableIndicators );
-
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml 2011-06-23 14:44:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml 2011-07-07 11:08:34 +0000
@@ -512,12 +512,6 @@
<bean id="org.hisp.dhis.dd.action.datadictionary.GetDataDictionaryMembersAction" class="org.hisp.dhis.dd.action.datadictionary.GetDataDictionaryMembersAction"
scope="prototype">
- <property name="dataElementService">
- <ref bean="org.hisp.dhis.dataelement.DataElementService" />
- </property>
- <property name="indicatorService">
- <ref bean="org.hisp.dhis.indicator.IndicatorService" />
- </property>
<property name="dataDictionaryService">
<ref bean="org.hisp.dhis.datadictionary.DataDictionaryService" />
</property>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataDictionaryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataDictionaryForm.vm 2011-03-30 11:04:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataDictionaryForm.vm 2011-07-07 11:08:34 +0000
@@ -1,4 +1,49 @@
<script type="text/javascript" src="javascript/addDataDictionaryForm.js"></script>
+<script type="text/javascript">
+ jQuery(function() {
+ jQuery("#availableDataElements").dhisAjaxSelect({
+ source: "../dhis-web-commons-ajax-json/getDataElements.action",
+ iterator: "dataElements",
+ connectedTo: 'selectedDataElements',
+ handler: function(item) {
+ var option = jQuery("<option data-id='" + item.groups + "' />");
+ option.text( item.name );
+ option.attr( "value", item.id );
+
+ return option;
+ },
+ filter: {
+ source: "../dhis-web-commons-ajax-json/getDataElementGroups.action",
+ label: 'dataelement group',
+ iterator: "dataElementGroups",
+ handler: function(item) {
+ return "<option data-key='id' data-value='" + item.id + "'>" + item.name + "</option>";
+ }
+ }
+ });
+
+ jQuery("#availableIndicators").dhisAjaxSelect({
+ source: "../dhis-web-commons-ajax-json/getIndicators.action",
+ iterator: "indicators",
+ connectedTo: 'selectedIndicators',
+ handler: function(item) {
+ var option = jQuery("<option data-id='" + item.groups + "' />");
+ option.text( item.name );
+ option.attr( "value", item.id );
+
+ return option;
+ },
+ filter: {
+ source: "../dhis-web-commons-ajax-json/getIndicatorGroups.action",
+ iterator: "indicatorGroups",
+ label: 'indicator group',
+ handler: function(item) {
+ return "<option data-key='id' data-value='" + item.id + "'>" + item.name + "</option>";
+ }
+ }
+ });
+ });
+</script>
<h3>$i18n.getString( "create_new_data_dictionary" )</h3>
@@ -8,17 +53,20 @@
<tr>
<th colspan="2">$i18n.getString( "details" )</th>
</tr>
+
<tr>
<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td><input type="text" id="name" name="name" style="width:20em"/></td>
+ <td><input type="text" id="name" name="name" style="width:28em"/></td>
</tr>
+
<tr>
<td><label for="description">$i18n.getString( "description" )</label></td>
- <td><textarea id="description" name="description" style="width:20em; height:8em"></textarea></td>
+ <td><textarea id="description" name="description" style="width:28em; height:8em"></textarea></td>
</tr>
+
<tr>
<td><label for="region">$i18n.getString( "region" )</label></td>
- <td><input type="text" id="region" name="region" style="width:20em"/></td>
+ <td><input type="text" id="region" name="region" style="width:28em"/></td>
</tr>
<tr>
<td colspan="2" height="15px"></td>
@@ -26,76 +74,64 @@
</table>
<table>
+ <col style="width: 450px"/>
+ <col/>
+ <col style="width: 450px"/>
+
<tr>
<th>$i18n.getString( "available_data_elements" )</th>
- <td></td>
+ <th></th>
<th>$i18n.getString( "selected_data_elements" )
<select id="memberValidator" style="display:none"/>
</th>
</tr>
- <tr>
- <td><input type="text" id="availableDataElementsFilter" onkeyup="filterList( this.value, 'availableDataElements' )" style="width:100%"/></td>
- <td style="text-align:center">$i18n.getString( "filters" )</td>
- <td><input type="text" id="selectedDataElementsFilter" onkeyup="filterList( this.value, 'selectedDataElements' )" style="width:100%"/></td>
- </tr>
+
<tr>
<td>
- <select id="availableDataElements" name="availableDataElements" size="2" multiple="multiple" style="min-width:25em; height:20em" ondblclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )">
- #foreach( $dataElement in $availableDataElements )
- <option value="$dataElement.id">$encoder.htmlEncode( $dataElement.name )</option>
- #end
- </select>
+ <select id="availableDataElements" name="availableDataElements" 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="moveSelectedById( 'availableDataElements', 'selectedDataElements' )"/><br/>
- <input type="button" value="<" title="$i18n.getString('remove_selected')" style="width:50px" onclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )"/><br/>
- <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="moveAllById( 'availableDataElements', 'selectedDataElements' )"/><br/>
- <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="moveAllById( 'selectedDataElements', 'availableDataElements' )"/>
- </td>
+
+ <td>
+ <input type="button" value=">" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableDataElements' );"/><br/>
+ <input type="button" value="<" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'selectedDataElements' );"/><br/>
+ <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableDataElements' );"/><br/>
+ <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'selectedDataElements' );"/>
+ </td>
+
<td>
- <select id="selectedDataElements" name="selectedDataElements" size="2" multiple="multiple" style="min-width:25em; height:20em" ondblclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )">
- </select>
+ <select id="selectedDataElements" name="selectedDataElements" multiple="multiple" style="height: 200px; width: 100%; margin-top: 45px;"></select>
</td>
</tr>
- <tr>
- <td colspan="2" height="15px"></td>
- </tr>
<tr>
<th>$i18n.getString( "available_indicators" )</th>
- <td></td>
- <th>$i18n.getString( "selected_indicators" )
- <select id="memberValidatorIn" style="display:none"/>
+ <th></th>
+ <th>
+ $i18n.getString( "selected_indicators" )<select id="memberValidatorIn" style="display:none"/>
</th>
</tr>
- <tr>
- <td><input type="text" id="availableIndicatorsFilter" onkeyup="filterList( this.value, 'availableIndicators' )" style="width:100%"/></td>
- <td style="text-align:center">$i18n.getString( "filters" )</td>
- <td><input type="text" id="selectedIndicatorsFilter" onkeyup="filterList( this.value, 'selectedIndicators' )" style="width:100%"/></td>
- </tr>
+
<tr>
<td>
- <select id="availableIndicators" name="availableIndicators" size="2" multiple="multiple" style="width:100%; height:20em" ondblclick="moveSelectedById( 'availableIndicators', 'selectedIndicators' )">
- #foreach( $indicator in $availableIndicators )
- <option value="$indicator.id">$encoder.htmlEncode( $indicator.name )</option>
- #end
- </select>
- </td>
- <td style="text-align:center">
- <input type="button" value=">" title="$i18n.getString('move_selected')" style="width:50px" onclick="moveSelectedById( 'availableIndicators', 'selectedIndicators' )"/><br/>
- <input type="button" value="<" title="$i18n.getString('remove_selected')" style="width:50px" onclick="moveSelectedById( 'selectedIndicators', 'availableIndicators' )"/><br/>
- <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="moveAllById( 'availableIndicators', 'selectedIndicators' )"/><br/>
- <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="moveAllById( 'selectedIndicators', 'availableIndicators' )"/>
- </td>
+ <select id="availableIndicators" name="availableIndicators" multiple="multiple" style="height: 200px; width: 100%;"></select>
+ </td>
+
+ <td>
+ <input type="button" value=">" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableIndicators' );"/><br/>
+ <input type="button" value="<" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'selectedIndicators' );"/><br/>
+ <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableIndicators' );"/><br/>
+ <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'selectedIndicators' );"/>
+ </td>
+
<td>
- <select id="selectedIndicators" name="selectedIndicators" size="2" multiple="multiple" style="width:100%; height:20em" ondblclick="moveSelectedById( 'selectedIndicators', 'availableIndicators' )">
- </select>
+ <select id="selectedIndicators" name="selectedIndicators" multiple="multiple" style="height: 200px; width: 100%; margin-top: 45px;"></select>
</td>
</tr>
</table>
<p>
- <input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/><input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='dataDictionary.action'" style="width:10em"/>
+ <input type="submit" value="$i18n.getString( 'add' )" style="width:10em" />
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='dataDictionary.action'" style="width:10em" />
</p>
</form>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataDictionaryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataDictionaryForm.vm 2011-03-30 11:04:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataDictionaryForm.vm 2011-07-07 11:08:34 +0000
@@ -1,6 +1,48 @@
<script type="text/javascript" src="javascript/updateDataDictionaryForm.js"></script>
<script type="text/javascript">
jQuery(document).ready( function(){
+ jQuery("#availableDataElements").dhisAjaxSelect({
+ source: "../dhis-web-commons-ajax-json/getDataElements.action",
+ iterator: "dataElements",
+ connectedTo: 'selectedDataElements',
+ handler: function(item) {
+ var option = jQuery("<option data-id='" + item.groups + "' />");
+ option.text( item.name );
+ option.attr( "value", item.id );
+
+ return option;
+ },
+ filter: {
+ source: "../dhis-web-commons-ajax-json/getDataElementGroups.action",
+ label: 'dataelement group',
+ iterator: "dataElementGroups",
+ handler: function(item) {
+ return "<option data-key='id' data-value='" + item.id + "'>" + item.name + "</option>";
+ }
+ }
+ });
+
+ jQuery("#availableIndicators").dhisAjaxSelect({
+ source: "../dhis-web-commons-ajax-json/getIndicators.action",
+ iterator: "indicators",
+ connectedTo: 'selectedIndicators',
+ handler: function(item) {
+ var option = jQuery("<option data-id='" + item.groups + "' />");
+ option.text( item.name );
+ option.attr( "value", item.id );
+
+ return option;
+ },
+ filter: {
+ source: "../dhis-web-commons-ajax-json/getIndicatorGroups.action",
+ iterator: "indicatorGroups",
+ label: 'indicator group',
+ handler: function(item) {
+ return "<option data-key='id' data-value='" + item.id + "'>" + item.name + "</option>";
+ }
+ }
+ });
+
checkValueIsExist( "name", "validateDataDictionary.action", {id: $dataDictionary.id});
});
</script>
@@ -19,15 +61,15 @@
</tr>
<tr>
<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $dataDictionary.name )" style="width:20em"/></td>
+ <td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $dataDictionary.name )" style="width:28em"/></td>
</tr>
<tr>
<td><label for="description">$i18n.getString( "description" )</label></td>
- <td><textarea id="description" name="description" style="width:20em; height:8em"/>$!encoder.htmlEncode( $dataDictionary.description )</textarea></td>
+ <td><textarea id="description" name="description" style="width:28em; height:8em"/>$!encoder.htmlEncode( $dataDictionary.description )</textarea></td>
</tr>
<tr>
<td><label for="region">$i18n.getString( "region" )</label></td>
- <td><input type="text" id="region" name="region" value="$!encoder.htmlEncode( $dataDictionary.region )" style="width:20em"/></td>
+ <td><input type="text" id="region" name="region" value="$!encoder.htmlEncode( $dataDictionary.region )" style="width:28em"/></td>
</tr>
<tr>
<td colspan="2" height="15px"></td>
@@ -35,70 +77,61 @@
</table>
<table>
+ <col style="width: 450px"/>
+ <col/>
+ <col style="width: 450px"/>
+
<tr>
<th>$i18n.getString( "available_data_elements" )</th>
- <td></td>
- <th>$i18n.getString( "selected_data_elements" )
- <select id="memberValidator" style="display:none"/></th>
- </tr>
- <tr>
- <td><input type="text" id="availableDataElementsFilter" onkeyup="filterList( this.value, 'availableDataElements' )" style="width:100%"/></td>
- <td style="text-align:center">$i18n.getString( "filters" )</td>
- <td><input type="text" id="selectedDataElementsFilter" onkeyup="filterList( this.value, 'selectedDataElements' )" style="width:100%"/></td>
- </tr>
+ <th></th>
+ <th>
+ $i18n.getString( "selected_data_elements" )<select id="memberValidator" style="display:none"/>
+ </th>
+ </tr>
+
<tr>
<td>
- <select id="availableDataElements" name="availableDataElements" size="2" multiple="multiple" style="min-width:25em; height:20em" ondblclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )">
- #foreach( $dataElement in $availableDataElements )
- <option value="$dataElement.id">$encoder.htmlEncode( $dataElement.name )</option>
- #end
- </select>
+ <select id="availableDataElements" name="availableDataElements" 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="moveSelectedById( 'availableDataElements', 'selectedDataElements' )"/><br/>
- <input type="button" value="<" title="$i18n.getString('remove_selected')" style="width:50px" onclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )"/><br/>
- <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="moveAllById( 'availableDataElements', 'selectedDataElements' )"/><br/>
- <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="moveAllById( 'selectedDataElements', 'availableDataElements' )"/>
- </td>
+
+ <td>
+ <input type="button" value=">" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableDataElements' );"/><br/>
+ <input type="button" value="<" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'selectedDataElements' );"/><br/>
+ <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableDataElements' );"/><br/>
+ <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'selectedDataElements' );"/>
+ </td>
+
<td>
- <select id="selectedDataElements" name="selectedDataElements" size="2" multiple="multiple" style="min-width:25em; height:20em" ondblclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )">
+ <select id="selectedDataElements" name="selectedDataElements" multiple="multiple" style="height: 200px; width: 100%; margin-top: 45px;">
#foreach( $dataElement in $selectedDataElements )
<option value="$dataElement.id">$encoder.htmlEncode( $dataElement.name )</option>
#end
</select>
</td>
</tr>
- <tr>
- <td colspan="2" height="15px"></td>
- </tr>
<tr>
<th>$i18n.getString( "available_indicators" )</th>
- <td></td>
- <th>$i18n.getString( "selected_indicators" )
- <select id="memberValidatorIn" style="display:none"/></th>
- </tr>
- <tr>
- <td><input type="text" id="availableIndicatorsFilter" onkeyup="filterList( this.value, 'availableIndicators' )" style="width:100%"/></td>
- <td style="text-align:center">$i18n.getString( "filters" )</td>
- <td><input type="text" id="selectedIndicatorsFilter" onkeyup="filterList( this.value, 'selectedIndicators' )" style="width:100%"/></td>
- </tr>
+ <th></th>
+ <th>
+ $i18n.getString( "selected_indicators" ) <select id="memberValidatorIn" style="display:none"/>
+ </th>
+ </tr>
+
<tr>
<td>
- <select id="availableIndicators" name="availableIndicators" size="2" multiple="multiple" style="width:100%; height:20em" ondblclick="moveSelectedById( 'availableIndicators', 'selectedIndicators' )">
- #foreach( $indicator in $availableIndicators )
- <option value="$indicator.id">$encoder.htmlEncode( $indicator.name )</option>
- #end
- </select>
+ <select id="availableIndicators" name="availableIndicators" 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="moveSelectedById( 'availableIndicators', 'selectedIndicators' )"/><br/>
- <input type="button" value="<" title="$i18n.getString('remove_selected')" style="width:50px" onclick="moveSelectedById( 'selectedIndicators', 'availableIndicators' )"/><br/>
- <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="moveAllById( 'availableIndicators', 'selectedIndicators' )"/><br/>
- <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="moveAllById( 'selectedIndicators', 'availableIndicators' )"/>
- </td>
+
+ <td>
+ <input type="button" value=">" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableIndicators' );"/><br/>
+ <input type="button" value="<" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'selectedIndicators' );"/><br/>
+ <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableIndicators' );"/><br/>
+ <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'selectedIndicators' );"/>
+ </td>
+
<td>
- <select id="selectedIndicators" name="selectedIndicators" size="2" multiple="multiple" style="width:100%; height:20em" ondblclick="moveSelectedById( 'selectedIndicators', 'availableIndicators' )">
+ <select id="selectedIndicators" name="selectedIndicators" multiple="multiple" style="height: 200px; width: 100%; margin-top: 45px;">
#foreach( $indicator in $selectedIndicators )
<option value="$indicator.id">$encoder.htmlEncode( $indicator.name )</option>
#end
@@ -108,7 +141,8 @@
</table>
<p>
- <input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/><input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='dataDictionary.action'" style="width:10em"/>
+ <input type="submit" value="$i18n.getString( 'save' )" style="width:10em" />
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='dataDictionary.action'" style="width:10em" />
</p>
</form>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm 2011-06-10 11:09:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm 2011-07-07 11:08:34 +0000
@@ -129,6 +129,7 @@
<col style="width: 450px"/>
<col/>
<col style="width: 450px"/>
+
<thead>
<tr>
<th>$i18n.getString( "available_indicators" )</th>
@@ -136,17 +137,20 @@
<th>$i18n.getString( "selected_indicators" )</th>
</tr>
</thead>
+
<tbody>
<tr>
<td>
<select id="availableIndicatorsList" multiple="multiple" style="height: 200px; width: 100%;"></select>
</td>
+
<td>
<input type="button" value=">" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableIndicatorsList' );"/><br/>
<input type="button" value="<" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'indicatorsSelectedList' );"/><br/>
<input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableIndicatorsList' );"/><br/>
<input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'indicatorsSelectedList' );"/>
</td>
+
<td>
<select id="indicatorsSelectedList" name="indicatorsSelectedList" multiple="multiple" style="height: 200px; width: 100%; margin-top: 45px;"></select>
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2011-06-18 13:55:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2011-07-07 11:08:34 +0000
@@ -102,12 +102,14 @@
<td>
<select id="availableDataElementsList" name="availableDataElementsList" multiple="multiple" style="height: 200px; width: 100%;"></select>
</td>
+
<td>
<input type="button" value=">" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableDataElementsList' );"/><br/>
<input type="button" value="<" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'dataElementsSelectedList' );"/><br/>
<input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableDataElementsList' );"/><br/>
<input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'dataElementsSelectedList' );"/>
</td>
+
<td>
<select id="dataElementsSelectedList" name="dataElementsSelectedList" multiple="multiple" style="height: 200px; width: 100%; margin-top: 45px;">
#foreach ( $availableDataElement in $dataElements )