|
|
|
@ -15,22 +15,34 @@ |
|
|
|
limitations under the License. |
|
|
|
|
|
|
|
--> |
|
|
|
<form class="tb-multiple-input" name="multipleInputForm" ng-submit="vm.postData($event)"> |
|
|
|
<form class="tb-multiple-input" name="multipleInputForm" ng-submit="vm.postData($event)" novalidate> |
|
|
|
<div style="padding: 0 8px; margin: auto 0;"> |
|
|
|
<div ng-show="vm.entityDetected" layout="row" flex ng-repeat="row in vm.rows track by $index"> |
|
|
|
<div layout="column" flex ng-repeat="key in row.data track by $index"> |
|
|
|
<md-input-container class="md-icon-float" ng-style="vm.cellStyle(key)"> |
|
|
|
<label>{{key.label}}</label> |
|
|
|
<md-icon class="material-icons" ng-if="key.settings.icon"> |
|
|
|
<div ng-show="vm.entityDetected" layout="row" flex ng-repeat="row in vm.rows" ng-init="rowIndex=$index"> |
|
|
|
<div layout="column" flex ng-repeat="key in row.data track by $index" ng-init="keyIndex=$index"> |
|
|
|
<md-tooltip class="tb-tooltip-multiline" ng-if="key.settings.tooltipMessage && key.settings.tooltipMessage.length" md-direction="left"> |
|
|
|
<span ng-bind-html="key.settings.tooltipMessage"></span> |
|
|
|
</md-tooltip> |
|
|
|
<md-input-container class="md-block" ng-style="vm.cellStyle(key, rowIndex, $first, $last)"> |
|
|
|
<label ng-style="vm.textColor(key)">{{key.label}}</label> |
|
|
|
<md-icon ng-style="vm.textColor(key)" class="material-icons" ng-if="key.settings.icon"> |
|
|
|
{{key.settings.icon}} |
|
|
|
</md-icon> |
|
|
|
<input name="key.name" |
|
|
|
<input name="value{{rowIndex}}{{keyIndex}}" |
|
|
|
ng-style="vm.textColor(key)" |
|
|
|
ng-disabled="key.settings.readOnly" |
|
|
|
ng-model="key.currentValue" |
|
|
|
min="{{key.settings.min}}" |
|
|
|
max="{{key.settings.max}}" |
|
|
|
ng-required="key.settings.required" |
|
|
|
type="{{key.settings.inputType}}" |
|
|
|
step="{{key.settings.step}}" |
|
|
|
md-select-on-focus |
|
|
|
ng-change="vm.inputChanged()"> |
|
|
|
<div ng-messages="multipleInputForm['value' + rowIndex + keyIndex].$error"> |
|
|
|
<div ng-message="min">Value must be greater than {{key.settings.min}}</div> |
|
|
|
<div ng-message="max">Value must be lower than {{key.settings.max}}</div> |
|
|
|
<div ng-message="required">This field is required</div> |
|
|
|
</div> |
|
|
|
</md-input-container> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -44,12 +56,12 @@ |
|
|
|
Timeseries parameter cannot be used in this widget |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="footer md-padding" layout="row" layout-align="end center" ng-show="vm.entityDetected && vm.dataKeyDetected"> |
|
|
|
<div class="md-padding" layout="row" layout-align="end center" ng-show="vm.entityDetected && vm.dataKeyDetected"> |
|
|
|
<md-button class="md-primary" ng-click="vm.discardAll()" style="max-height: 50px;margin-right:20px;" ng-disabled="!vm.hasAnyChange"> |
|
|
|
{{ 'action.discard-changes' | translate }} |
|
|
|
{{ 'action.undo' | translate }} |
|
|
|
</md-button> |
|
|
|
<md-button class="md-raised md-primary" type="submit" value="Submit" style="max-height: 50px;margin-right:20px;" |
|
|
|
ng-disabled="!vm.hasAnyChange" ng-click="vm.isFocused = false"> |
|
|
|
ng-disabled="!vm.hasAnyChange || multipleInputForm.$invalid" ng-click="vm.isFocused = false"> |
|
|
|
{{ 'action.save' | translate }} |
|
|
|
</md-button> |
|
|
|
</div> |
|
|
|
|