diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 5c0964ce5..3c6f9d09e 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -2322,6 +2322,16 @@ class e_form $options_off = array_merge($options, array('class' => 'e-expandit-off')); } + if(deftrue('e_DEBUG') && e_ADMIN_AREA === true && empty($label_enabled) && empty($label_disabled)) + { + $options['switch'] = 'small'; + $options['wrapperClass'] = 'wrapper form-control'; + $label_enabled = strtoupper(LAN_ON); + $label_disabled = strtoupper(LAN_OFF); + + } + + $options_on['label'] = $label_enabled ? defset($label_enabled, $label_enabled) : LAN_ENABLED; $options_off['label'] = $label_disabled ? defset($label_disabled, $label_disabled) : LAN_DISABLED; @@ -2341,6 +2351,12 @@ class e_form ), ); + if(isset($options['wrapperClass'])) + { + $js_options[$name]['wrapperClass'] = $options['wrapperClass']; + } + + e107::library('load', 'bootstrap.switch'); e107::js('settings', array('bsSwitch' => $js_options)); e107::js('footer', '{e_WEB}js/bootstrap.switch.init.js', 'jquery', 5); diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index 61d347495..2036e8b37 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -218,8 +218,12 @@ a.tweet_action { font-size:8px } /* Bootstrap Bug Fix See: https://github.com/twitter/bootstrap/issues/3494 Specific for e107-admin InfoPanel */ -.row-fluid ul.thumbnails li.span12 + li { margin-left : 0px; } -.row-fluid div.s-message + div { margin-left : 0px; } +.row-fluid ul.thumbnails li.span12 + li { margin-left : 0; } +.row-fluid div.s-message + div { margin-left : 0; } + +.bootstrap-switch .bootstrap-switch-label { background: inherit } +.bootstrap-switch.form-control { padding:0; height:auto } + /* .row-fluid ul.thumbXnails li.span6:nth-child(2n + 3) { margin-left : 0px; } diff --git a/e107_web/js/bootstrap.switch.init.js b/e107_web/js/bootstrap.switch.init.js index 2d82c2adb..c2bf19955 100644 --- a/e107_web/js/bootstrap.switch.init.js +++ b/e107_web/js/bootstrap.switch.init.js @@ -21,7 +21,8 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}}; $(this).bootstrapSwitch({ size: options.size || 'mini', onText: options.onText || null, - offText: options.offText || null + offText: options.offText || null, + wrapperClass: options.wrapperClass || null }); }); }); diff --git a/e107_web/js/core/admin.jquery.js b/e107_web/js/core/admin.jquery.js index af363b265..031b3738f 100644 --- a/e107_web/js/core/admin.jquery.js +++ b/e107_web/js/core/admin.jquery.js @@ -454,7 +454,7 @@ $(document).ready(function() }); // run tips on .field-help - $("div.tbox,div.checkboxes,input,textarea,select,label,.e-tip").each(function(c) { + $("div.tbox,div.checkboxes,input,textarea,select,label,.e-tip,div.form-control").each(function(c) { var t = $(this).nextAll(".field-help"); @@ -484,6 +484,7 @@ $(document).ready(function() html: true, opacity: 1.0, placement: placement, + container: 'body', delay: { show: 300, hide: 600 } });