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

Fix dropdown fields #51

Merged
merged 1 commit into from
Oct 26, 2016
Merged

Conversation

derralf
Copy link

@derralf derralf commented Oct 17, 2016

Changed BootstrapDropdownField to avoid conflicts with DropdownField and ChosenDropdownfield.

BootstrapDropdownField:
Changed to render with default Dropdownfield.ss template.
Use bootstrap-select JS plugin by adding ExtraClass 'selectpicker'.
Add option bootstrap_select_included to config.yml

ChosenDropdownField
Include/add chosen v1.6.2 library
With bootstrap_included set to false: load silverstripe thirdparty jquery and /admin/thirdparty/chosen/chosen/chosen.jquery.js
With bootstrap_included set to true: load chosen v1.6.2 (silverstripe bundled version /admin/thirdparty/chosen/chosen/chosen.jquery.js uses jQuery.browser() method which is removed since jQuery 1.9 – but Bootstrap 3.3.6 and above requires jQuery 1.9.1+)

caveats:
BootstrapDropdownField can't be used with jquery_included set to false, as this will include the ss-bundled version which is too low.
To use BootstrapDropdownField you will need to include jQuery 1.9.1+ (Bootstrap 3.3.x requires 1.9.1+ anyway)

Changed BootstrapDropdownField to avoid conflicts with with
DropdownField and ChosenDropdownfield.

BootstrapDropdownField:
Changed to render with default Dropdownfield.ss template.
Use bootstrap-select JS plugin by adding ExtraClass 'selectpicker'.
Add option bootstrap_select_included to config.yml

ChosenDropdownField
Include/add chosen v1.6.2 library
With bootstrap_included set to false: load silverstripe thirdparty
jquery and /admin/thirdparty/chosen/chosen/chosen.jquery.js
With bootstrap_included set to true: load chosen v1.6.2
(silverstripe bundled version
/admin/thirdparty/chosen/chosen/chosen.jquery.js uses jQuery.browser()
method which removed since jQuery 1.9 – but Bootstrap 3.3.6 and above
requires jQuery 1.9.1+)

caveats:
BootstrapDropdownField can't be used with jquery_included set to false,
as this will include the ss-bundled version which is too low.
To use BootstrapDropdownField you will need to include jQuery 1.9.1+
(Bootstrap 3.3 and above requires 1.9.1+ anyway)
@unclecheese unclecheese merged commit 524b7e2 into unclecheese:master Oct 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants