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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sat Dec 12 07:30:43 EST 2009


Author: topi
Date: 2009-12-12 07:30:41 -0500 (Sat, 12 Dec 2009)
New Revision: 5161

Modified:
   trunk/mapbender/http/plugins/jq_ui_accordion.js
Log:


Modified: trunk/mapbender/http/plugins/jq_ui_accordion.js
===================================================================
--- trunk/mapbender/http/plugins/jq_ui_accordion.js	2009-12-12 11:18:35 UTC (rev 5160)
+++ trunk/mapbender/http/plugins/jq_ui_accordion.js	2009-12-12 12:30:41 UTC (rev 5161)
@@ -3,27 +3,27 @@
  *
  * Description:
  * An accordion decorator, replaces the deprecated element "tabs"
- * 
- * Enter the elements to be put in the accordion in its target field 
+ *
+ * Enter the elements to be put in the accordion in its target field
  * (comma-separated list of element ids).
- * 
- * Avoid styles in elements within the accordion. 
- * 
- * The overview won't work in the accordion, as it cannot be positioned 
+ *
+ * Avoid styles in elements within the accordion.
+ *
+ * The overview won't work in the accordion, as it cannot be positioned
  * absolutely.
- * 
+ *
  * The width of this module determines the accordion width, but the height
- * of the individual elements determines the height. 
- *  
- * 
+ * of the individual elements determines the height.
+ *
+ *
  * Files:
  *  - http/plugins/jq_ui_accordion.js
  *  - http/extensions/jquery-ui-1.7.2.custom/development-bundle/ui/ui.accordion.js
  *
  * SQL:
- * > INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, 
- * > 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, 
+ * > INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment,
+ * > 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('<app_id>','jq_ui_accordion',2,1,
  * > 'An accordion decorator, replaces the deprecated element tabs','','div',
  * > '','',10,240,300,NULL ,2,'','','div','../plugins/jq_ui_accordion.js',
@@ -35,26 +35,26 @@
  *
  * Maintainer:
  * http://www.mapbender.org/User:Christoph_Baudson
- * 
+ *
  * License:
  * Copyright (c) 2009, Open Source Geospatial Foundation
- * This program is dual licensed under the GNU General Public License 
- * and Simplified BSD license.  
+ * This program is dual licensed under the GNU General Public License
+ * and Simplified BSD license.
  * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
  */
 
 $this = $(this);
 
 // tab to open onload
-var active = typeof options.active !== "number" ? 
+var active = typeof options.active !== "number" ?
 	false : options.active - 1;
 
 for (var i = 0; i < options.target.length; i++) {
 	$c = $("#" + options.target[i]);
 	$this.append(
 		$(
-			"<h3><a id='header_" + options.id + "_" +	$c.attr("id") +	
-			"' href='#'>" +	Mapbender.modules[$c.attr("id")].currentTitle +	
+			"<h3><a id='header_" + options.id + "_" +	$c.attr("id") +
+			"' href='#'>" +	Mapbender.modules[$c.attr("id")].currentTitle +
 			"</a></h3>"
 		)
 	).append(
@@ -67,9 +67,14 @@
 		)
 	);
 }
-
-$("#" + options.id).accordion({
+var accordionOptions = {
 	collapsible: true,
 	autoHeight: false,
 	active: active
-});
+};
+
+if (typeof options.attribute !== "undefined") {
+	accordionOptions[attribute] = options.attribute;
+}
+
+$("#" + options.id).accordion(accordionOptions);



More information about the Mapbender_commits mailing list