dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39192
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19869: programRuleAction.attribute -> programRuleAction.trackedEntityAttribute
------------------------------------------------------------
revno: 19869
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-08-27 13:49:26 +0200
message:
programRuleAction.attribute -> programRuleAction.trackedEntityAttribute
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleAction.java
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/javascript/programRule.js
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-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleAction.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleAction.java 2015-08-27 10:06:06 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/programrule/ProgramRuleAction.java 2015-08-27 11:49:26 +0000
@@ -202,7 +202,7 @@
this.dataElement = dataElement;
}
- @JsonProperty
+ @JsonProperty( "trackedEntityAttribute" )
@JsonSerialize( as = BaseIdentifiableObject.class )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public TrackedEntityAttribute getAttribute()
=== 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-26 19:49:09 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-08-27 11:49:26 +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 + ' >';
}
}
@@ -1207,7 +1207,6 @@
location:action.location,
action:action.programRuleActionType,
dataElement:action.dataElement,
- trackedEntityAttribute:action.trackedEntityAttribute,
content:action.content,
data:action.data,
ineffect:undefined
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programRule.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programRule.js 2015-08-27 10:10:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programRule.js 2015-08-27 11:49:26 +0000
@@ -386,7 +386,7 @@
var key = row.find(".actionDEs").val();
if(attributeList[key]){
- json_Data.attribute = {id: key};
+ json_Data.trackedEntityAttribute = {id: key};
}
else{
json_Data.dataElement = {id: key};
=== 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 10:06:06 +0000
+++ 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
@@ -115,7 +115,7 @@
+ ',"program":{"id":"' + "$!ruleVariable.program.id" + '"}}' )
<tr class="$clazz" jsonData='$json_Data' id="$ruleVariable.uid">
- <td>$!encoder.htmlEncode($ruleVariable.attribute.displayName)</td>
+ <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>
</tr>
#else
@@ -182,13 +182,6 @@
#set($clazz = "class='listRow'")
#end
#set($idx = $idx + 1 )
-
- #set( $actionFieldName = $action.dataElement.displayName )
- #if( !$actionFieldName )
- #set( $actionFieldName = $action.attribute.name )
- Hi
- $!encoder.htmlEncode( $actionFieldName )
- #end
<tr $clazz id="$action.uid">
<td>
@@ -200,13 +193,13 @@
</select>
</td>
<td><input type='text' class='content' style='width:97%;' value='$!encoder.htmlEncode( $action.content )'/></td>
- <td>
+ <td>
<span class="deCell" #if($action.programRuleActionType=='HIDESECTION') style='display:none;' #end>
<select style='width:100%;'>
#if( $action.dataElement && $action.dataElement.displayName != 'undefined')
<option class='actionDEs' value="$action.dataElement.uid">$!encoder.htmlEncode( $action.dataElement.displayName )</option>
#else
- <option class='actionDEs' value="$action.attribute.uid">$!encoder.htmlEncode( $action.attribute.displayName )</option>
+ <option class='actionDEs' value="$action.attribute.id">$!encoder.htmlEncode( $action.attribute.name )</option>
#end
</select>
</span>