dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39196
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19871: minor fix in program rule for attributes
------------------------------------------------------------
revno: 19871
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-08-27 16:45:23 +0200
message:
minor fix in program rule for attributes
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramRule.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramRule.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/dhis2/dhis2.angular.services.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-08-27 12:56:53 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-08-27 14:45:23 +0000
@@ -402,7 +402,7 @@
//check if attribute has optionset
if (att.optionSetValue) {
var optionSetId = att.optionSet.id;
- newInputField = '<ui-select theme="select2" ' + commonInputFieldProperty + ' on-select="validationAndSkipLogic(selectedTei,\'' + attId + '\')" >' +
+ newInputField = '<ui-select theme="select2" ' + commonInputFieldProperty + ' on-select="teiValueUpdated(selectedTei,\'' + attId + '\')" >' +
'<ui-select-match style="width:100%;" allow-clear="true" placeholder="' + $translate.instant('select_or_search') + '">{{$select.selected.name || $select.selected}}</ui-select-match>' +
'<ui-select-choices ' +
'repeat="option.name as option in optionSets.' + optionSetId + '.options | filter: $select.search | limitTo:30">' +
@@ -415,12 +415,12 @@
if (att.valueType === "number") {
newInputField = '<input type="number" ' +
' d2-number-validator ' +
- ' ng-blur="validationAndSkipLogic(selectedTei,\'' + attId + '\')" ' +
+ ' ng-blur="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
commonInputFieldProperty + ' >';
}
else if (att.valueType === "bool") {
newInputField = '<select ' +
- ' ng-change="validationAndSkipLogic(selectedTei,\'' + attId + '\')" ' +
+ ' ng-change="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
commonInputFieldProperty + ' > ' +
' <option value="">{{\'please_select\'| translate}}</option>' +
' <option value="false">{{\'no\'| translate}}</option>' +
@@ -432,22 +432,22 @@
' placeholder="{{dhis2CalendarFormat.keyDateFormat}}" ' +
' max-date="' + attMaxDate + '"' + '\'' +
' d2-date' +
- ' blur-or-change="validationAndSkipLogic(selectedTei,\'' + attId + '\')" ' +
+ ' blur-or-change="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
commonInputFieldProperty + ' >';
}
else if (att.valueType === "trueOnly") {
newInputField = '<input type="checkbox" ' +
- ' ng-change="validationAndSkipLogic(selectedTei,\'' + attId + '\')" ' +
+ ' ng-change="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
commonInputFieldProperty + ' >';
}
else if (att.valueType === "email") {
newInputField = '<input type="email" ' +
- ' ng-blur="validationAndSkipLogic(selectedTei,\'' + attId + '\')" ' +
+ ' ng-blur="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
commonInputFieldProperty + ' >';
}
else {
newInputField = '<input type="text" ' +
- ' ng-blur="validationAndSkipLogic(selectedTei,\'' + attId + '\')" ' +
+ ' ng-blur="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
commonInputFieldProperty + ' >';
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramRule.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramRule.vm 2015-08-27 10:06:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramRule.vm 2015-08-27 14:45:23 +0000
@@ -121,11 +121,11 @@
#set($idx = $idx + 1 )
<tr class="$clazz" jsonData='$json_Data' id="$ruleVariable.uid">
#if( $ruleVariable.sourceType == 'TEI_ATTRIBUTE')
- <td>$!encoder.htmlEncode($ruleVariable.trackedEntityAttribute) $!encoder.htmlEncode($ruleVariable.trackedEntityAttribute.displayName)</td>
- <td><input type='button' teAttId='$ruleVariable.trackedEntityAttribute.uid' realValue='$ruleVariable.name' value='#{$ruleVariable.name}' style='width:150px;' onclick='insertVariable(this)'/> <strong>[ATT]</strong></td>
+ <td>$!encoder.htmlEncode($ruleVariable.trackedEntityAttribute) $!encoder.htmlEncode($ruleVariable.attribute.name)</td>
+ <td><input type='button' teAttId='$ruleVariable.trackedEntityAttribute.uid' realValue='$ruleVariable.name' value='A{$ruleVariable.name}' style='width:150px;' onclick='insertVariable(this)'/></td>
#else
<td>$!encoder.htmlEncode($ruleVariable.dataElement.displayName)</td>
- <td><input type='button' deId='$ruleVariable.dataElement.uid' realValue='$ruleVariable.name' value='#{$ruleVariable.name}' style='width:150px;' onclick='insertVariable(this)'/> <strong>[DE]</strong></td>
+ <td><input type='button' deId='$ruleVariable.dataElement.uid' realValue='$ruleVariable.name' value='#{$ruleVariable.name}' style='width:150px;' onclick='insertVariable(this)'/></td>
#end
</tr>
#end
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramRule.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramRule.vm 2015-08-27 11:49:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramRule.vm 2015-08-27 14:45:23 +0000
@@ -115,8 +115,8 @@
+ ',"program":{"id":"' + "$!ruleVariable.program.id" + '"}}' )
<tr class="$clazz" jsonData='$json_Data' id="$ruleVariable.uid">
- <td>$!encoder.htmlEncode($ruleVariable.trackedEntityAttribute.displayName)</td>
- <td><input type='button' teAttId='$ruleVariable.trackedEntityAttribute.uid' realValue='$ruleVariable.name' value='#{$ruleVariable.name}' style='width:100%;' onclick='insertVariable(this)'/></td>
+ <td>$!encoder.htmlEncode($ruleVariable.attribute.name)</td>
+ <td><input type='button' teAttId='$ruleVariable.trackedEntityAttribute.uid' realValue='$ruleVariable.name' value='A{$ruleVariable.name}' style='width:100%;' onclick='insertVariable(this)'/></td>
</tr>
#else
#set( $json_Data='{"name":"' + $ruleVariable.name + '"'