Browse Source

moves attach events in sidebar to top level

Former-commit-id: 18499d356e
Former-commit-id: 8bc760ae16
pull/258/head
jlukic 11 years ago
parent
commit
f78fc416fa
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