@ -73,15 +73,6 @@ $.fn.checkbox = function(parameters) {
;
;
} ,
} ,
toggle : function ( ) {
if ( $input . prop ( 'checked' ) === undefined || ! $input . prop ( 'checked' ) ) {
module . enable ( ) ;
}
else {
module . disable ( ) ;
}
} ,
enable : function ( ) {
enable : function ( ) {
module . debug ( 'Enabling checkbox' ) ;
module . debug ( 'Enabling checkbox' ) ;
$module
$module
@ -106,24 +97,12 @@ $.fn.checkbox = function(parameters) {
$ . proxy ( settings . onDisable , $input . get ( ) ) ( ) ;
$ . proxy ( settings . onDisable , $input . get ( ) ) ( ) ;
} ,
} ,
all : {
toggle : function ( ) {
enable : function ( ) {
if ( $input . prop ( 'checked' ) === undefined || ! $input . prop ( 'checked' ) ) {
module . debug ( 'Enabling all checkbox' ) ;
module . enable ( ) ;
$allModules
}
. checkbox ( 'enable' )
else {
;
module . disable ( ) ;
} ,
disable : function ( ) {
module . debug ( 'Disabling all checkbox' ) ;
$allModules
. checkbox ( 'toggle' )
;
} ,
toggle : function ( ) {
module . debug ( 'Toggling all checkbox' ) ;
$allModules
. checkbox ( 'toggle' )
;
}
}
} ,
} ,
@ -183,6 +162,7 @@ $.fn.checkbox = function(parameters) {
executionTime = currentTime - previousTime ;
executionTime = currentTime - previousTime ;
time = currentTime ;
time = currentTime ;
performance . push ( {
performance . push ( {
'Element' : element ,
'Name' : message ,
'Name' : message ,
'Execution Time' : executionTime
'Execution Time' : executionTime
} ) ;
} ) ;
@ -192,12 +172,15 @@ $.fn.checkbox = function(parameters) {
} ,
} ,
display : function ( ) {
display : function ( ) {
var
var
title = settings . moduleName + ' Performance (' + selector + ')' ,
title = settings . moduleName ,
caption = settings . moduleName + ': ' + selector + '(' + $allModules . size ( ) + ' elements)' ,
caption = settings . moduleName + ': ' + selector + '(' + $allModules . size ( ) + ' elements)' ,
totalExecutionTime = 0
totalExecutionTime = 0
;
;
if ( selector ) {
title += 'Performance (' + selector + ')' ;
}
if ( ( console . group !== undefined || console . table !== undefined ) && performance . length > 0 ) {
if ( ( console . group !== undefined || console . table !== undefined ) && performance . length > 0 ) {
console . groupCollapsed ( title ) ;
console . groupCollapsed ( title ) ;
if ( console . table ) {
if ( console . table ) {
$ . each ( performance , function ( index , data ) {
$ . each ( performance , function ( index , data ) {
totalExecutionTime += data [ 'Execution Time' ] ;
totalExecutionTime += data [ 'Execution Time' ] ;
@ -209,7 +192,7 @@ $.fn.checkbox = function(parameters) {
totalExecutionTime += data [ 'Execution Time' ] ;
totalExecutionTime += data [ 'Execution Time' ] ;
} ) ;
} ) ;
}
}
console . log ( 'Total Execution Time:' , totalExecutionTime ) ;
console . log ( 'Total Execution Time:' , totalExecutionTime + 'ms' ) ;
console . groupEnd ( ) ;
console . groupEnd ( ) ;
performance = [ ] ;
performance = [ ] ;
time = false ;
time = false ;
@ -235,7 +218,7 @@ $.fn.checkbox = function(parameters) {
found = instance [ value ] ;
found = instance [ value ] ;
return true ;
return true ;
}
}
module . error ( error . method ) ;
module . error ( errors . method ) ;
return false ;
return false ;
} ) ;
} ) ;
}
}
@ -247,7 +230,6 @@ $.fn.checkbox = function(parameters) {
}
}
} ;
} ;
// check for invoking internal method
if ( methodInvoked ) {
if ( methodInvoked ) {
if ( instance === undefined ) {
if ( instance === undefined ) {
module . initialize ( ) ;
module . initialize ( ) ;
@ -262,7 +244,6 @@ $.fn.checkbox = function(parameters) {
}
}
} )
} )
;
;
// chain or return queried method
return ( invokedResponse )
return ( invokedResponse )
? invokedResponse
? invokedResponse
: this
: this
@ -271,20 +252,20 @@ $.fn.checkbox = function(parameters) {
$ . fn . checkbox . settings = {
$ . fn . checkbox . settings = {
// module info
moduleName : 'Checkbox Module' ,
moduleName : 'Checkbox Module' ,
namespace : 'checkbox' ,
verbose : false ,
debug : true ,
verbose : true ,
namespace : 'checkbox' ,
debug : true ,
performance : true ,
// delegated event context
// delegated event context
context : false ,
context : false ,
onChange : function ( ) { } ,
onChange : function ( ) { } ,
onEnable : function ( ) { } ,
onEnable : function ( ) { } ,
onDisable : function ( ) { } ,
onDisable : function ( ) { } ,
// errors
errors : {
errors : {
method : 'The method you called is not defined.'
method : 'The method you called is not defined.'
} ,
} ,