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:
aounhaider1 2016-04-08 15:47:31 +02:00 коммит произвёл Kai Kreuzer
Родитель 2be0c09cff
Коммит 14d090f471
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -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>