|
|
@ -56,14 +56,13 @@ $.fn.checkbox = function(parameters) { |
|
|
|
initialize: function() { |
|
|
|
module.verbose('Initializing checkbox', settings); |
|
|
|
|
|
|
|
module.fix.input(); |
|
|
|
|
|
|
|
module.create.label(); |
|
|
|
module.bind.events(); |
|
|
|
|
|
|
|
module.set.tabbable(); |
|
|
|
module.hide.input(); |
|
|
|
|
|
|
|
module.observeChanges(); |
|
|
|
|
|
|
|
module.instantiate(); |
|
|
|
module.setup(); |
|
|
|
}, |
|
|
@ -85,9 +84,10 @@ $.fn.checkbox = function(parameters) { |
|
|
|
}, |
|
|
|
|
|
|
|
fix: { |
|
|
|
input: function() { |
|
|
|
|
|
|
|
reference: function() { |
|
|
|
if( $module.is(selector.input) ) { |
|
|
|
module.debug('Fixing incorrect reference to module in invocation'); |
|
|
|
module.debug('Behavior called on <input> adjusting invoked element'); |
|
|
|
$module = $module.closest(selector.checkbox); |
|
|
|
module.refresh(); |
|
|
|
} |
|
|
@ -126,6 +126,13 @@ $.fn.checkbox = function(parameters) { |
|
|
|
$input = $module.children(selector.input); |
|
|
|
}, |
|
|
|
|
|
|
|
hide: { |
|
|
|
input: function() { |
|
|
|
module.verbose('Modfying <input> z-index'); |
|
|
|
$input.addClass(className.hidden); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
observeChanges: function() { |
|
|
|
if('MutationObserver' in window) { |
|
|
|
observer = new MutationObserver(function(mutations) { |
|
|
@ -675,6 +682,7 @@ $.fn.checkbox.settings = { |
|
|
|
checked : 'checked', |
|
|
|
indeterminate : 'indeterminate', |
|
|
|
disabled : 'disabled', |
|
|
|
hidden : 'hidden', |
|
|
|
radio : 'radio', |
|
|
|
readOnly : 'read-only' |
|
|
|
}, |
|
|
|