Browse Source

Fixes #1374 inconsistent behavior naming for sidebar

pull/1407/head
jlukic 10 years ago
parent
commit
269f5ffe3c
1 changed files with 10 additions and 3 deletions
  1. 13
      src/definitions/modules/sidebar.js

13
src/definitions/modules/sidebar.js

@ -301,7 +301,7 @@ $.fn.sidebar = function(parameters) {
? callback
: function(){}
;
if(module.is.closed()) {
if(module.is.hidden()) {
if(settings.overlay) {
module.error(error.overlay);
settings.transition = 'overlay';
@ -372,7 +372,7 @@ $.fn.sidebar = function(parameters) {
toggle: function() {
module.verbose('Determining toggled direction');
if(module.is.closed()) {
if(module.is.hidden()) {
module.show();
}
else {
@ -698,12 +698,19 @@ $.fn.sidebar = function(parameters) {
return false;
}
},
closed: function() {
hidden: function() {
return !module.is.visible();
},
visible: function() {
return $module.hasClass(className.visible);
},
// alias
open: function() {
return module.is.visible();
},
closed: function() {
return module.is.hidden();
},
vertical: function() {
return $module.hasClass(className.top);
},

Loading…
Cancel
Save