User tests: Successful: Unsuccessful:
While updating The TinyMCE I stumbled over this function. The function disables/enables options, so user levels can only be selected only once.
For fancy select there is no native option to disable/enable options and it's complex to do this. So this PR adds a short hand.
fancyselect.disableByValue("2");
fancyselect.enableByValue("2");
fancyselect.disableAllOptions();
fancyselect.enableAllOptions();
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change |
This change tested with choices v 6.0.3, same pb.
I didn't post this on issue tracker because it's not related to the fancy select file used now.
Labels |
Added:
NPM Resource Changed
?
|
@bembelimen
maybe in the key functions ?
https://github.com/jshjohnson/Choices/blob/master/public/assets/scripts/choices.js
line 670
custom-event-polyfill not accessible from choices.js
I guess it's because these new requirements by choices.js v 6.0.3 not added in package-lock.json
"custom-event-polyfill": "^0.3.0",
"deepmerge": "^2.2.1"
In build/build-modules-js/settings.json, paths not correct.
When I get choicesjs v 6.0.3 via NPM, I get these new paths:
"choices.js": {
"name": "choicesjs",
"js": {
"public/assets/scripts/choices.js": "js/choices.js",
"public/assets/scripts/choices.min.js": "js/choices.min.js"
},
"css": {
"public/assets/styles/choices.css": "css/choices.css",
"public/assets/styles/choices.min.css": "css/choices.min.css"
},
Hi @ghazal thanks for your feedback, but the paths are equal to yours: https://github.com/joomla/joomla-cms/pull/24211/files#diff-185f265f952db15b3bbc2bf2a06f0fc4
custom-event-polyfill not accessible from choices.js
When do you get this error? I can't reproduce it.
https://github.com/joomla/joomla-cms/pull/24211/files#diff-32607347f8126e6534ebc7ebaec4853dR1886
@bembelimen
I clone your fork with git
git clone --depth=1 -b fancy-select-option https://github.com/bembelimen/joomla-cms/
*as of today, npm works fine since the 2 libs (deepmerge and custom-event-polyfill) has been added to package-lock.json
there is a typo in fancy select - the dev of choices.js had modified it in his choices script.
this.choicesInstance.presetChoices this.choicesInstance._presetChoices
line 1767
a "paste" event is missing in fancy select when checking event
with the Firefox Inspector.
In choices.js , it's in key addEventListeners (and in key removeEventListeners)
Hope it helps.
Hope it helps.
Definitely, thanks for that.
Just saw the error last night :)
I have to extend the additional disable stuff with some more checks, the Choice.js misses a good API... I'm working on it.
Category | JavaScript Repository NPM Change | ⇒ | JavaScript Repository |
Labels |
Removed:
J4 Issue
|
Category | JavaScript Repository | ⇒ | Repository JavaScript NPM Change |
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-04-16 16:19:34 |
Closed_By | ⇒ | HLeithner |
thx
I guess (suggest) choices.js should be updated. We are using version 3.0.4 while it's been updated up to 6.0.3.
But fancy select has to be modified accordingly.
With choices v.6.0.3 (and our actual fancy select), select is working - well in a fashion, it's not displaying the drop-down.
Input of a new tag is not.
I have been wondering if this was related to a change in 4.1.0
"A Choices input will now be disabled when loading remote data and will be enabled once the data has loaded."