dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #09620
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2583: Fixed bug <702830> Excelreporting-import-error
------------------------------------------------------------
revno: 2583
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-01-17 13:08:02 +0700
message:
Fixed bug <702830> Excelreporting-import-error
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/import/addExcelItem.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/import/excelFormulaBuilder.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitems.js
--
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/commons.ajax.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js 2011-01-12 11:07:48 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js 2011-01-17 06:08:02 +0000
@@ -50,7 +50,7 @@
this.loadAllDataElements = function( jQuerySelectionString )
{
- this.loadDataElementsByGroup( ALL_KEY, jQuerySelectionString);
+ this.loadDataElementsByGroup( '0', jQuerySelectionString);
}
this.loadDataElementsByGroup = function( id, jQuerySelectionString )
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/import/addExcelItem.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/import/addExcelItem.vm 2010-09-06 09:12:16 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/import/addExcelItem.vm 2011-01-17 06:08:02 +0000
@@ -39,7 +39,7 @@
<td><label>$i18n.getString('expression')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td>
<input type="text" id="expression" name="expression" style="width:20em" class="{validate:{required:true,minlength:5,maxlength:160}}"/>
- <input type="button" id="expression-button" value=".."/>
+ <input type="button" id="expression-button" value="..."/>
</td>
</tr>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/import/excelFormulaBuilder.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/import/excelFormulaBuilder.vm 2010-09-06 09:12:16 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/import/excelFormulaBuilder.vm 2011-01-17 06:08:02 +0000
@@ -18,13 +18,12 @@
<a href="#" onclick="insertOperation( 'formula','-' )"><img src="images/minus.png" alt="$i18n.getString( 'minus' )"></a>
</td>
<td valign="bottom">
- <input type="button" value="<" onclick="insertDataElementId()"/>
+ <input type="button" id="insertExpression" value="<" onclick="insertDataElementId()" disabled />
</td>
<td>
- <select id="dataElementGroup" style="width:280px" onchange="getDataElements(this.value, '#divExpression select[id=elementSelect]')"></select>
- <select name="select" size="11" id="availableDataElements" style="width:280px">
- </select>
- <select id="optionCombos" size=4 style="width:280px"></select>
+ <select id="dataElementGroup" style="width:280px" onchange="getDataElements(this.value, '#divExpression select[id=availableDataElements]')"></select>
+ <select id="availableDataElements" size="11" style="width:280px" onchange="getOptionCombos(this.value, '#divExpression select[id=optionCombos]', 'divExpression input[id=insertExpression]')"></select>
+ <select id="optionCombos" size="4" style="width:280px" onchange="enable( 'divExpression input[id=insertExpression]' );" ondblclick="insertDataElementId()"></select>
</td>
</tr>
</table>
@@ -53,12 +52,12 @@
<a href="#" onclick="insertOperation( '+' )"><img src="images/plus.png" alt="$i18n.getString( 'plus' )"></a>
<a href="#" onclick="insertOperation( '-' )"><img src="images/minus.png" alt="$i18n.getString( 'minus' )"></a></td>
<td rowspan="3" valign="bottom">
- <input type="button" value="<" onclick="insertExpression()"/>
+ <input type="button" id="insertExpression" value="<" onclick="insertExpression()" disabled />
</td>
<td rowspan="3">
<select id="dataElementGroup" style="width:280px" onchange="getDataElements(this.value, '#divCategory select[id=availableDataElements]')"></select>
- <select id="availableDataElements" size="10" style="width:280px;" onchange="getOptionCombos( this.value, '#divCategory select[id=optionCombos]')"></select>
- <select id="optionCombos" size=4 style="width:280px"></select>
+ <select id="availableDataElements" size="10" style="width:280px;" onchange="getOptionCombos(this.value, '#divCategory select[id=optionCombos]', 'divCategory input[id=insertExpression]')"></select>
+ <select id="optionCombos" size=4 style="width:280px" onchange="enable( 'divCategory input[id=insertExpression]' );" ondblclick="insertExpression()"></select>
</td>
</tr>
</table>
=== 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-12-10 07:45:59 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/excelitems.js 2011-01-17 06:08:02 +0000
@@ -9,7 +9,7 @@
if( type == 'NORMAL' ){
byId('expression-button' ).onclick = openExpressionBuild;
}else {
- byId('expression-button' ).onclick = caExpressionBuilderForm;
+ byId('expression-button' ).onclick = caExpressionBuilderForm;
}
}
@@ -23,16 +23,10 @@
byId("formula").value = byId("expression").value;
dataDictionary.loadDataElementGroups( "#divExpression select[id=dataElementGroup]" );
dataDictionary.loadAllDataElements( "#divExpression select[id=availableDataElements]" );
- $( "#availableDataElements" ).change(getOptionCombos);
showPopupWindowById( 'divExpression', 600, 300 );
}
-// Get option combos for selected dataelement
-function getOptionCombos() {
- dataDictionary.loadCategoryOptionComboByDE( byId("availableDataElements").value, "#divExpression select[id=optionCombos]" );
-}
-
// Insert operand into the Formular textbox
function insertDataElementId() {
@@ -73,7 +67,7 @@
function insertExpression()
{
var expression = "[*." + getFieldValue("divCategory select[id=optionCombos]") + "]";
- setFieldValue( 'divCategory textarea[id=formula]', getFieldValue( 'divCategory textarea[id=formula]') + expression );
+ setFieldValue( 'divCategory textarea[id=formula]', getFieldValue( 'divCategory textarea[id=formula]') + expression );
}
// Update expression for item
@@ -86,8 +80,10 @@
}
// Get option combos for selected dataelement
-function getOptionCombos(id, target) {
+function getOptionCombos(id, target, button)
+{
dataDictionary.loadCategoryOptionComboByDE( id, target);
+ disable( button );
}
// -----------------------------------------------------------------------