1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

BC fixes for <select> form elements

This commit is contained in:
Cameron 2013-02-23 03:01:57 -08:00
parent 76ac4b39d5
commit 63c52ca05d
3 changed files with 24 additions and 17 deletions

View File

@ -44,9 +44,12 @@ require_once (e_ADMIN.'ad_links.php'); //FIXME - see 'FIXME' in sc_admin_navigat
if (!defined('ADMIN_WIDTH'))
{
define('ADMIN_WIDTH', "width: 95%");
define('ADMIN_WIDTH', "width:100%;");
}
// Wysiwyg JS support on or off.
// your code should run off e_WYSIWYG
if (e107::getPref('wysiwyg', false) ) // posts bbcode by default.

View File

@ -542,7 +542,7 @@ class e_form
$cat = vartrue($sc_parameters['media']) ? $tp->toDB($sc_parameters['media']) : "_common_file";
$default_label = ($default) ? $default : "Choose a file";
$label = "<span id='{$name_id}_prev' >".basename($default_label)."</span>";
$label = "<span id='{$name_id}_prev' class='btn btn-small'>".basename($default_label)."</span>";
// $ret .= $this->mediaUrl($cat, $label,$name_id,"mode=dialog&action=list");
@ -1057,14 +1057,7 @@ class e_form
function select_open($name, $options = array())
{
$options = $this->format_options('select', $name, $options);
if($options['multiple'])
{
$options['class'] .= ' e-multiselect';
}
else
{
$options['class'] .= ' e-select';
}
return "<select name='{$name}'".$this->get_attributes($options, $name).">";
}

View File

@ -48,15 +48,29 @@ $(document).ready(function()
e.stopPropagation();
});
$(".e-multiselect").multiselect();
$('.e-select').selectpicker();
// BC Compatible
$("select.tbox").each(function() {
var multi = $(this).attr('multiple');
if(multi === undefined)
{
$(this).selectpicker();
}
else
{
$(this).multiselect();
}
});
// $(".e-spinner").spinner(); //FIXME breaks tooltips etc.
$(".e-radio-multi").each(function() {
$(".e-radio-multi").each(function() {
// $(this).nextAll(".field-help").hide();
// $(this).nextAll(":input").tipsy({title: 'hello'});
@ -65,9 +79,6 @@ $(document).ready(function()
$(".e-tags").tagit();
// $(".e-multiselect").chosen();
// Decorate
$(".adminlist tr:even").addClass("even");