зеркало из https://github.com/mozilla/smarthome.git
fixes invalid configurations shown in modules (#1347)
PR: https://github.com/eclipse/smarthome/pull/1347 Signed-off-by: Aoun Bukhari <bukhari@itemis.de>
This commit is contained in:
Родитель
2be0c09cff
Коммит
14d090f471
|
@ -10,7 +10,9 @@ angular.module('PaperUI.controllers.rules').controller('addModuleDialogControlle
|
|||
$scope.moduleData = objectFilter(data, {
|
||||
visibility : 'VISIBLE'
|
||||
});
|
||||
setConfigurations();
|
||||
if ($scope.id) {
|
||||
setConfigurations();
|
||||
}
|
||||
});
|
||||
$scope.id = module.id;
|
||||
$scope.type = type;
|
||||
|
|
|
@ -47,7 +47,8 @@
|
|||
</p>
|
||||
</div>
|
||||
<div ng-switch-when="select">
|
||||
<md-input-container> <label>{{parameter.label}}</label> <md-select class="config-select" isrequired="parameter.required" ng-init="focus=false" name="{{parameter.name}}" ng-model="configuration[parameter.name]" placeholder="Select a value" ng-focus="focus=true" ng-blur="focus=false" ng-required="parameter.required"> <md-option ng-value="option.value?option.value:option.name" ng-repeat="option in parameter.options"> <span style="display: inline-block;" ng-if="parameter.context=='item'">
|
||||
<label class="config-textInput">{{parameter.label}}</label>
|
||||
<md-input-container> <md-select class="config-select" isrequired="parameter.required" ng-init="focus=false" name="{{parameter.name}}" ng-model="configuration[parameter.name]" placeholder="Select a value" ng-focus="focus=true" ng-blur="focus=false" ng-required="parameter.required"> <md-option ng-value="option.value?option.value:option.name" ng-repeat="option in parameter.options"> <span style="display: inline-block;" ng-if="parameter.context=='item'">
|
||||
{{ option.label?option.label:option.name }}
|
||||
<span class="md-caption" style="color: grey;">({{ option.name?option.name:'' }}) </span>
|
||||
</span> <span ng-if="!parameter.context">{{option.label}}</span> </md-option> </md-select>
|
||||
|
|
Загрузка…
Ссылка в новой задаче