Skip to content

Commit

Permalink
Merge pull request #169 from devgateway/fix/#167/bootstrap-theme-select2
Browse files Browse the repository at this point in the history
Fixes #167
  • Loading branch information
ionutdobre authored May 22, 2017
2 parents 628136e + 7a3fe65 commit d9a8780
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
*/
package org.devgateway.toolkit.forms.wicket.components.form;

import de.agilecoders.wicket.core.util.Attributes;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.model.IModel;
import org.wicketstuff.select2.ChoiceProvider;
import org.wicketstuff.select2.Select2BootstrapTheme;
import org.wicketstuff.select2.Select2Choice;

import de.agilecoders.wicket.core.util.Attributes;

/**
* @author mpostelnicu
*
Expand Down Expand Up @@ -80,6 +80,7 @@ protected void onInitialize() {
field.getSettings().setAllowClear(true);
field.getSettings().setCloseOnSelect(true);
field.getSettings().setDropdownAutoWidth(true);
field.getSettings().setTheme(new Select2BootstrapTheme(false));
super.onInitialize();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.model.IModel;
import org.wicketstuff.select2.ChoiceProvider;
import org.wicketstuff.select2.Select2BootstrapTheme;
import org.wicketstuff.select2.Select2MultiChoice;

import de.agilecoders.wicket.core.util.Attributes;
Expand Down Expand Up @@ -79,6 +80,7 @@ protected void onInitialize() {
field.getSettings().setAllowClear(true);
field.getSettings().setCloseOnSelect(true);
field.getSettings().setDropdownAutoWidth(true);
field.getSettings().setTheme(new Select2BootstrapTheme(false));
field.getSettings().setEscapeMarkup("function (m) {return m;}");
super.onInitialize();

Expand Down

0 comments on commit d9a8780

Please sign in to comment.