Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Chosen.js for the rule field, again #12877

Merged
merged 2 commits into from
Dec 10, 2016
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
13 changes: 13 additions & 0 deletions media/jui/js/chosen.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Full source at https://github.com/harvesthq/chosen
Copyright (c) 2011-2016 Harvest http://getharvest.com

Modified for Joomla! UI:
- revert the check for instance type of data-chosen, to allow to disable Chosen for field with data-chosen="true", @see https://github.com/joomla/joomla-cms/pull/12877
- rename the css and javascript classes and functions to revert back to using chzn and liszt
- fix zero width, based on https://github.com/harvesthq/chosen/pull/1439
- allow to add a custom value on fly, based on https://github.com/harvesthq/chosen/pull/749
Expand Down Expand Up @@ -593,9 +594,21 @@ This file is generated by `grunt build`, do not edit it by hand.
}
return;
}
/*<JUI>*/
/*
This changes allow to prevent Chosen.js initialization for <select> field by adding data-chosen="true" to this tag,
we need it because in a lot layouts Joomla! applies Chosen.js to all <select> on the page.
@see https://github.com/joomla/joomla-cms/pull/12877
*/
/* Original:
if (!(chosen instanceof Chosen)) {
$this.data('chosen', new Chosen(this, options));
}
*/
if (!chosen) {
$this.data('chosen', new Chosen(this, options));
}
/*</JUI>*/
});
}
});
Expand Down
Loading