Q tabs Class
This tool renders tabs which behave appropriately in many different environments
Constructor
Q tabs
-
[$options]
-
[options.checkQueryString=false]
Parameters:
-
[$options]
Array optionaloptions to pass to the tool
-
[tabs]
Array optionalAn associative array of name: title pairs.
-
[urls]
Array optionalAn associative array of name: url pairs to override the default urls.
-
[field='tab']
String optionalUses this field when urls doesn't contain the tab name.
-
[vertical=false]
Boolean optionalStack the tabs vertically instead of horizontally
-
[compact=false]
Boolean optionalDisplay the tabs interface in a compact space with a contextual menu
-
[overflow]
Object optional-
[content]
String optionalThe html that is displayed when the tabs overflow. You can interpolate {{count}}, {{text}} or {{html}} in the string. -
[glyph]
String optionalOverride the glyph that appears next to the overflow text. You can interpolate {{count}} here -
[defaultText]
String optionalThe text to interpolate {{text}} in the content when no tab is selected -
[defaultHtml]
String optionalThe text to interpolate {{text}} in the content when no tab is selected
-
-
[defaultTabName]
String optionalHere you can specify the name of the tab to show by default
-
[selectors]
String optionalArray of (slotName => selector) pairs, where the values are CSS style selectors indicating the element to update with javascript, and can be a parent of the tabs. Set to null to reload the page.
-
[slot]
String optionalThe name of the slot to request when changing tabs with javascript.
-
[classes]
String optionalAn associative array of the form name => classes, for adding classes to tabs
-
[titleClasses]
String optionalAn associative array for adding classes to tab titles
-
[after]
String optionalName of an event that will return HTML to place after the generated HTML in the tabs tool element
-
[loader]
String optionalName of a function which takes url, slot, callback. It should call the callback and pass it an object with the response info. Can be used to implement caching, etc. instead of the default HTTP request. This function shall be Q.batcher getter
-
[onClick]
String optionalEvent when a tab was clicked, with arguments (name, element). Returning false cancels the tab switching.
-
[beforeSwitch]
String optionalEvent when tab switching begins. Returning false cancels the switching.
-
[beforeScripts]
String optionalName of the function to execute after tab is loaded but before its javascript is executed.
-
[onCurrent]
String optionalName of the function to execute after a tab is shown to be selected.
-
[onActivate]
String optionalName of the function to execute after a tab is activated.
-
-
[options.checkQueryString=false]
Boolean optionalWhether the default getCurrentTab should check the querystring when determining the current tab