Browse Source

#2042 add delegated events to video, form. remove debug dimmer

pull/2053/head
jlukic 9 years ago
parent
commit
bfed8b3a7d
3 changed files with 14 additions and 27 deletions
  1. 23
      src/definitions/behaviors/form.js
  2. 4
      src/definitions/modules/dimmer.js
  3. 14
      src/definitions/modules/video.js

23
src/definitions/behaviors/form.js

@ -127,23 +127,18 @@ $.fn.form = function(parameters) {
bindEvents: function() { bindEvents: function() {
module.verbose('Attaching form events'); module.verbose('Attaching form events');
if(settings.keyboardShortcuts) {
$field
.on('keydown' + eventNamespace, module.event.field.keydown)
;
}
$module $module
.on('submit' + eventNamespace, module.validate.form) .on('submit' + eventNamespace, module.validate.form)
.on('blur' + eventNamespace, selector.field, module.event.field.blur)
.on('click' + eventNamespace, selector.submit, module.submit)
.on('click' + eventNamespace, selector.reset, module.reset)
.on('click' + eventNamespace, selector.clear, module.clear)
; ;
$field
.on('blur' + eventNamespace, module.event.field.blur)
;
// attach events to common elements
module.attachEvents($submit, 'submit');
module.attachEvents($reset, 'reset');
module.attachEvents($clear, 'clear');
if(settings.keyboardShortcuts) {
$module
.on('keydown' + eventNamespace, selector.field, module.event.field.keydown)
;
}
$field $field
.each(function() { .each(function() {
var var

4
src/definitions/modules/dimmer.js

@ -599,8 +599,8 @@ $.fn.dimmer.settings = {
name : 'Dimmer', name : 'Dimmer',
namespace : 'dimmer', namespace : 'dimmer',
debug : true,
verbose : true,
debug : false,
verbose : false,
performance : true, performance : true,
// name to distinguish between multiple dimmers in context // name to distinguish between multiple dimmers in context

14
src/definitions/modules/video.js

@ -69,11 +69,9 @@ $.fn.video = function(parameters) {
initialize: function() { initialize: function() {
module.debug('Initializing video'); module.debug('Initializing video');
module.create(); module.create();
$placeholder
.on('click' + eventNamespace, module.play)
;
$playButton
.on('click' + eventNamespace, module.play)
$module
.on('click' + eventNamespace, selector.placeholder, module.play)
.on('click' + eventNamespace, selector.playButton, module.play)
; ;
module.instantiate(); module.instantiate();
}, },
@ -106,12 +104,6 @@ $.fn.video = function(parameters) {
.removeData(moduleNamespace) .removeData(moduleNamespace)
.off(eventNamespace) .off(eventNamespace)
; ;
$placeholder
.off(eventNamespace)
;
$playButton
.off(eventNamespace)
;
}, },
refresh: function() { refresh: function() {

Loading…
Cancel
Save