Commit 0e3a421fbbf7757d720070538b582d0b7ab4e063
Committed by
Andrew Shvayka
1 parent
9e9b0d75
Format & clear unnecessary
Showing
2 changed files
with
23 additions
and
14 deletions
... | ... | @@ -249,7 +249,7 @@ function MultipleInputWidgetController($q, $scope, $translate, attributeService, |
249 | 249 | |
250 | 250 | //For backward compatibility |
251 | 251 | if (angular.isUndefined(source.keys[j].settings.dataKeyType)) { |
252 | - if (vm.settings.attributesShared === true) { | |
252 | + if (vm.settings.attributesShared) { | |
253 | 253 | source.keys[j].settings.dataKeyType = 'shared'; |
254 | 254 | } else { |
255 | 255 | source.keys[j].settings.dataKeyType = 'server'; |
... | ... | @@ -257,7 +257,7 @@ function MultipleInputWidgetController($q, $scope, $translate, attributeService, |
257 | 257 | } |
258 | 258 | |
259 | 259 | if (angular.isUndefined(source.keys[j].settings.dataKeyValueType)) { |
260 | - if (source.keys[j].settings.inputTypeNumber === true) { | |
260 | + if (source.keys[j].settings.inputTypeNumber) { | |
261 | 261 | source.keys[j].settings.dataKeyValueType = 'double'; |
262 | 262 | } else { |
263 | 263 | source.keys[j].settings.dataKeyValueType = 'string'; |
... | ... | @@ -265,7 +265,7 @@ function MultipleInputWidgetController($q, $scope, $translate, attributeService, |
265 | 265 | } |
266 | 266 | |
267 | 267 | if (angular.isUndefined(source.keys[j].settings.isEditable)) { |
268 | - if (source.keys[j].settings.readOnly === true) { | |
268 | + if (source.keys[j].settings.readOnly) { | |
269 | 269 | source.keys[j].settings.isEditable = 'readonly'; |
270 | 270 | } else { |
271 | 271 | source.keys[j].settings.isEditable = 'editable'; | ... | ... |
... | ... | @@ -18,9 +18,12 @@ |
18 | 18 | <form class="tb-multiple-input" name="multipleInputForm" ng-submit="vm.save()" novalidate autocomplete="off"> |
19 | 19 | <div style="padding: 0 8px;" ng-if="vm.entityDetected && vm.isAllParametersValid"> |
20 | 20 | <fieldset ng-repeat="source in vm.sources" ng-class="{'fields-group': vm.settings.showGroupTitle}"> |
21 | - <legend class="group-title" ng-if="vm.settings.showGroupTitle">{{ vm.getGroupTitle(source.datasource) }}</legend> | |
22 | - <div layout="row" layout-wrap ng-class="{'vertical-alignment': vm.isVerticalAlignment || vm.changeAlignment}"> | |
23 | - <div ng-repeat="key in source.keys" ng-if="!key.settings.dataKeyHidden" ng-style="{'width': (vm.isVerticalAlignment || vm.changeAlignment) ? '100%' : vm.inputWidthSettings}"> | |
21 | + <legend class="group-title" ng-if="vm.settings.showGroupTitle">{{ vm.getGroupTitle(source.datasource) }} | |
22 | + </legend> | |
23 | + <div layout="row" layout-wrap | |
24 | + ng-class="{'vertical-alignment': vm.isVerticalAlignment || vm.changeAlignment}"> | |
25 | + <div ng-repeat="key in source.keys" ng-if="!key.settings.dataKeyHidden" | |
26 | + ng-style="{'width': (vm.isVerticalAlignment || vm.changeAlignment) ? '100%' : vm.inputWidthSettings}"> | |
24 | 27 | <div class="input-field" ng-if="(key.settings.dataKeyValueType === 'string')"> |
25 | 28 | <md-input-container class="md-block"> |
26 | 29 | <label>{{key.label}}</label> |
... | ... | @@ -82,7 +85,7 @@ |
82 | 85 | </div> |
83 | 86 | </md-input-container> |
84 | 87 | </div> |
85 | - <div class="input-field" ng-if="(key.settings.dataKeyValueType === 'booleanCheckbox')" class="md-block"> | |
88 | + <div class="input-field md-block" ng-if="(key.settings.dataKeyValueType === 'booleanCheckbox')"> | |
86 | 89 | <md-checkbox name="{{key.name}}" |
87 | 90 | ng-disabled="key.settings.isEditable === 'disabled' || key.settings.disabledOnCondition" |
88 | 91 | ng-model="key.data.currentValue" |
... | ... | @@ -90,7 +93,7 @@ |
90 | 93 | {{key.label}} |
91 | 94 | </md-checkbox> |
92 | 95 | </div> |
93 | - <div class="input-field" ng-if="(key.settings.dataKeyValueType === 'booleanSwitch')" class="md-block"> | |
96 | + <div class="input-field md-block" ng-if="(key.settings.dataKeyValueType === 'booleanSwitch')"> | |
94 | 97 | <md-switch name="{{key.name}}" |
95 | 98 | ng-disabled="key.settings.isEditable === 'disabled' || key.settings.disabledOnCondition" |
96 | 99 | ng-model="key.data.currentValue" |
... | ... | @@ -132,21 +135,27 @@ |
132 | 135 | </div> |
133 | 136 | </div> |
134 | 137 | </fieldset> |
135 | - <div class="md-padding" layout="row" layout-align="end center" ng-if="vm.entityDetected && vm.settings.showActionButtons"> | |
136 | - <md-button class="md-primary" ng-click="vm.discardAll()" style="max-height: 50px; margin-right:20px;" ng-disabled="!multipleInputForm.$dirty"> | |
138 | + <div class="md-padding" layout="row" layout-align="end center" | |
139 | + ng-if="vm.entityDetected && vm.settings.showActionButtons"> | |
140 | + <md-button class="md-primary" ng-click="vm.discardAll()" style="max-height: 50px; margin-right:20px;" | |
141 | + ng-disabled="!multipleInputForm.$dirty"> | |
137 | 142 | {{ 'action.undo' | translate }} |
138 | 143 | </md-button> |
139 | - <md-button class="md-raised md-primary" type="submit" value="Submit" style="max-height: 50px; margin-right:20px;" | |
140 | - ng-disabled="!multipleInputForm.$dirty || multipleInputForm.$invalid" ng-click="vm.isFocused = false"> | |
144 | + <md-button class="md-raised md-primary" type="submit" value="Submit" | |
145 | + style="max-height: 50px; margin-right:20px;" | |
146 | + ng-disabled="!multipleInputForm.$dirty || multipleInputForm.$invalid" | |
147 | + ng-click="vm.isFocused = false"> | |
141 | 148 | {{ 'action.save' | translate }} |
142 | 149 | </md-button> |
143 | 150 | </div> |
144 | 151 | </div> |
145 | - <div class="tb-multiple-input__errors" layout="column" layout-align="center center" style="height: 100%;" ng-if="!vm.entityDetected || !vm.isAllParametersValid"> | |
152 | + <div class="tb-multiple-input__errors" layout="column" layout-align="center center" style="height: 100%;" | |
153 | + ng-if="!vm.entityDetected || !vm.isAllParametersValid"> | |
146 | 154 | <div style="text-align: center; font-size: 18px; color: #a0a0a0;" ng-hide="vm.entityDetected"> |
147 | 155 | {{ 'widgets.input-widgets.no-entity-selected' | translate }} |
148 | 156 | </div> |
149 | - <div style="text-align: center; font-size: 18px; color: #a0a0a0;" ng-show="vm.entityDetected && !vm.isAllParametersValid"> | |
157 | + <div style="text-align: center; font-size: 18px; color: #a0a0a0;" | |
158 | + ng-show="vm.entityDetected && !vm.isAllParametersValid"> | |
150 | 159 | {{ 'widgets.input-widgets.not-allowed-entity' | translate }} |
151 | 160 | </div> |
152 | 161 | </div> | ... | ... |