diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-17 20:01:56 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-17 20:01:56 +0100 |
commit | a09e12721fbab8f1f716495a04957f52595fc272 (patch) | |
tree | cc5fe5be1c9e22e5c229171ec3bb62adca046c06 /pyload/webui/themes/Default/lib/MooTools/TinyTab/tinytab.js | |
parent | Fix extractor plugin type (diff) | |
download | pyload-a09e12721fbab8f1f716495a04957f52595fc272.tar.xz |
Fix lib in .gitignore
Diffstat (limited to 'pyload/webui/themes/Default/lib/MooTools/TinyTab/tinytab.js')
-rw-r--r-- | pyload/webui/themes/Default/lib/MooTools/TinyTab/tinytab.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pyload/webui/themes/Default/lib/MooTools/TinyTab/tinytab.js b/pyload/webui/themes/Default/lib/MooTools/TinyTab/tinytab.js new file mode 100644 index 000000000..de50279fc --- /dev/null +++ b/pyload/webui/themes/Default/lib/MooTools/TinyTab/tinytab.js @@ -0,0 +1,43 @@ +/* +--- +description: TinyTab - Tiny and simple tab handler for Mootools. + +license: MIT-style + +authors: +- Danillo César de O. Melo + +requires: +- core/1.2.4: '*' + +provides: TinyTab + +... +*/ +(function($) { + this.TinyTab = new Class({ + Implements: Events, + initialize: function(tabs, contents, opt) { + this.tabs = tabs; + this.contents = contents; + if(!opt) opt = {}; + this.css = opt.selectedClass || 'selected'; + this.select(this.tabs[0]); + tabs.each(function(el){ + el.addEvent('click',function(e){ + this.select(el); + e.stop(); + }.bind(this)); + }.bind(this)); + }, + + select: function(el) { + this.tabs.removeClass(this.css); + el.addClass(this.css); + this.contents.setStyle('display','none'); + var content = this.contents[this.tabs.indexOf(el)]; + content.setStyle('display','block'); + this.fireEvent('change',[content,el]); + } + }); +})(document.id);
\ No newline at end of file |