[limb-svn] r6288 - 3.x/trunk/limb/cms/shared/js
svn at limb-project.com
svn at limb-project.com
Tue Sep 11 15:11:51 MSD 2007
Author: tony
Date: 2007-09-11 15:11:51 +0400 (Tue, 11 Sep 2007)
New Revision: 6288
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6288
Modified:
3.x/trunk/limb/cms/shared/js/tabs.js
Log:
--added automatic js tabs initialization
Modified: 3.x/trunk/limb/cms/shared/js/tabs.js
===================================================================
--- 3.x/trunk/limb/cms/shared/js/tabs.js 2007-09-11 11:08:12 UTC (rev 6287)
+++ 3.x/trunk/limb/cms/shared/js/tabs.js 2007-09-11 11:11:51 UTC (rev 6288)
@@ -112,4 +112,32 @@
{
this.link.onclick = this.onActivate.bind(this);
}
-});
\ No newline at end of file
+});
+
+if(jQuery)
+{
+ jQuery(window).ready(function()
+ {
+ autoTabs();
+ });
+
+ function autoTabs()
+ {
+ jQuery('.tabs').each(function(){
+ var tabs = [];
+
+ var ul = jQuery(this).children('ul');
+ ul.addClass('bookmarks');
+ ul.children('li').each(function(){
+ if(this.id)
+ {
+ jQuery('#tab_' + this.id).addClass('bookmarks_content');
+ tabs.push(new CMS.Tab(this.id, 'tab_' + this.id));
+ }
+ });
+
+ if(tabs.length)
+ new CMS.TabsContainer(tabs);
+ });
+ }
+}
More information about the limb-svn
mailing list