dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #03007
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1005: Import data value from excel file - Administrator - work in process.
------------------------------------------------------------
revno: 1005
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2009-11-09 14:34:00 +0700
message:
Import data value from excel file - Administrator - work in process.
added:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/sortedDataElementGroup.js
modified:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/GetExcelItemGroupByIdAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitemgroups.js
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/listDataElementGroupByExcelItemGroup.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/sortDataElementsForCategory.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-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/GetExcelItemGroupByIdAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/GetExcelItemGroupByIdAction.java 2009-10-27 06:05:22 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/GetExcelItemGroupByIdAction.java 2009-11-09 07:34:00 +0000
@@ -73,9 +73,9 @@
// -------------------------------------------------------------------------
public String execute() throws Exception {
-
+System.out.println("\n\n\n ==== id = " + id);
excelItemGroup = excelItemService.getExcelItemGroup(id);
-
+System.out.println("\n\n\n ==== excelItemGroup = " + excelItemGroup);
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java 2009-10-30 09:59:20 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java 2009-11-09 07:34:00 +0000
@@ -96,14 +96,16 @@
// -------------------------------------------
public String execute() throws Exception {
+
+ DataElementGroupOrder dataElementGroupOrder = excelItemService
+ .getDataElementGroupOrder(id.intValue());
- DataElementGroupOrder dataElementGroupOrder = excelItemService
- .getDataElementGroupOrder(id);
-
List<DataElement> dataElements = new ArrayList<DataElement>();
for (String dataElementId : this.dataElementIds) {
-
+System.out.println("\n\n === dataElementId = " + dataElementId);
+System.out.println("\n\n === dataElementId = " + Integer
+ .parseInt(dataElementId));
DataElement dataElement = dataElementService.getDataElement(Integer
.parseInt(dataElementId));
dataElements.add(dataElement);
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java 2009-10-30 09:59:20 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java 2009-11-09 07:34:00 +0000
@@ -30,17 +30,16 @@
import java.util.List;
import org.hisp.dhis.reportexcel.DataElementGroupOrder;
+import org.hisp.dhis.reportexcel.action.ActionSupport;
import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
-import com.opensymphony.xwork2.Action;
-
/**
* @author Chau Thu Tran
* @version $Id$
*/
-public class UpdateSortedDataElementGroupOrderForCategoryAction implements
- Action {
+public class UpdateSortedDataElementGroupOrderForCategoryAction extends
+ ActionSupport {
// -------------------------------------------
// Dependency
// -------------------------------------------
@@ -95,6 +94,8 @@
excelItemService.updateExcelItemGroup(excelItemGroup);
+ message = i18n.getString("success");
+
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2009-11-09 04:18:02 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2009-11-09 07:34:00 +0000
@@ -1109,8 +1109,8 @@
scope="prototype">
<property name="excelItemService"
ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
- <property name="organisationUnitGroupService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+ <property name="dataElementService"
+ ref="org.hisp.dhis.dataelement.DataElementService" />
</bean>
<bean
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml 2009-11-09 04:18:02 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml 2009-11-09 07:34:00 +0000
@@ -170,8 +170,8 @@
<action name="deleteDataElementGroupOrder"
class="org.hisp.dhis.reportexcel.category.action.DeleteDataElementGroupOrderAction">
- <result name="success" type="velocity-xml">
- /dhis-web-excel-reporting/responseSuccess.vm</result>
+ <result name="success" type="redirect">
+ listDataElementGroupOrder.action?id=${id}</result>
</action>
<action name="getDataElementGroupOrder"
@@ -827,7 +827,7 @@
<param name="page">/dhis-web-excel-reporting/listDataElementGroupByExcelItemGroup.vm</param>
<param name="menu">/dhis-web-excel-reporting/menu.vm</param>
<param name="javascripts">javascript/ui.core.js,javascript/ui.sortable.js,
- javascript/excelitemgroups.js,javascript/commons.js</param>
+ javascript/sortedDataElementGroup.js,javascript/commons.js</param>
<param name="stylesheets">style/ui.theme.css, style/basic.css, style/style.css</param>
</action>
@@ -841,7 +841,8 @@
<action name="updateDataElementGroupOrderForCategory"
class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateDataElementGroupOrderForCategoryAction">
<result name="success" type="redirect">
- listDataElementGroupOrderForExcelItemGroup.action?id=${id}</result>
+ listDataElementGroupOrderForExcelItemGroup.action?id=${id}
+ </result>
</action>
<action name="deleteDataElementGroupOrderForCategory"
@@ -861,6 +862,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-excel-reporting/sortDataElementsForCategory.vm</param>
<param name="menu">/dhis-web-excel-reporting/menu.vm</param>
+ <param name="javascripts">javascript/sortedDataElementGroup.js</param>
<param name="stylesheets">style/ui.theme.css,style/basic.css</param>
</action>
@@ -870,10 +872,10 @@
/dhis-web-excel-reporting/responseSuccess.vm</result>
</action>
- <action name="updateSortDataElementGroupOrderForCategory"
+ <action name="updateSortedDataElementGroupOrderForCategory"
class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateSortedDataElementGroupOrderForCategoryAction">
- <result name="success" type="redirect">
- listDataElementGroupOrder.action?id=${excelItemGroupId}</result>
+ <result name="success" type="velocity-xml">
+ /dhis-web-excel-reporting/responseSuccess.vm</result>
</action>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitemgroups.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitemgroups.js 2009-11-09 04:18:02 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitemgroups.js 2009-11-09 07:34:00 +0000
@@ -176,116 +176,4 @@
}
getDataElementsByGroup($("#availableDataElementGroups").val());
},'xml');
-}
-
-/*
-* Add Data Element Group Order
-*/
-function submitDataElementGroupOrder(){
-
- if($("#name").val()=='') setMessage(i18n_name_is_null);
- else{
- selectAllById('dataElementIds');
- document.forms['dataElementGroups'].submit();
- }
-}
-/*
-* Delete Data Element Order
-*/
-
-function deleteDataElementOrder( id ){
- if(window.confirm(i18n_confirm_delete)){
- $.post("deleteDataElementGroupOrderForCategory.action",{id:id}, function (data){window.location.reload()},'xml');
- }
-}
-
-/*
-* Open Update Data Element Order
-*/
-
-function openUpdateDataElementOrder( id ){
-
- $("#dataElementGroupOrderId").val( id );
- $.post("getDataElementGroupOrderForCategory.action",{id:id},
- function(data){
- var listDataElement = document.getElementById('dataElementIds');
- listDataElement.options.length = 0;
- data = data.getElementsByTagName('dataElementGroupOrder')[0];
- $("#name").val(data.getElementsByTagName('name')[0].firstChild.nodeValue);
- $("#code").val(data.getElementsByTagName('code')[0].firstChild.nodeValue);
- var dataElements = data.getElementsByTagName('dataElements')[0].getElementsByTagName('dataElement');
-
- for(var i=0;i<dataElements.length;i++){
- var name = dataElements[i].getElementsByTagName('name')[0].firstChild.nodeValue;
- var id = dataElements[i].getElementsByTagName('id')[0].firstChild.nodeValue;
-
- var option = new Option( name, id );
- option.onmousemove = function(e){
- showToolTip( e, this.text);
- }
-
- listDataElement.add(option, null);
- }
-
- document.forms['dataElementGroups'].action = "updateDataElementGroupOrderForCategory.action";
-
- getALLDataElementGroups();
- },'xml');
-}
-/*
-* Update Sorted Data Element
-*/
-function updateSortedDataElement(){
- var dataElements = document.getElementsByName('dataElement');
- var dataElementIds = new Array();
- for(var i=0;i<dataElements.length;i++){
- dataElementIds.push(dataElements.item(i).value);
- }
-
- $.post("updateSortedDataElementsForCategory.action",{
- id:id,
- dataElementIds:dataElementIds
- },function (data){
- history.go(-1);
- },'xml');
-}
-
-function updateDataElementGroupOrder(){
- var dataElements = document.getElementsByName('dataElementGroupOrder');
- var url = "updateSortDataElementGroupOrderForCategory.action?excelItemGroupId=" + $("#id").val();
- for(var i=0;i<dataElements.length;i++){
- url += "&dataElementGroupOrderId=" + dataElements.item(i).value;
- }
- window.location = url;
-
-}
-
-// -----------------------------------------------------------------------------
-function showToolTip( e, value){
-
- var tooltipDiv = byId('tooltip');
- tooltipDiv.style.display = 'block';
-
- var posx = 0;
- var posy = 0;
-
- if (!e) var e = window.event;
- if (e.pageX || e.pageY)
- {
- posx = e.pageX;
- posy = e.pageY;
- }
- else if (e.clientX || e.clientY)
- {
- posx = e.clientX;
- posy = e.clientY;
- }
-
- tooltipDiv.style.left= posx + 8 + 'px';
- tooltipDiv.style.top = posy + 8 + 'px';
- tooltipDiv.innerHTML = " " + value;
-}
-
-function hideToolTip(){
- byId('tooltip').style.display = 'none';
-}
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/sortedDataElementGroup.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/sortedDataElementGroup.js 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/sortedDataElementGroup.js 2009-11-09 07:34:00 +0000
@@ -0,0 +1,224 @@
+// -----------------------------------------------------------------------------
+// ----------------------- DATA ELEMENT GROUP ----------------------------------
+// -----------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+// Open Add Data Element Group
+// -----------------------------------------------------------------------------
+
+function openAddDataElementGroupOrder(){
+ getALLDataElementGroups();
+ document.forms['dataElementGroups'].action = "addDataElementGroupOrderForCategory.action";
+}
+
+// -----------------------------------------------------------------------------
+// Add DataElement Group
+// -----------------------------------------------------------------------------
+
+function submitDataElementGroupOrder(){
+
+ if($("#name").val()=='') setMessage(i18n_name_is_null);
+ else{
+ selectAllById('dataElementIds');
+ document.forms['dataElementGroups'].submit();
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Delete DataElement Group
+// -----------------------------------------------------------------------------
+
+function deleteDataElementGroupOrder( id ){
+ if(window.confirm(i18n_confirm_delete)){
+ $.post("deleteDataElementGroupOrderForCategory.action",{id:id}, function (data){window.location.reload()},'xml');
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Get All Data Element Group
+// -----------------------------------------------------------------------------
+
+function getALLDataElementGroups(){
+ $.get("getAllDataElementGroups.action",{},
+ function(data){
+ var availableDataElementGroups = document.getElementById('availableDataElementGroups');
+ availableDataElementGroups.options.length = 0;
+ var dataElementGroups = data.getElementsByTagName('dataElementGroups')[0].getElementsByTagName('dataElementGroup');
+ availableDataElementGroups.options.add(new Option("ALL", null));
+ for(var i=0;i<dataElementGroups.length;i++){
+ var id = dataElementGroups.item(i).getElementsByTagName('id')[0].firstChild.nodeValue;
+ var name = dataElementGroups.item(i).getElementsByTagName('name')[0].firstChild.nodeValue;
+ availableDataElementGroups.options.add(new Option(name, id));
+ }
+ getDataElementsByGroup($("#availableDataElementGroups").val());
+ },'xml');
+}
+
+// -----------------------------------------------------------------------------
+// Update Order of DataElement Group
+// -----------------------------------------------------------------------------
+
+function updateDataElementGroupOrder(){
+
+ var dataElements = document.getElementsByName('dataElementGroupOrder');
+ var url = "updateSortedDataElementGroupOrderForCategory.action?excelItemGroupId=" + $('#id').val();
+ for(var i=0;i<dataElements.length;i++){
+ url += "&dataElementGroupOrderId=" + dataElements.item(i).value;
+ }
+
+ var request = new Request();
+ request.setResponseTypeXML( 'reportXML' );
+ request.setCallbackSuccess( updateDataElementGroupOrderReceived );
+ request.send( url );
+}
+
+function updateDataElementGroupOrderReceived(xmlObject){
+
+ setMessage(xmlObject.firstChild.nodeValue);
+}
+
+// -----------------------------------------------------------------------------
+// ----------------------------- DATA ELEMENT ----------------------------------
+// -----------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+// Get DataElements by DataElement Group
+// -----------------------------------------------------------------------------
+
+function getDataElementsByGroup( id ){
+
+ if(id==null)
+ return;
+
+ var url = "../dhis-web-commons-ajax/getDataElements.action?id=" + id;
+
+ var request = new Request();
+ request.setResponseTypeXML( 'datalement' );
+ request.setCallbackSuccess( getDataElementsByGroupReceived );
+ request.send( url );
+}
+
+function getDataElementsByGroupReceived( datalement ){
+
+ var dataElements = datalement.getElementsByTagName( "dataElement" );
+
+ var listDataElement = document.getElementById('availableDataElements');
+
+ listDataElement.options.length = 0;
+
+ for ( var i = 0; i < dataElements.length; i++ )
+ {
+ var id = dataElements[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
+ var name = dataElements[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
+ var option = new Option(name, id);
+
+ option.onmousemove = function(e){
+ showToolTip( e, this.text);
+ }
+
+ listDataElement.add(option, null);
+ }
+
+ var availableDataElements = document.getElementById('availableDataElements');
+ var dataElementIds = document.getElementById('dataElementIds');
+ for(var i=0;i<availableDataElements.options.length;i++){
+ for(var j=0;j<dataElementIds.options.length;j++){
+ if(availableDataElements.options[i].value==dataElementIds.options[j].value){
+ availableDataElements.options[i].style.display='none';
+ }
+ }
+ }
+
+ $("#dataElementGroups").showAtCenter( true );
+}
+
+// -----------------------------------------------------------------------------
+// Open Update data element order
+// -----------------------------------------------------------------------------
+
+function openUpdateDataElementOrder( id ){
+
+ $("#dataElementGroupOrderId").val( id );
+ $.post("getDataElementGroupOrderForCategory.action",{id:id},
+ function(data){
+ var listDataElement = document.getElementById('dataElementIds');
+ listDataElement.options.length = 0;
+ data = data.getElementsByTagName('dataElementGroupOrder')[0];
+ $("#name").val(data.getElementsByTagName('name')[0].firstChild.nodeValue);
+ $("#code").val(data.getElementsByTagName('code')[0].firstChild.nodeValue);
+ var dataElements = data.getElementsByTagName('dataElements')[0].getElementsByTagName('dataElement');
+
+ for(var i=0;i<dataElements.length;i++){
+ var name = dataElements[i].getElementsByTagName('name')[0].firstChild.nodeValue;
+ var id = dataElements[i].getElementsByTagName('id')[0].firstChild.nodeValue;
+
+ var option = new Option( name, id );
+ option.onmousemove = function(e){
+ showToolTip( e, this.text);
+ }
+
+ listDataElement.add(option, null);
+ }
+
+ document.forms['dataElementGroups'].action = "updateDataElementGroupOrderForCategory.action";
+
+ getALLDataElementGroups();
+ },'xml');
+}
+
+
+// -----------------------------------------------------------------------------
+// Update sortesd order of DataElement
+// -----------------------------------------------------------------------------
+
+function updateSortedDataElement(){
+ var dataElements = byId('sortdataElement');
+ var dataElementIds = new Array();
+ for(var i=0;i<dataElements.length;i++){
+ dataElementIds.push(dataElements.item(i).value);
+ }
+
+ $.post("updateSortedDataElementsForCategory.action",{
+ id:$('#dataElementGroupOrderId').val(),
+ dataElementIds:dataElementIds
+ },function (data){
+ history.go(-1);
+ },'xml');
+}
+
+// -----------------------------------------------------------------------------
+// SHOW TOOLTIP
+// -----------------------------------------------------------------------------
+
+function showToolTip( e, value){
+
+ var tooltipDiv = byId('tooltip');
+ tooltipDiv.style.display = 'block';
+
+ var posx = 0;
+ var posy = 0;
+
+ if (!e) var e = window.event;
+ if (e.pageX || e.pageY)
+ {
+ posx = e.pageX;
+ posy = e.pageY;
+ }
+ else if (e.clientX || e.clientY)
+ {
+ posx = e.clientX;
+ posy = e.clientY;
+ }
+
+ tooltipDiv.style.left= posx + 8 + 'px';
+ tooltipDiv.style.top = posy + 8 + 'px';
+ tooltipDiv.innerHTML = " " + value;
+}
+
+// -----------------------------------------------------------------------------
+// HIDE TOOLTIP
+// -----------------------------------------------------------------------------
+
+function hideToolTip(){
+ byId('tooltip').style.display = 'none';
+}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/listDataElementGroupByExcelItemGroup.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/listDataElementGroupByExcelItemGroup.vm 2009-11-09 04:18:02 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/listDataElementGroupByExcelItemGroup.vm 2009-11-09 07:34:00 +0000
@@ -28,7 +28,7 @@
<td>$encoder.htmlEncode( $group.name )</td>
<td width="100px">$encoder.htmlEncode( $group.code )</td>
<td width="100px">
- <a href="javascript:deleteDataElementOrder('$group.id');" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
+ <a href="javascript:deleteDataElementGroupOrder('$group.id');" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
<a href="javascript:openUpdateDataElementOrder( '$group.id' );" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
<a href="openSortDataElementForCategory.action?id=$group.id" title="$i18n.getString( 'sort_dataelement' )"><img src="../images/sort.png" border="1px"/></a>
</td>
@@ -40,9 +40,9 @@
</ul>
<form name="dataElementGroups" method="post">
-<input type="hidden" name="id" value="$excelItemGroup.id"/>
+<input type="hidden" name="id" id="id" value="$excelItemGroup.id"/>
<input type="hidden" name="dataElementGroupOrderId" id="dataElementGroupOrderId"/>
-<div id="dataElementGroups" style="position:fixed;display:block;width:870px;z-index:10001;background-color: white;border: medium solid silver;height:300px;padding:20px;">
+<div id="dataElementGroups" style="position:fixed;display:none;width:870px;z-index:10001;background-color: white;border: medium solid silver;height:300px;padding:20px;">
<div id="close" style="position:absolute;top:2px;right:2px;cursor: pointer;color:red;" onclick="hideById('dataElementGroups');deleteDivEffect();">[x]</div>
<table>
<tr>
@@ -74,7 +74,7 @@
<input type="button" value="<<" onclick="moveAllById('dataElementIds' , 'availableDataElements' );" style="width:50px"/>
</td>
<td width="64%">
- <select id="dataElementIds" name="dataElementIds" multiple size=10 style="width:400px" ondblclick="moveSelectedById('dataElementIds' , 'availableDataElements' );" ></select>
+ <select id="dataElementIds" name="dataElementIds" onMouseOut="javascript: hideToolTip();" multiple size=10 style="width:400px" ondblclick="moveSelectedById('dataElementIds' , 'availableDataElements' );" ></select>
</td>
</tr>
</table>
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/sortDataElementsForCategory.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/sortDataElementsForCategory.vm 2009-10-30 09:59:20 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/sortDataElementsForCategory.vm 2009-11-09 07:34:00 +0000
@@ -1,32 +1,26 @@
 <h2>$i18n.getString( "sort_dataelement" )</h2>
-
-<p>
-<input type="button" value="$i18n.getString( "update_sorted_dataelement" )" onclick="updateSortedDataElement()"/>
-<input type="button" value="$i18n.getString( "cancel" )" onclick="history.go(-1);"/>
-</p>
-<ul id="sortable1" class="connectedSortable">
- #foreach( $dataElement in $dataElementGroupOrder.dataElements)
- <li class='ui-state-default' name='dataElement' value='$dataElement.id'><span class='ui-icon ui-icon-arrowthick-2-n-s'></span>$dataElement.name</li>
- #end
-</ul>
-<div style="position:fixed;right:10px;top:200px;">
- <ul id="sortable2" class="connectedSortable">
- <li class="ui-state-highlight">$i18n.getString( "temp_place" )</li>
- </ul>
-</div>
-
-
-<script type="text/javascript">
- var id = $dataElementGroupOrder.id;
- $(function() {
- $("#sortable1, #sortable2").sortable({
- connectWith: '.connectedSortable',
- placeholder: 'ui-state-highlight'
-
- }).disableSelection();
- });
-</script>
-
+<input type="hidden" id="dataElementGroupOrderId" name="dataElementGroupOrderId" value="$dataElementGroupOrder.id">
+<table>
+ <tr>
+ <td>
+ <select id="sortdataElement" name="sortdataElement" multiple size="10">
+ #foreach( $dataElement in $dataElementGroupOrder.dataElements)
+ <option value="$dataElement.id">$dataElement.name</option>
+ #end
+ </select>
+
+ <td style="width:30px; text-align:center">
+ <a href="javascript:moveUpSelectedOption( 'sortdataElement' )"><img src="../images/move_up.png"></a><br><br>
+ <a href="javascript:moveDownSelectedOption( 'sortdataElement' )"><img src="../images/move_down.png"></a><br><br>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="button" value="$i18n.getString( "update_sorted_dataelement" )" onclick="updateSortedDataElement()"/>
+ <input type="button" value="$i18n.getString( "cancel" )" onclick="history.go(-1);"/>
+ </td>
+ </tr>
+</table>
<span id="message" style="top:100px;right:5px;position:fixed;width:200px;z-index:10002" onclick="javascript:hideById(this.id);"></span>