Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/gui/app/directives/modals/setups/create-setup-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
controller: function(commandsService, countersService, currencyService,
effectQueuesService, eventsService, hotkeyService, presetEffectListsService,
timerService, viewerRolesService, quickActionsService, accountAccess, utilityService,
ngToast, backendCommunicator, $q) {
ngToast, backendCommunicator, sortTagsService, $q) {

const $ctrl = this;

Expand Down Expand Up @@ -161,7 +161,8 @@
const components = componentConfig.all.map(c => {
return {
id: c.id,
name: c[componentConfig.nameField]
name: c[componentConfig.nameField],
tags: sortTagsService.getSortTagsForItem(componentConfig.key, c.sortTags).map(st => st.name)
};
});
const selectedIds = $ctrl.setup.components[componentConfig.key].map(c => c.id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
<div id="roles" class="modal-subheader" style="padding: 0 0 4px 0">
{{$ctrl.label}}
</div>
<div style="height: 55px; display: flex; align-items: center;">
<searchbar search-id="componentSearch" placeholder-text="Search {{$ctrl.label}}..." query="$ctrl.componentSearch" style="width: 100%;"></searchbar>
</div>
<div class="viewer-group-list" style="height: inherit; min-height: 100px;max-height: 300px;">
<label ng-repeat="component in $ctrl.allComponents track by component.id" class="control-fb control--checkbox">{{component.name}}
<label ng-repeat="component in $ctrl.allComponents | filter:$ctrl.componentSearch track by component.id" class="control-fb control--checkbox">{{component.name}}
<input type="checkbox" ng-click="$ctrl.toggleComponentSelected(component.id)" ng-checked="$ctrl.componentIsSelected(component.id)" aria-label="..." >
<div class="control__indicator"></div>
</label>
Expand All @@ -29,7 +32,7 @@
close: "&",
dismiss: "&"
},
controller: function() {
controller: function($timeout) {
const $ctrl = this;

$ctrl.label = "";
Expand All @@ -56,6 +59,10 @@
if ($ctrl.resolve.selectedIds) {
$ctrl.selectedIds = $ctrl.resolve.selectedIds;
}

$timeout(() => {
angular.element("#componentSearch").trigger("focus");
}, 50);
};

$ctrl.save = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/app/services/sort-tags.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
/**
* @param {string} context
* @param {string[]} tagIds
* @returns {string[]}
* @returns {SortTag[]}
*/
service.getSortTagsForItem = (context, tagIds) => {
if (context == null || tagIds == null) {
Expand Down