|
@ -188,12 +188,22 @@ $.fn.dropdown = function(parameters) { |
|
|
determine: { |
|
|
determine: { |
|
|
selectAction: function(text, value) { |
|
|
selectAction: function(text, value) { |
|
|
module.verbose('Determining action', settings.action); |
|
|
module.verbose('Determining action', settings.action); |
|
|
if( $.isFunction( module[settings.action] ) ) { |
|
|
|
|
|
module.verbose('Triggering preset action', settings.action); |
|
|
|
|
|
|
|
|
if(settings.action == 'auto') { |
|
|
|
|
|
if(module.is.selection()) { |
|
|
|
|
|
module.debug('Selection dropdown used updating form', text, value); |
|
|
|
|
|
module.updateForm(text, value); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
module.debug('No action specified hiding dropdown', text, value); |
|
|
|
|
|
module.hide(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else if( $.isFunction( module[settings.action] ) ) { |
|
|
|
|
|
module.verbose('Triggering preset action', settings.action, text, value); |
|
|
module[ settings.action ](text, value); |
|
|
module[ settings.action ](text, value); |
|
|
} |
|
|
} |
|
|
else if( $.isFunction(settings.action) ) { |
|
|
else if( $.isFunction(settings.action) ) { |
|
|
module.verbose('Triggering user action', settings.action); |
|
|
|
|
|
|
|
|
module.verbose('Triggering user action', settings.action, text, value); |
|
|
settings.action(text, value); |
|
|
settings.action(text, value); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
@ -318,6 +328,9 @@ $.fn.dropdown = function(parameters) { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
is: { |
|
|
is: { |
|
|
|
|
|
selection: function() { |
|
|
|
|
|
return $module.hasClass(className.selection); |
|
|
|
|
|
}, |
|
|
visible: function($subMenu) { |
|
|
visible: function($subMenu) { |
|
|
return ($subMenu) |
|
|
return ($subMenu) |
|
|
? $subMenu.is(':animated, :visible') |
|
|
? $subMenu.is(':animated, :visible') |
|
@ -666,7 +679,7 @@ $.fn.dropdown.settings = { |
|
|
performance : true, |
|
|
performance : true, |
|
|
|
|
|
|
|
|
on : 'click', |
|
|
on : 'click', |
|
|
action : 'hide', |
|
|
|
|
|
|
|
|
action : 'auto', |
|
|
|
|
|
|
|
|
delay: { |
|
|
delay: { |
|
|
show: 200, |
|
|
show: 200, |
|
@ -702,7 +715,8 @@ $.fn.dropdown.settings = { |
|
|
active : 'active', |
|
|
active : 'active', |
|
|
placeholder : 'default', |
|
|
placeholder : 'default', |
|
|
disabled : 'disabled', |
|
|
disabled : 'disabled', |
|
|
visible : 'visible' |
|
|
|
|
|
|
|
|
visible : 'visible', |
|
|
|
|
|
selection : 'selection' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|