-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from phyzical/feature/adjusting-quote-escaping
Feature/adjusting quote escaping
- Loading branch information
Showing
7 changed files
with
159 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 2 additions & 94 deletions
96
src/docker.labelInjector/usr/local/emhttp/plugins/docker.labelInjector/scripts/config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,8 @@ | ||
|
||
$(document).ready(function () { | ||
// Passing options (with default options) | ||
new Choices($('#labels')[0], { | ||
silent: false, | ||
items: [], | ||
choices: [], | ||
renderChoiceLimit: -1, | ||
maxItemCount: -1, | ||
closeDropdownOnSelect: 'auto', | ||
singleModeForMultiSelect: false, | ||
addChoices: true, | ||
addItems: true, | ||
generateDropdown('#labels', { | ||
addItemFilter: (value) => { | ||
return !!value && value !== '' && value.includes('=') | ||
}, | ||
removeItems: true, | ||
removeItemButton: true, | ||
removeItemButtonAlignLeft: false, | ||
editItems: true, | ||
allowHTML: false, | ||
allowHtmlUserInput: false, | ||
duplicateItemsAllowed: true, | ||
delimiter: ',', | ||
paste: true, | ||
searchEnabled: true, | ||
searchChoices: true, | ||
searchFloor: 1, | ||
searchResultLimit: 4, | ||
searchFields: ['label', 'value'], | ||
position: 'auto', | ||
resetScrollPosition: true, | ||
shouldSort: true, | ||
shouldSortItems: false, | ||
shadowRoot: null, | ||
placeholder: true, | ||
placeholderValue: null, | ||
searchPlaceholderValue: null, | ||
prependValue: null, | ||
appendValue: null, | ||
renderSelectedChoices: 'auto', | ||
loadingText: 'Loading...', | ||
noResultsText: 'No results found', | ||
noChoicesText: 'No choices to choose from', | ||
itemSelectText: 'Press to select', | ||
uniqueItemText: 'Only unique values can be added', | ||
customAddItemText: 'Only values containing "=" can be added, i.e `LABEL_A=VALUE_A', | ||
addItemText: (value) => { | ||
return `Press Enter to add <b>"${value}"</b>`; | ||
}, | ||
removeItemIconText: () => `Remove item`, | ||
removeItemLabelText: (value) => `Remove item: ${value}`, | ||
maxItemText: (maxItemCount) => { | ||
return `Only ${maxItemCount} values can be added`; | ||
}, | ||
valueComparer: (value1, value2) => { | ||
return value1 === value2; | ||
}, | ||
classNames: { | ||
containerOuter: ['choices'], | ||
containerInner: ['choices__inner'], | ||
input: ['choices__input'], | ||
inputCloned: ['choices__input--cloned'], | ||
list: ['choices__list'], | ||
listItems: ['choices__list--multiple'], | ||
listSingle: ['choices__list--single'], | ||
listDropdown: ['choices__list--dropdown'], | ||
item: ['choices__item'], | ||
itemSelectable: ['choices__item--selectable'], | ||
itemDisabled: ['choices__item--disabled'], | ||
itemChoice: ['choices__item--choice'], | ||
description: ['choices__description'], | ||
placeholder: ['choices__placeholder'], | ||
group: ['choices__group'], | ||
groupHeading: ['choices__heading'], | ||
button: ['choices__button'], | ||
activeState: ['is-active'], | ||
focusState: ['is-focused'], | ||
openState: ['is-open'], | ||
disabledState: ['is-disabled'], | ||
highlightedState: ['is-highlighted'], | ||
selectedState: ['is-selected'], | ||
flippedState: ['is-flipped'], | ||
loadingState: ['is-loading'], | ||
notice: ['choices__notice'], | ||
addChoice: ['choices__item--selectable', 'add-choice'], | ||
noResults: ['has-no-results'], | ||
noChoices: ['has-no-choices'], | ||
}, | ||
// Choices uses the great Fuse library for searching. You | ||
// can find more options here: https://fusejs.io/api/options.html | ||
fuseOptions: { | ||
includeScore: true | ||
}, | ||
labelId: '', | ||
callbackOnInit: null, | ||
callbackOnCreateTemplates: null, | ||
appendGroupInSearch: false, | ||
}); | ||
}) | ||
}); |
Oops, something went wrong.