From 269f5ffe3cd3f8727cb90dd6b72f5bf147ae612c Mon Sep 17 00:00:00 2001 From: jlukic Date: Thu, 4 Dec 2014 11:39:11 -0500 Subject: [PATCH] Fixes #1374 inconsistent behavior naming for sidebar --- src/definitions/modules/sidebar.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/definitions/modules/sidebar.js b/src/definitions/modules/sidebar.js index fd078a769..59a5c5f08 100644 --- a/src/definitions/modules/sidebar.js +++ b/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); },