Browse Source

moves attach events in sidebar to top level

pull/176/merge
jlukic 11 years ago
parent
commit
18499d356e
1 changed files with 17 additions and 20 deletions
  1. 37
      src/modules/sidebar.js

37
src/modules/sidebar.js

@ -79,30 +79,27 @@ $.fn.sidebar = function(parameters) {
$style = $('style[title=' + namespace + ']');
},
attach: {
events: function(selector, event) {
var
$toggle = $(selector)
;
event = $.isFunction(module[event])
? module[event]
: module.toggle
attachEvents: function(selector, event) {
var
$toggle = $(selector)
;
event = $.isFunction(module[event])
? module[event]
: module.toggle
;
if($toggle.size() > 0) {
module.debug('Attaching sidebar events to element', selector, event);
$toggle
.off(eventNamespace)
.on('click' + eventNamespace, event)
;
if($toggle.size() > 0) {
module.debug('Attaching sidebar events to element', selector, event);
$toggle
.off(eventNamespace)
.on('click' + eventNamespace, event)
;
}
else {
module.error(error.notFound);
}
}
else {
module.error(error.notFound);
}
},
show: function() {
module.debug('Showing sidebar');
if(module.is.closed()) {

Loading…
Cancel
Save