1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 18:14:26 +02: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.