dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42946
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21864: some cleanup to audit implementation
------------------------------------------------------------
revno: 21864
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2016-02-03 11:04:07 +0100
message:
some cleanup to audit implementation
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/angular-forms/audit-history.html
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.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-apps/src/main/webapp/dhis-web-event-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2016-01-29 08:57:41 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2016-02-03 10:04:07 +0000
@@ -103,10 +103,12 @@
color: red;
}
-.right {
- float: right !important;
- padding-bottom: 20px;
- margin-bottom: 20px;
+.pull-right {
+ float: right !important;;
+}
+
+.pull-left {
+ float: left !important;;
}
.black {
@@ -454,28 +456,12 @@
width: 35%
}
-
-/*Audit icon specific*/
-.input-with-audit {
- width:85%;
- display: inline-block;
-}
-
-.checkbox-with-audit {
- width:50%;
- display: inline-block;
-}
-
.audit-icon {
- margin-left: 5%;
- display: inline-block;
-}
-
-.form-narrow-column {
- width: 80px;
+ cursor: pointer;
+ color: #3162C5;
}
.audit-icon-column {
- width: 30px;
- align: center;
-}
\ No newline at end of file
+ width: 20px !important;
+ text-align: center;
+}
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2016-01-29 08:57:41 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2016-02-03 10:04:07 +0000
@@ -1,6 +1,6 @@
<div ng-if='!selectedProgramStage.programStageSections.length'>
<div ng-include="'views/event-details.html'"></div>
- <table class="dhis2-list-table-striped">
+ <table class="dhis2-list-table-striped table-with-fixed-layout">
<thead>
<tr>
<th>
@@ -9,14 +9,15 @@
<th>
{{'value'| translate}}
</th>
- <th class="audit-icon-column hideInPrint" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
+ <th class="hideInPrint audit-icon-column" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="eventGridColumn in eventGridColumns" ng-if="eventGridColumn.id !== 'comment' && eventGridColumn.id !== 'uid' && eventGridColumn.id !== 'eventDate' && !hiddenFields[eventGridColumn.id]">
<td >
- {{eventGridColumn.name}}<span ng-if="eventGridColumn.compulsory" class="required">*</span>
+ {{eventGridColumn.name}}
+ <span ng-if="eventGridColumn.compulsory" class="required">*</span>
</td>
<td >
<ng-form name="innerForm">
@@ -257,8 +258,11 @@
<div ng-messages="innerForm.foo.$error" ng-if="interacted(innerForm.foo)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">
</div>
</ng-form>
+ <!--<span class="hideInPrint audit-icon" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
+ <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
+ </span>-->
</td>
- <td class="hideInPrint audit-icon-column" align="center" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
+ <td ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
<d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</td>
</tr>
@@ -281,13 +285,12 @@
<thead>
<tr>
<th>
- {{'data_element'| translate}}
+ {{'data_element'| translate}}
</th>
<th>
{{'value'| translate}}
</th>
- <th class="audit-icon-column hideInPrint" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
-
+ <th class="hideInPrint audit-icon-column" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
</th>
</tr>
</thead>
@@ -295,7 +298,7 @@
<tr ng-repeat="de in section.programStageDataElements" ng-if="!hiddenFields[de.dataElement.id]">
<td >
{{prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName : prStDes[de.dataElement.id].dataElement.name}}
- <span ng-if="prStDes[de.dataElement.id].compulsory" class="required">*</span>
+ <span ng-if="prStDes[de.dataElement.id].compulsory" class="required">*</span>
</td>
<td>
<ng-form name="innerForm">
@@ -460,8 +463,6 @@
</label>
</span>
</div>
-
-
<div ng-switch-when="DATE">
<input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
@@ -548,8 +549,11 @@
{{warningMessages[de.dataElement.id]}}
</div>
</ng-form>
+ <!--<span class="hideInPrint audit-icon" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
+ <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
+ </span>-->
</td>
- <td class="hideInPrint audit-icon-column" align="center" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
+ <td ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
<d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/angular-forms/audit-history.html'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/angular-forms/audit-history.html 2016-01-18 10:41:47 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/angular-forms/audit-history.html 2016-02-03 10:04:07 +0000
@@ -1,42 +1,31 @@
-<div>
- <div ng-if="itemList.length !== 0">
- <div class="modal-header">
- <h1>{{'audit_history'| translate}} for {{trackedEntity}}</h1>
- </div>
-
- <div class="modal-body">
-
- <table class="listTable dhis2-table-striped-border">
- <tr>
- <th colspan="4">{{'audit_date'| translate}}</th>
- <th colspan="3">{{'audit_value'| translate}}</th>
- <!--<th colspan="2">{{'audit_type'| translate}}</th>-->
- <th colspan="2">{{'audit_modified'| translate}}</th>
- </tr>
- <tr ng-repeat="item in itemList">
- <td colspan="4">
- {{item.created}}
- </td>
- <td colspan="3">
- {{item.value}}
- </td>
- <!--<td colspan="2">-->
- <!--{{item.auditType}}-->
- <!--</td>-->
- <td colspan="2">
- {{item.modifiedBy}}
- </td>
- </tr>
- </table>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-ng-click="close()">{{'close'| translate}}</button>
- </div>
- </div>
- <div ng-if="itemList.length === 0">
- <div class="modal-body">
- <h3> {{'audit_history_unavailable'| translate}} {{trackedEntity}} </h3>
- <button type="button" class="btn btn-default" data-ng-click="close()">{{'close'| translate}}</button>
- </div>
- </div>
+<div class="modal-header">
+ <h2>{{'audit_history'| translate}} for {{trackedEntity}}</h2>
+</div>
+
+<div class="modal-body">
+ <table class="listTable dhis2-table-striped-border" ng-if="itemList.length > 0">
+ <tr>
+ <th colspan="4">{{'audit_date'| translate}}</th>
+ <th colspan="3">{{'audit_value'| translate}}</th>
+ <th colspan="2">{{'audit_modified'| translate}}</th>
+ </tr>
+ <tr ng-repeat="item in itemList">
+ <td colspan="4">
+ {{item.created}}
+ </td>
+ <td colspan="3">
+ {{item.value}}
+ </td>
+ <td colspan="2">
+ {{item.modifiedBy}}
+ </td>
+ </tr>
+ </table>
+ <div ng-if="itemList.length === 0">
+ {{'audit_history_unavailable'| translate}} {{trackedEntity}}
+ </div>
+</div>
+
+<div class="modal-footer">
+ <button type="button" class="btn btn-default" data-ng-click="close()">{{'close'| translate}}</button>
</div>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2016-01-27 17:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2016-02-03 10:04:07 +0000
@@ -385,7 +385,7 @@
.directive('d2Audit', function () {
return {
restrict: 'E',
- template: '<i class="glyphicon glyphicon-user audit-icon" data-ng-click="showAuditHistory()" ng-if="showAuditIcon()"></i>',
+ template: '<span class="hideInPrint audit-icon" title="{{\'audit_history\' | translate}}"><i class="glyphicon glyphicon-user" data-ng-click="showAuditHistory()" ng-if="showAuditIcon()"></i></span>',
scope:{
dataElementId: '@dataelementId',
dataElementName: '@dataelementName',
=== 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 2016-01-28 16:51:49 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2016-02-03 10:04:07 +0000
@@ -352,7 +352,6 @@
var htmlCode = programStage.dataEntryForm ? programStage.dataEntryForm.htmlCode : null;
if (htmlCode) {
-
var inputRegex = /<input.*?\/>/g,
match,
inputFields = [],
@@ -364,6 +363,7 @@
for (var i = 0; i < inputFields.length; i++) {
var inputField = inputFields[i];
+
var inputElement = $.parseHTML(inputField);
var attributes = {};
@@ -383,7 +383,7 @@
attributes['name'] = fieldId;
}
- newInputField = '<span ng-controller="InputController" class="hideInPrint"><input type="text" ' +
+ newInputField = '<span class="hideInPrint"><input type="text" ' +
this.getAttributesAsString(attributes) +
' ng-model="currentEvent.' + fieldId + '"' +
' input-field-id="' + fieldId + '"' +
@@ -394,7 +394,7 @@
' ng-class="getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id,true)"' +
' blur-or-change="saveDatavalue(prStDes.' + fieldId + ')"' +
' class="input-with-audit"' +
- ' ng-required="{{true}}"><d2-audit class="hideInPrint" is-audit-icon-present="isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
+ ' ng-required="{{true}}"></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
}
else {
fieldId = attributes['id'].substring(4, attributes['id'].length - 1).split("-")[1];
@@ -414,17 +414,18 @@
' ng-disabled="isHidden(prStDes.' + fieldId + '.dataElement.id) || selectedEnrollment.status===\'CANCELLED\' || selectedEnrollment.status===\'COMPLETED\' || currentEvent[uid]==\'uid\' || currentEvent.editingNotAllowed"' +
' ng-required="{{prStDes.' + fieldId + '.compulsory}}" ';
+ var auditField = '<d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>';
//check if dataelement has optionset
if (prStDe.dataElement.optionSetValue) {
var optionSetId = prStDe.dataElement.optionSet.id;
- newInputField = '<span ng-controller="InputController" class="hideInPrint"><ui-select ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }" theme="select2" ' + commonInputFieldProperty + ' on-select="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" >' +
- '<ui-select-match style="width:100%;" ng-class="getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)" allow-clear="true" placeholder="' + $translate.instant('select_or_search') + '">{{$select.selected.name || $select.selected}}</ui-select-match>' +
+ newInputField = '<span class="hideInPrint"><ui-select ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'90%\' : \'100%\' }" theme="select2" ' + commonInputFieldProperty + ' on-select="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" >' +
+ '<ui-select-match ng-class="getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)" 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:maxOptionSize">' +
'<span ng-bind-html="option.name | highlight: $select.search">' +
'</span>' +
'</ui-select-choices>' +
- '</ui-select><d2-audit class="hideInPrint" is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
+ '</ui-select></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
}
else {
//check data element type and generate corresponding angular input field
@@ -433,44 +434,42 @@
prStDe.dataElement.valueType === "INTEGER_POSITIVE" ||
prStDe.dataElement.valueType === "INTEGER_NEGATIVE" ||
prStDe.dataElement.valueType === "INTEGER_ZERO_OR_POSITIVE") {
- newInputField = '<span ng-controller="InputController" class="hideInPrint"><input type="number" ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }" ' +
+ newInputField = '<span class="hideInPrint"><input type="number" ' +
' d2-number-validator ' +
' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
' number-type="' + prStDe.dataElement.valueType + '" ' +
' ng-blur="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
- commonInputFieldProperty + '><d2-audit class="hideInPrint" is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
+ commonInputFieldProperty + '></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
}
else if (prStDe.dataElement.valueType === "BOOLEAN") {
- newInputField = '<span ng-controller="InputController" class="hideInPrint"><label class="radio-inline"><input type="radio" ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }" ng-change="saveDatavalue()" ' + commonInputFieldProperty + ' value="">{{\'no_value\'| translate}}</label>' +
+ newInputField = '<span class="hideInPrint"><label class="radio-inline"><input type="radio" ng-change="saveDatavalue()" ' + commonInputFieldProperty + ' value="">{{\'no_value\'| translate}}</label>' +
'<label class="radio-inline"><input type="radio" ng-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" ' + commonInputFieldProperty + ' value="true">{{\'yes\'| translate}}</label>' +
- '<label class="radio-inline"><input type="radio" ng-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" ' + commonInputFieldProperty + ' value="false">{{\'no\'| translate}}</label><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span>' +
+ '<label class="radio-inline"><input type="radio" ng-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" ' + commonInputFieldProperty + ' value="false">{{\'no\'| translate}}</label></span>' +
'<span class="not-for-screen"><label class="radio-inline"><input type="radio" ng-checked="{{\'true\' === currentEvent.' + fieldId + '}}">{{\'yes\'| translate}}</label>' +
'<label class="radio-inline"><input type="radio" ng-checked="{{\'false\' === currentEvent.' + fieldId + '}}">{{\'no\'| translate}}</label></span>';
}
else if (prStDe.dataElement.valueType === "DATE") {
var maxDate = prStDe.allowFutureDate ? '' : 0;
- newInputField = '<span ng-controller="InputController" class="hideInPrint"><input type="text" ' +
+ newInputField = '<span class="hideInPrint"><input type="text" ' +
' placeholder="{{dhis2CalendarFormat.keyDateFormat}}" ' +
' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
- ' ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }"'+
' d2-date ' +
' d2-date-validator ' +
' max-date="' + maxDate + '"' +
' blur-or-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
- commonInputFieldProperty + ' ><d2-audit class="hideInPrint" is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
+ commonInputFieldProperty + ' ></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
}
else if (prStDe.dataElement.valueType === "TRUE_ONLY") {
newInputField = '<span class="hideInPrint"><input type="checkbox" ' +
' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
' ng-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
- commonInputFieldProperty + ' ><d2-audit class="hideInPrint" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="checkbox" ng-checked={{currentEvent.' + fieldId + '}}></span>';
+ commonInputFieldProperty + ' ></span><span class="not-for-screen"><input type="checkbox" ng-checked={{currentEvent.' + fieldId + '}}></span>';
}
else if (prStDe.dataElement.valueType === "LONG_TEXT") {
- newInputField = '<span ng-controller="InputController" class="hideInPrint"><textarea row="3" ' +
+ newInputField = '<span class="hideInPrint"><textarea row="3" ' +
' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
' ng-blur="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
- ' ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }"' +
- commonInputFieldProperty + '></textarea><d2-audit class="hideInPrint" is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><textarea row="3" value={{currentEvent.' + fieldId + '}}></textarea></span>';
+ commonInputFieldProperty + '></textarea></span><span class="not-for-screen"><textarea row="3" value={{currentEvent.' + fieldId + '}}></textarea></span>';
}
else if (prStDe.dataElement.valueType === "FILE_RESOURCE") {
newInputField = '<span class="input-group">\n\
@@ -491,18 +490,16 @@
d2-file-input="currentEvent"\n\
d2-file-input-current-name="currentFileNames"\n\
d2-file-input-name="fileNames">\n\
- <d2-audit class="hideInPrint" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit> \n\
</span>\n\
</span>\n\
</span>\n\
</span>';
}
else {
- newInputField = '<span ng-controller="InputController" class="hideInPrint"><input type="text" ' +
+ newInputField = '<span class="hideInPrint"><input type="text" ' +
' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
- ' ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }"' +
' ng-blur="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
- commonInputFieldProperty + ' ><d2-audit class="hideInPrint" is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
+ commonInputFieldProperty + '></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
}
}
}
@@ -514,6 +511,8 @@
DialogService.showDialog({}, dialogOptions);
return;
}
+
+ newInputField += auditField;
}
newInputField = newInputField + ' <span ng-messages="outerForm.' + fieldId + '.$error" class="required" ng-if="interacted(outerForm.' + fieldId + ')" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html"></span>';
@@ -577,7 +576,7 @@
//check if attribute has optionset
if (att.optionSetValue) {
var optionSetId = att.optionSet.id;
- newInputField = '<span ng-controller="InputController"><ui-select ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }" theme="select2" ' + commonInputFieldProperty + ' on-select="teiValueUpdated(selectedTei,\'' + attId + '\')" >' +
+ newInputField = '<span ng-controller="InputController"><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:maxOptionSize">' +
@@ -644,7 +643,7 @@
commonInputFieldProperty + ' ></textarea><d2-audit class="hideInPrint" dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
}
else {
- newInputField = '<span ng-controller="InputController"><input ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }" type="text" ' +
+ newInputField = '<span ng-controller="InputController"><input type="text" ' +
' ng-blur="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
commonInputFieldProperty + '><d2-audit class="hideInPrint" is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
}