[Mapbender-commits] r6056 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon May 3 06:17:18 EDT 2010


Author: christoph
Date: 2010-05-03 06:17:17 -0400 (Mon, 03 May 2010)
New Revision: 6056

Modified:
   trunk/mapbender/http/plugins/mb_tabs_horizontal.js
Log:
compatibility with uiLayout

Modified: trunk/mapbender/http/plugins/mb_tabs_horizontal.js
===================================================================
--- trunk/mapbender/http/plugins/mb_tabs_horizontal.js	2010-05-03 08:40:00 UTC (rev 6055)
+++ trunk/mapbender/http/plugins/mb_tabs_horizontal.js	2010-05-03 10:17:17 UTC (rev 6056)
@@ -15,10 +15,11 @@
  * > e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, 
  * > e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, 
  * > e_mb_mod, e_target, e_requires, e_url) VALUES('<appId>',
- * > 'mb_tabs_horizontal',1,1,'Puts existing elements into horizontal tabs, using jQuery UI tabs. List the elements comma-separated under target, and make sure they have a title.',
- * > '','div','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','<ul></ul>','div',
- * > '../plugins/mb_tabs_horizontal.js','','mb_metadata_select','jq_ui_tabs',
- * > '');
+ * > 'mb_tabs_horizontal',3,1,
+ * > 'Puts existing elements into horizontal tabs, using jQuery UI tabs. List the elements comma-separated under target, and make sure they have a title.',
+ * > '','div','','',NULL ,NULL ,NULL ,NULL ,NULL ,'',
+ * > '<ul></ul><div class=''ui-layout-content''></div>','div',
+ * > '../plugins/mb_tabs_horizontal.js','','','jq_ui_tabs','');
  * 
  * Help:
  *
@@ -35,6 +36,8 @@
 var $tabs = $(this);
 
 var HorizontalTabsApi = function (o) {
+	var that = this;
+	
 	this.create = function () {
 		o.$target.each(function () {
 			var $currentTabEntry = $(this);
@@ -46,13 +49,20 @@
 				"</a></li>"
 			)
 			.end()
+			.find("div.ui-layout-content")
 			.append("<div id='" + tabId + "'/>")
 			.find("#" + tabId)
 			.append($currentTabEntry);
 		});
 	
 		if (o.$target.size() > 0) {
-			$tabs.tabs();
+			$tabs.tabs({
+				select: function (event, ui) {
+					that.events.selected.trigger({
+						ui: ui
+					});
+				}
+			});
 		}
 	};
 	
@@ -64,6 +74,10 @@
 		$tabs.tabs("select", index);
 	};
 	
+	this.events = {
+		"selected" : new Mapbender.Event()
+	};
+	
 	this.create();
 };
 



More information about the Mapbender_commits mailing list