mirror of
https://github.com/e107inc/e107.git
synced 2025-07-28 10:20:45 +02:00
Progress on inverted switch
This commit is contained in:
4
e107_web/js/bootstrap.switch.init.js
vendored
4
e107_web/js/bootstrap.switch.init.js
vendored
@@ -25,6 +25,8 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
||||
onText: options.onText || null,
|
||||
offText: options.offText || null,
|
||||
wrapperClass: options.wrapperClass || null
|
||||
// state:
|
||||
// inverse: options.inverse // this is 'reverse' - default values but reversed order.
|
||||
});
|
||||
|
||||
$(this).on('switchChange.bootstrapSwitch', function (event, state) {
|
||||
@@ -40,7 +42,7 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
||||
|
||||
if(options.inverse)
|
||||
{
|
||||
// value = checked ? 0 : 1;
|
||||
value = checked ? 0 : 1;
|
||||
}
|
||||
|
||||
$('input[type="hidden"][name="' + name + '"]').val(value);
|
||||
|
Reference in New Issue
Block a user