=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js 2010-09-08 10:40:26 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js 2010-12-10 07:45:59 +0000
@@ -18,8 +18,10 @@
var operandsByDataElementGroup = new Array();
- this.loadDataElementGroups = function( target )
+ this.loadDataElementGroups = function( jQuerySelectionString )
{
+ var target = jQuery( jQuerySelectionString );
+
target.children().remove();
if( dataElementsGroups.length == 0 )
@@ -40,13 +42,15 @@
}
}
- this.loadAllDataElements = function( target )
+ this.loadAllDataElements = function( jQuerySelectionString )
{
- this.loadDataElementsByGroup( ALL_KEY, target);
+ this.loadDataElementsByGroup( ALL_KEY, jQuerySelectionString);
}
- this.loadDataElementsByGroup = function( id,target )
+ this.loadDataElementsByGroup = function( id, jQuerySelectionString )
{
+ var target = jQuery( jQuerySelectionString );
+
target.children().remove();
var des = dataElementGroupList[id];
@@ -72,8 +76,10 @@
}
- this.loadIndicatorGroups = function( target )
+ this.loadIndicatorGroups = function( jQuerySelectionString )
{
+ var target = jQuery( jQuerySelectionString );
+
target.children().remove();
if( indicatorGroups.length == 0 )
@@ -94,13 +100,15 @@
}
}
- this.loadAllIndicators = function( target )
- {
- this.loadIndicatorsByGroup( ALL_KEY, target);
+ this.loadAllIndicators = function( jQuerySelectionString )
+ {
+ this.loadIndicatorsByGroup( ALL_KEY, jQuerySelectionString );
}
- this.loadIndicatorsByGroup = function( id,target )
+ this.loadIndicatorsByGroup = function( id, jQuerySelectionString )
{
+ var target = jQuery( jQuerySelectionString );
+
target.children().remove();
var ins = indicatorGroupList[id];
@@ -125,8 +133,10 @@
}
}
- this.loadCategoryOptionComboByDE = function( id, target )
+ this.loadCategoryOptionComboByDE = function( id, jQuerySelectionString )
{
+ var target = jQuery( jQuerySelectionString );
+
target.children().remove();
var options = categoryOptionComboList[id];
@@ -152,8 +162,9 @@
}
- this.loadOperands = function (target, params )
+ this.loadOperands = function ( jQuerySelectionString, params )
{
+ var target = jQuery( jQuerySelectionString );
target.children().remove();
jQuery.getJSON('../dhis-web-commons-ajax-json/getOperands.action'
@@ -168,7 +179,7 @@
}
-var DataDictionary = new DataDictionary();
+var dataDictionary = new DataDictionary();
function DataElementGroup( id_, name_ )
{
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2010-12-06 22:38:32 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2010-12-10 07:45:59 +0000
@@ -683,6 +683,7 @@
for ( var i = 0; i < list.options.length; i++ )
{
+ list.options[i].selected = "selected";
params += paramName + "=" + list.options[i].value + "&";
}
@@ -1196,84 +1197,6 @@
hideById( id );
unLockScreen();
}
-
-/**
-* load All Data Element Groups into select combo box
-* @param selectorJQueryString is String fo jQuery selector, this string is anything but it must valid with jQuery format. This component will contain list of result*
-*/
-
-function loadDataElementGroups( selectorJQueryString )
-{
- DataDictionary.loadDataElementGroups( jQuery( selectorJQueryString ) );
-}
-
-/**
-* load data elements by data element group
-* @param selectorJQueryString is String fo jQuery selector, this string is anything but it must valid with jQuery format. This component will contain list of result*
-* @param id is data element group id
-*/
-function loadDataElementsByGroup( id, selectorJQueryString )
-{
- DataDictionary.loadDataElementsByGroup( id, jQuery( selectorJQueryString ) );
-}
-
-/**
-* load All Data Elements into select combo box
-* @param selectorJQueryString is String fo jQuery selector, this string is anything but it must valid with jQuery format. This component will contain list of result*
-*/
-function loadAllDataElements( selectorJQueryString )
-{
- DataDictionary.loadAllDataElements( jQuery( selectorJQueryString ) );
-}
-
-/**
-* load Category Option Combo of data element
-* @param selectorJQueryString is String fo jQuery selector, this string is anything but it must valid with jQuery format. This component will contain list of result*
-* @param id is data element id
-*/
-function loadCategoryOptionComboByDE( id, selectorJQueryString)
-{
- DataDictionary.loadCategoryOptionComboByDE( id, jQuery( selectorJQueryString ) );
-}
-
-/**
-* load all indicator groups into select combo box
-* @param selectorJQueryString is String fo jQuery selector, this string is anything but it must valid with jQuery format. This component will contain list of result*
-*/
-function loadIndicatorGroups( selectorJQueryString )
-{
- DataDictionary.loadIndicatorGroups( jQuery( selectorJQueryString ) );
-}
-
-/**
-* load indicators by group
-* @param selectorJQueryString is String fo jQuery selector, this string is anything but it must valid with jQuery format. This component will contain list of result*
-* @param id is indicator group id
-*/
-function loadIndicatorsByGroup( id, selectorJQueryString )
-{
- DataDictionary.loadIndicatorsByGroup( id, jQuery( selectorJQueryString ));
-}
-
-/**
-* load all indicator into select combo box
-* @param selectorJQueryString is String fo jQuery selector, this string is anything but it must valid with jQuery format. This component will contain list of result*
-*/
-function loadAllIndicators( selectorJQueryString )
-{
- DataDictionary.loadAllIndicators( jQuery( selectorJQueryString ) );
-}
-
-/**
-* load Operands
-* @param selectorJQueryString is String fo jQuery selector, this string is anything but it must valid with jQuery format. This component will contain list of result*
-* @param params is array of paramater {id : dataElementGroupId, aggregationOperator: sum or average} : this param is optional
-*/
-function loadOperands( selectorJQueryString, params )
-{
- DataDictionary.loadOperands( jQuery( selectorJQueryString ), params);
-}
-
/**
* Removes the opacity div from the document.
function deleteDivEffect()
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/dataElementGroup.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/dataElementGroup.js 2010-12-03 05:41:34 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/dataElementGroup.js 2010-12-10 07:45:59 +0000
@@ -16,9 +16,9 @@
function openAddDataElementGroupOrder()
{
- loadDataElementGroups( "#availableDataElementGroups" );
+ dataDictionary.loadDataElementGroups( "#availableDataElementGroups" );
- loadDataElementsByGroup( "" , "#availableDataElements" );
+ dataDictionary.loadDataElementsByGroup( "" , "#availableDataElements" );
jQuery("#dataElementGroups").dialog("open");
@@ -77,9 +77,9 @@
listDataElement.append('');
}
- loadDataElementGroups( "#availableDataElementGroups" );
+ dataDictionary.loadDataElementGroups( "#availableDataElementGroups" );
- loadDataElementsByGroup( "" , "#availableDataElements" );
+ dataDictionary.loadDataElementsByGroup( "" , "#availableDataElements" );
jQuery("#dataElementGroups").dialog("open");
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitems.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitems.js 2010-09-06 09:12:16 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitems.js 2010-12-10 07:45:59 +0000
@@ -21,8 +21,8 @@
function openExpressionBuild() {
byId("formula").value = byId("expression").value;
- loadDataElementGroups( "#divExpression select[id=dataElementGroup]" );
- loadAllDataElements( "#divExpression select[id=availableDataElements]" );
+ dataDictionary.loadDataElementGroups( "#divExpression select[id=dataElementGroup]" );
+ dataDictionary.loadAllDataElements( "#divExpression select[id=availableDataElements]" );
$( "#availableDataElements" ).change(getOptionCombos);
showPopupWindowById( 'divExpression', 600, 300 );
@@ -30,7 +30,7 @@
// Get option combos for selected dataelement
function getOptionCombos() {
- loadCategoryOptionComboByDE( byId("availableDataElements").value, "#divExpression select[id=optionCombos]" );
+ dataDictionary.loadCategoryOptionComboByDE( byId("availableDataElements").value, "#divExpression select[id=optionCombos]" );
}
// Insert operand into the Formular textbox
@@ -62,8 +62,8 @@
// Open Expression Form
function caExpressionBuilderForm()
{
- loadDataElementGroups( "#divCategory select[id=dataElementGroup]" );
- loadAllDataElements( "#divCategory select[id=availableDataElements]" );
+ dataDictionary.loadDataElementGroups( "#divCategory select[id=dataElementGroup]" );
+ dataDictionary.loadAllDataElements( "#divCategory select[id=availableDataElements]" );
setFieldValue( 'divCategory textarea[id=formula]', getFieldValue('expression') );
showPopupWindowById( 'divCategory', 600, 320 );
@@ -87,7 +87,7 @@
// Get option combos for selected dataelement
function getOptionCombos(id, target) {
- loadCategoryOptionComboByDE( id, target);
+ dataDictionary.loadCategoryOptionComboByDE( id, target);
}
// -----------------------------------------------------------------------
@@ -96,7 +96,7 @@
function getDataElements( id, target )
{
- loadDataElementsByGroup( id, target );
+ dataDictionary.loadDataElementsByGroup( id, target );
}
// -----------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/listDataElementGroup.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/listDataElementGroup.vm 2010-12-03 05:41:34 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/listDataElementGroup.vm 2010-12-10 07:45:59 +0000
@@ -58,7 +58,7 @@
-
+
|
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/report/dataelementExpressionBuilderForm.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/report/dataelementExpressionBuilderForm.vm 2010-10-07 07:10:30 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/report/dataelementExpressionBuilderForm.vm 2010-12-10 07:45:59 +0000
@@ -73,7 +73,7 @@
#if($reportExcel.isCategory())
getDataElementCategoryOptionCombos();
#else
- loadDataElementGroups("#dataelement select[id=groupSelect]") ;
+ dataDictionary.loadDataElementGroups("#dataelement select[id=groupSelect]") ;
#end
setFieldValue( 'dataelement textarea[id=formula]', getFieldValue('expression') );
@@ -87,15 +87,15 @@
function getDataElements( id, target )
{
#if($reportExcel.isCategory())
- loadDataElementsByGroup( id, target);
+ dataDictionary.loadDataElementsByGroup( id, target);
#else
- loadOperands( target, {id:id} );
+ dataDictionary.loadOperands( target, {id:id} );
#end
}
function getOptionCombos( id, targetId )
{
- loadCategoryOptionComboByDE( id, targetId );
+ dataDictionary.loadCategoryOptionComboByDE( id, targetId );
}
function getDataElementCategoryOptionCombos()
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/AddDataElementGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/AddDataElementGroupAction.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/dataelementgroup/AddDataElementGroupAction.java 2010-12-10 07:45:59 +0000
@@ -27,7 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
@@ -67,9 +66,9 @@
this.name = name;
}
- private Collection groupMembers;
+ private Set groupMembers = new HashSet();
- public void setGroupMembers( Collection groupMembers )
+ public void setGroupMembers( Set groupMembers )
{
this.groupMembers = groupMembers;
}
@@ -93,13 +92,13 @@
{
dataElementGroup = new DataElementGroup( name );
- if ( groupMembers != null )
+ if ( !groupMembers.isEmpty() )
{
Set members = new HashSet( groupMembers.size() );
- for ( String id : groupMembers )
+ for ( Integer id : groupMembers )
{
- members.add( dataElementService.getDataElement( Integer.parseInt( id ) ) );
+ members.add( dataElementService.getDataElement( id ) );
}
dataElementGroup.setMembers( members );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/RemoveDataElementGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/RemoveDataElementGroupAction.java 2010-09-25 21:09:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/RemoveDataElementGroupAction.java 2010-12-10 07:45:59 +0000
@@ -104,6 +104,8 @@
return ERROR;
}
}
+
+ message = i18n.getString( "item_deleted_successfully" );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/UpdateDataElementGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/UpdateDataElementGroupAction.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/dataelementgroup/UpdateDataElementGroupAction.java 2010-12-10 07:45:59 +0000
@@ -74,12 +74,12 @@
this.name = name;
}
- private Collection groupMembers;
+ private Set groupMembers = new HashSet();
- public void setGroupMembers( Collection groupMembers )
+ public void setGroupMembers( Set groupMembers )
{
this.groupMembers = groupMembers;
- }
+ }
// -------------------------------------------------------------------------
// Output
@@ -105,17 +105,17 @@
dataElementGroup.setName( name );
}
- if ( groupMembers != null && groupMembers.size() > 0 )
+ if ( !groupMembers.isEmpty() )
{
Set members = new HashSet();
- for ( String id : groupMembers )
+ for ( Integer id : groupMembers )
{
- members.add( dataElementService.getDataElement( Integer.parseInt( id ) ) );
+ members.add( dataElementService.getDataElement( id ) );
}
-
+
dataElementGroup.setMembers( members );
- }
+ }
dataElementService.updateDataElementGroup( dataElementGroup );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2010-12-09 06:15:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2010-12-10 07:45:59 +0000
@@ -347,4 +347,6 @@
number_value_type = Number type
int = Integer
positiveNumber = Positive Number
-negativeNumber = Negative Number
\ No newline at end of file
+negativeNumber = Negative Number
+view_1 = View 1
+view_2 = View 2
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml 2010-12-03 12:31:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml 2010-12-10 07:45:59 +0000
@@ -102,67 +102,43 @@
plainTextError
-
-
+
+
- dataElementGroupEditorView1
-
- dataElementGroupEditorView2
-
-
-
-
- /main.vm
- /dhis-web-maintenance-datadictionary/dataElementGroupEditorView1.vm
- /dhis-web-maintenance-datadictionary/menu.vm
- javascript/dataElementGroupEditorView1.js
-
-
-
- /main.vm
- /dhis-web-maintenance-datadictionary/dataElementGroupEditorView2.vm
- /dhis-web-maintenance-datadictionary/menu.vm
- javascript/dataElementGroupEditorView2.js
-
+ class="org.hisp.dhis.commons.action.GetDataElementsAction">
+ dataElementGroupEditorChain1
+
+
+
+ dataElementGroupEditorChain2
+
+
+
+ /main.vm
+ /dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm
+ /dhis-web-maintenance-datadictionary/menu.vm
+
-
- /dhis-web-maintenance-datadictionary/responseDataElementGroups.vm
-
+ /dhis-web-commons/ajax/jsonDataElementGroups.vm
-
- /dhis-web-maintenance-datadictionary/responseSuccess.vm
-
-
-
-
-
- /dhis-web-maintenance-datadictionary/responseDataElementGroupSuccess.vm
-
-
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm
+
-
- /dhis-web-maintenance-datadictionary/responseAddDataElementGroupSuccess.vm
-
- F_DATAELEMENTGROUP_ADD
+ /dhis-web-commons/ajax/jsonDataElementGroup.vm
-
- /dhis-web-maintenance-datadictionary/responseAddDataElementGroupSuccess.vm
-
- F_DATAELEMENTGROUP_UPDATE
+ /dhis-web-commons/ajax/jsonDataElementGroup.vm
/dhis-web-commons/ajax/jsonResponseError.vm
- plainTextError
- F_DATAELEMENTGROUP_DELETE
+ plainTextError
-
- /dhis-web-maintenance-datadictionary/responseSuccess.vm
- F_DATAELEMENTGROUP_UPDATE
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView.vm 2010-12-10 07:45:59 +0000
@@ -0,0 +1,465 @@
+
+ $i18n.getString( "data_element_group_management" ) #openHelp( "dataElementGroupEditor" )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView1.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView1.vm 2010-09-29 06:22:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView1.vm 1970-01-01 00:00:00 +0000
@@ -1,124 +0,0 @@
-
-
-
- $i18n.getString( "data_element_group_management" ) #openHelp( "dataElementGroupEditor" )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView2.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView2.vm 2010-09-29 06:22:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupEditorView2.vm 1970-01-01 00:00:00 +0000
@@ -1,116 +0,0 @@
-
-
-
- $i18n.getString( "data_element_group_management" ) #openHelp( "dataElementGroupEditor" )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm 2010-12-07 17:02:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm 2010-12-10 07:45:59 +0000
@@ -92,7 +92,7 @@
{
numerator = true;
- loadDataElementGroups( "#indicator-expression-container select[id=dataElementGroupId]" );
+ dataDictionary.loadDataElementGroups( "#indicator-expression-container select[id=dataElementGroupId]" );
validator.resetForm();
@@ -113,7 +113,7 @@
{
numerator = false;
- loadDataElementGroups( "#indicator-expression-container select[id=dataElementGroupId]" );
+ dataDictionary.loadDataElementGroups( "#indicator-expression-container select[id=dataElementGroupId]" );
validator.resetForm();
@@ -135,10 +135,10 @@
{
var aggregationOperator = getRadioValue( 'aggregationOperator' );
- var id = getFieldValue( "indicator-expression-container select[id=dataElementGroupId]");
-
- loadOperands( "#indicator-expression-container select[id=dataElementId]", {"id": id, "aggregationOperator": aggregationOperator, "includeTotals":true} );
-
+ var id = getFieldValue( "indicator-expression-container select[id=dataElementGroupId]");
+
+ dataDictionary.loadOperands( "#indicator-expression-container select[id=dataElementId]", {id: id, aggregationOperator: aggregationOperator} );
+
checkAggregationOperator();
}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView1.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView1.js 2010-10-01 18:28:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView1.js 1970-01-01 00:00:00 +0000
@@ -1,314 +0,0 @@
-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';
-}
-
-function addOptionToListWithToolTip( list, optionValue, optionText )
-{
- var option = document.createElement( "option" );
- option.value = optionValue;
- option.text = optionText;
- option.onmousemove = function(e) {
- showToolTip(e, optionText);
- }
- list.add( option, null );
-}
-
-function refreshListById( listId )
-{
- var list = byId( listId );
- list.options.length = 0;
-
- if ( listId == 'dataElementGroups' )
- {
- for (var id in dataElementGroups)
- {
- addOptionToListWithToolTip( list, id, dataElementGroups[id] );
- }
- }
- else if ( listId == 'availableDataElements' )
- {
- for (var id in availableDataElements)
- {
- addOptionToListWithToolTip( list, id, availableDataElements[id] );
- }
- }
-}
-
-function initAllList()
-{
- refreshListById( 'dataElementGroups' );
- refreshListById( 'availableDataElements' );
- disable( 'availableDataElements' );
-}
-
-// -------------------------------------------------------------------------
-
-function getDataElementGroup( dataElementGroupList )
-{
- selectedDataElements = new Object();
- var id = dataElementGroupList.options[ dataElementGroupList.selectedIndex ].value;
- var request = new Request();
- request.setResponseTypeXML( 'xmlObject' );
- request.setCallbackSuccess( getDataElementGroupCompleted );
- request.send( 'getDataElementGroupEditor.action?id=' + id );
-}
-
-function getDataElementGroupCompleted( xmlObject )
-{
- selectedDataElements = new Object();
- var name = getElementValue( xmlObject, 'name' );
- var dataElementList = xmlObject.getElementsByTagName('dataElement');
- var selectedList = byId( 'selectedDataElements' );
- selectedList.length = 0;
-
- for ( var i = 0; i < dataElementList.length; i++ )
- {
- dataElement = dataElementList.item(i);
- var id = dataElement.getAttribute('id');
- var value = dataElement.firstChild.nodeValue;
- addOptionToListWithToolTip( selectedList, id, value );
- selectedDataElements[id] = value;
- }
-
- refreshListById( 'availableDataElements' );
- visableAvailableDataElements();
- enable('availableDataElements');
- setInnerHTML('groupNameView', name);
-}
-
-function visableAvailableDataElements()
-{
- var selectedList = byId( 'selectedDataElements' );
- var availableList = byId( 'availableDataElements' );
- var selectedOptions = selectedList.options;
- var availableOptions = availableList.options;
-
- for(var i=0;i
-
- $encoder.xmlEncode( $dataElementGroup.name )
- #foreach( $member in $!dataElementGroup.members )
- $encoder.xmlEncode( $member.name )
- #end
-
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm 2010-12-03 05:41:34 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm 2010-12-10 07:45:59 +0000
@@ -68,7 +68,7 @@
function loadDataElements( dataSetId )
{
var dataElements = jQuery("#dataElementId");
- loadOperands( dataElements, {dataSetId: dataSetId});
+ dataDictionary.loadOperands( dataElements, {dataSetId: dataSetId});
}
function loadDataSets()