1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Selectize styling

This commit is contained in:
Cameron 2017-02-01 12:22:36 -08:00
parent 883d8623bd
commit de1730b2b6
3 changed files with 13 additions and 5 deletions

View File

@ -732,27 +732,28 @@ class e_form
}
*/
if(vartrue($options['selectize']))
if(!empty($options['selectize']))
{
e107::js('core', 'selectize/js/selectize.min.js', 'jquery');
e107::css('core', 'selectize/css/selectize.css', 'jquery');
if(deftrue('BOOTSTRAP') === 3)
{
e107::css('core', 'selectize/css/selectize.bootstrap3.css', 'jquery');
// e107::css('core', 'selectize/css/selectize.bootstrap3.css', 'jquery');
}
elseif(deftrue('BOOTSTRAP'))
{
e107::css('core', 'selectize/css/selectize.bootstrap2.css', 'jquery');
// e107::css('core', 'selectize/css/selectize.bootstrap2.css', 'jquery');
}
// Load selectize behavior.
e107::js('core', 'selectize/js/selectize.init.js', 'jquery');
$options['selectize']['wrapperClass'] = 'selectize-control';
$options['selectize']['inputClass'] = 'selectize-input';
$options['selectize']['inputClass'] = 'selectize-input form-control';
$options['selectize']['dropdownClass'] = 'selectize-dropdown';
$options['selectize']['dropdownContentClass'] = 'selectize-dropdown-content';
$options['selectize']['copyClassesToDropdown'] = true;
$jsSettings = array(
'id' => vartrue($options['id'], $this->name2id($name)),
@ -765,6 +766,8 @@ class e_form
// Merge field settings with other selectize field settings.
e107::js('settings', array('selectize' => array($jsSettings)));
$options['class'] = '';
}
// TODO: remove typeahead.

View File

@ -1191,7 +1191,11 @@ li.rssRow > div {
.admin-left-panel.toggled { display: none }
/* ######## selectize.js ######## *
/* ######## selectize.js ######## */
.selectize-input input { color: inherit }
/*
.selectize-control.single .selectize-input,
.selectize-control.single .selectize-input.input-active,

View File

@ -102,6 +102,7 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
inputClass: item.options.inputClass || 'selectize-input',
dropdownClass: item.options.dropdownClass || 'selectize-dropdown',
dropdownContentClass: item.options.dropdownContentClass || 'selectize-dropdown-content',
copyClassesToDropdown: item.options.copyClassesToDropdown ? item.options.copyClassesToDropdown : null,
// Callbacks.
load: function (query, callback) {