Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Commit

Permalink
feat(Items): Add tagging to item editor
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
  • Loading branch information
cdjackson committed May 22, 2016
1 parent f6ffe27 commit e20c646
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
20 changes: 18 additions & 2 deletions src/app/configuration/itemEdit.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ <h3 class="modal-title" i18n="item.EditTitle"></h3>
<ui-select id="inputCategory"
ng-model="item.category"
theme="bootstrap"
search-enabled="false"
>
search-enabled="false">
<ui-select-match i18n-attr="{placeholder: 'item.SelectCategory'}">
<habmin-icon class="fa fa-fw" category="{{$select.selected.id}}"></habmin-icon>
{{$select.selected.name}}
Expand All @@ -64,6 +63,23 @@ <h3 class="modal-title" i18n="item.EditTitle"></h3>
</div>
</div>

<div class="form-group">
<label for="inputTags" class="control-label" i18n="item.EditTags"></label>

<div>
<ui-select id="inputTags"
multiple tagging tagging-label="(custom 'new' label)"
ng-model="item.tags"
theme="bootstrap"
sortable="true">
<ui-select-match placeholder="Select colors...">{{$item}}</ui-select-match>
<ui-select-choices repeat="color in availableColors | filter:$select.search">
{{color}}
</ui-select-choices>
</ui-select>
</div>
</div>

<div class="form-group">
<label for="inputGroups" class="control-label" i18n="item.EditGroups"></label>

Expand Down
8 changes: 5 additions & 3 deletions src/app/configuration/thingAttributesZWave.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

<div class="row">
<div class="col-md-4" i18n="zwave.Manufacturer"></div>
<div class="col-md-8">{{dec2hex(selectedThing.properties['zwave_manufacturer'], 4)}}</div>
<div class="col-md-8" ng-if="selectedThing.properties['zwave_manufacturer']">
{{dec2hex(selectedThing.properties['zwave_manufacturer'], 4)}}
</div>
</div>
<div class="row">
<div class="col-md-4" i18n="zwave.TypeId"></div>
<div class="col-md-8">{{dec2hex(selectedThing.properties['zwave_devicetype'],
4)}}:{{dec2hex(selectedThing.properties['zwave_deviceid'], 4)}}
<div class="col-md-8" ng-if="selectedThing.properties['zwave_devicetype']">
{{dec2hex(selectedThing.properties['zwave_devicetype'],4)}}:{{dec2hex(selectedThing.properties['zwave_deviceid'],4)}}
</div>
</div>
<div class="row">
Expand Down
2 changes: 2 additions & 0 deletions src/languages/en-GB/item.lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
"EditLabel": "Label",
"EditFormat": "Format",
"EditType": "Item Type",
"EditTags": "Tags",
"EditCategory": "Category",
"EditGroups": "Groups",
"SelectName": "Enter name...",
"SelectLabel": "Enter label...",
"SelectTags": "Select tags...",
"SelectCategory": "Select category...",
"SelectGroup": "Select groups...",
"SelectType": "Select type...",
Expand Down

0 comments on commit e20c646

Please sign in to comment.