From 7f56c4f28e0be130e4c8e6167b25bf5c6ca3d65f Mon Sep 17 00:00:00 2001 From: jlukic Date: Wed, 25 Sep 2013 12:56:34 -0400 Subject: [PATCH] adds settings/behavior docs for sidebar Former-commit-id: 91d171f8818b78ac78fd30af5fe37074b11ed6fb Former-commit-id: bdcef3d61d23dccd02eb76d3b14a8bfb79fa61ed --- node/src/documents/modules/sidebar.html.eco | 144 +++++++++++++++++- .../src/documents/modules/transition.html.eco | 2 - .../src/files/release/less/modules/sidebar.js | 27 ++-- 3 files changed, 153 insertions(+), 20 deletions(-) mode change 100644 => 100755 node/src/files/release/less/modules/sidebar.js diff --git a/node/src/documents/modules/sidebar.html.eco b/node/src/documents/modules/sidebar.html.eco index 07c36a6db..f17aab277 100755 --- a/node/src/documents/modules/sidebar.html.eco +++ b/node/src/documents/modules/sidebar.html.eco @@ -213,29 +213,41 @@ type : 'UI Module'

Behavior

- All the following behaviors can be called using the syntax $('.foo').sidebar('behavior name') + All the following behaviors can be called using the syntax $('.foo').sidebar('behavior name', argumentOne, argumentTwo) - - + + - + - + + + + + + + + + + + + + @@ -244,6 +256,128 @@ type : 'UI Module' + + + + + + + + +
attach eventsAttaches sidebar action to given selectorattach events(selector, event)Attaches sidebar action to given selector. Default event if none specified is toggle
showShows specified selectorShows sidebar
hideHides specified selectorHides sidebar
toggle Toggles visibility of sidebar
is openReturns whether sidebar is open
is closedReturns whether sidebar is closed
push page Pushes page content to be visible alongside sidebar
get directionReturns direction of current sidebar
pull page Returns page content to original positionadd body css Adds stylesheet to page head to trigger sidebar animations
remove body cssRemoves any inline stylesheets for sidebar animation
get transition eventReturns vendor prefixed transition end event
+ +

Settings

+ +

+ Transition Settings +
Form settings modify the transition behavior
+

+ + + + + + + + + + + + + + + + + + + + + + + +
SettingDefaultDescription
overlayfalseWhether sidebar should overlay page instead of pushing page to the side
useCSStrueWhether to use css animations or fallback javascript animations
duration300Duration of side bar animation
+ +

+ DOM Settings +
DOM settings specify how this module should interface with the DOM
+

+ + + + + + + + + + + + + + + + + + +
SettingDefaultDescription
namespacesidebarEvent namespace. Makes sure module teardown does not effect other events attached to an element.
className +
+ className: { + active : 'active', + pushed : 'pushed', + top : 'top', + left : 'left', + right : 'right', + bottom : 'bottom' + } +
+
Class names used to attach style to state
+ +
+ +

+ Debug Settings +
Debug settings controls debug output to the console
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SettingDefaultDescription
nameSidebarName used in debug logs
debugTrueProvides standard debug output to console
performanceTrueProvides standard debug output to console
verboseTrueProvides ancillary debug output to console
errors +
+ error : { + method : 'The method you called is not defined.', + notFound : 'There were no elements that matched the specified selector' + } +
+
diff --git a/node/src/documents/modules/transition.html.eco b/node/src/documents/modules/transition.html.eco index 3ab8eb708..587e500ca 100755 --- a/node/src/documents/modules/transition.html.eco +++ b/node/src/documents/modules/transition.html.eco @@ -413,8 +413,6 @@ type : 'UI Module' - -
diff --git a/node/src/files/release/less/modules/sidebar.js b/node/src/files/release/less/modules/sidebar.js old mode 100644 new mode 100755 index ac24c68f1..03ab0b451 --- a/node/src/files/release/less/modules/sidebar.js +++ b/node/src/files/release/less/modules/sidebar.js @@ -453,24 +453,25 @@ $.fn.sidebar = function(parameters) { $.fn.sidebar.settings = { - name : 'Sidebar', - namespace : 'sidebar', + name : 'Sidebar', + namespace : 'sidebar', - verbose : true, - debug : true, - performance : true, + verbose : true, + debug : true, + performance : true, - useCSS : true, - overlay : false, - duration : 300, + useCSS : true, + overlay : false, + duration : 300, - side : 'left', + side : 'left', - onChange : function(){}, - onShow : function(){}, - onHide : function(){}, + /* callbacks not currently implemented */ + onChange : function(){}, + onShow : function(){}, + onHide : function(){}, - className: { + className : { active : 'active', pushed : 'pushed', top : 'top',