This repository has been archived by the owner on Jun 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
TBui function class
creesch edited this page Dec 18, 2014
·
9 revisions
TBui contains all UI elements (who would have guessed) starting with all the images we insert on reddit encoded in base
Colors as used by usernotes.
Generates the html for a toolbox popup window.
Example of a popup in toolbox:
Usage example:
$popup = TB.ui.popup(
'Popup title',
[
{
title: 'Tab1',
tooltip: 'Tooltip shown when hovering tab.',
content: 'Content here',
footer: 'Footer content here.'
},
{
title: 'Tab2',
tooltip: 'Tooltip shown when hovering tab.',
content: 'Content here',
footer: 'Footer content here.'
}
],
'', // possible meta data to be added to the popup.
'class-for-popup' // class
).appendTo('body');
Generates the html for a toolbox big overlay window.
Example of an overlay window in toolbox:
Usage example:
$overlay = TB.ui.overlay (
'Overlay title',
[
{
title: 'Tab1',
tooltip: 'Tooltip shown when hovering tab.',
content: 'Content here',
footer: 'Footer content here.'
},
{
title: 'Tab2',
tooltip: 'Tooltip shown when hovering tab.',
content: 'Content here',
footer: 'Footer content here.'
}
],
'', // possible meta data to be added to the popup.
'class-for-overlay' // class
).appendTo('body');
Generates a generic multiple selection UI with two dropdown menus, like the one in Mod Button.
Feed this a bit of text and the type of feedback and it will show it to the user for a few seconds.
Our awesome long load spinner that ended up not being a spinner at all. It will attend the user to ongoing background operations with a warning when leaving the page.