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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Jan 29 02:28:43 EST 2010


Author: christoph
Date: 2010-01-29 02:28:40 -0500 (Fri, 29 Jan 2010)
New Revision: 5449

Added:
   trunk/mapbender/http/plugins/jq_ui_datepicker.js
   trunk/mapbender/http/plugins/jq_ui_effects.js
   trunk/mapbender/http/plugins/jq_ui_slider.js
   trunk/mapbender/http/plugins/mb_tabs_vertical.js
Modified:
   trunk/mapbender/http/plugins/jq_ui_accordion.js
   trunk/mapbender/http/plugins/jq_ui_dialog.js
   trunk/mapbender/http/plugins/jq_ui_effects.php
   trunk/mapbender/http/plugins/mb_cookie.js
   trunk/mapbender/http/plugins/mb_resultList_transferToDigitize.js
Log:


Modified: trunk/mapbender/http/plugins/jq_ui_accordion.js
===================================================================
--- trunk/mapbender/http/plugins/jq_ui_accordion.js	2010-01-29 07:27:45 UTC (rev 5448)
+++ trunk/mapbender/http/plugins/jq_ui_accordion.js	2010-01-29 07:28:40 UTC (rev 5449)
@@ -2,36 +2,24 @@
  * Package: jq_ui_accordion
  *
  * Description:
- * An accordion decorator, replaces the deprecated element "tabs"
+ * Accordion from the jQuery UI framework
  *
- * 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
- * absolutely.
- *
- * The width of this module determines the accordion width, but 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,
- * > 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',
+ * > 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 ('<appId>',
+ * > 'jq_ui_accordion',2,1,'Accordion from the jQuery UI framework','','',
+ * > '','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','',
  * > '../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/ui.accordion.js',
  * > '','jq_ui','http://docs.jquery.com/UI/Accordion');
  *
  * Help:
- * http://docs.jquery.com/UI/Accordion
+ * http://jqueryui.com/demos/accordion
  *
  * Maintainer:
  * http://www.mapbender.org/User:Christoph_Baudson
@@ -42,39 +30,3 @@
  * 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" ?
-	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 +
-			"</a></h3>"
-		)
-	).append(
-		$(
-			"<div></div>"
-		).append(
-			$(
-				"<div style='height:" + $c.css("height") +	"'></div>"
-			).append($c)
-		)
-	);
-}
-var accordionOptions = {
-	collapsible: true,
-	autoHeight: false,
-	active: active
-};
-
-if (typeof options.attribute !== "undefined") {
-	accordionOptions[attribute] = options.attribute;
-}
-
-$("#" + options.id).accordion(accordionOptions);

Added: trunk/mapbender/http/plugins/jq_ui_datepicker.js
===================================================================
--- trunk/mapbender/http/plugins/jq_ui_datepicker.js	                        (rev 0)
+++ trunk/mapbender/http/plugins/jq_ui_datepicker.js	2010-01-29 07:28:40 UTC (rev 5449)
@@ -0,0 +1,33 @@
+/**
+ * Package:
+ * jq_ui_datepicker
+ *
+ * Description:
+ * Datepicker from jQuery UI framework
+ * 
+ * Files:
+ * - ../plugins/jq_ui_datepicker.js
+ * - ../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.datepicker.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, 
+ * > e_mb_mod, e_target, e_requires, e_url) VALUES ('<appId>','jq_ui_dialog',
+ * > 5,1,'Dialog from jQuery UI framework','','','','',NULL ,NULL ,NULL ,
+ * > NULL ,NULL ,'','','','../plugins/jq_ui_dialog.js',
+ * > '../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.datepicker.js',
+ * > '','jq_ui','');
+ *
+ * Help:
+ * http://jqueryui.com/demos/datepicker
+ *
+ * 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.  
+ * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
+ */

Modified: trunk/mapbender/http/plugins/jq_ui_dialog.js
===================================================================
--- trunk/mapbender/http/plugins/jq_ui_dialog.js	2010-01-29 07:27:45 UTC (rev 5448)
+++ trunk/mapbender/http/plugins/jq_ui_dialog.js	2010-01-29 07:28:40 UTC (rev 5449)
@@ -3,160 +3,31 @@
  * jq_ui_dialog
  *
  * Description:
- * Module to managing dialog windows with multiple options for customization.
+ * Dialog from jQuery UI framework
  * 
  * Files:
- * - http/javascripts/mod_dialogManager.js
-*  - http/extensions/jquery-ui-1.7.2.custom (minimum v1.7.2, complete folder including CSS)
+ * - ../plugins/jq_ui_dialog.js
+ * - ../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.dialog.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, e_mb_mod, e_target, e_requires, e_url) VALUES('<GUI name>','dialogManager',5,1,'','','div','','',-1,-1,NULL ,NULL ,NULL ,'','','div','../x_test/portalu/mod_dialogManager.js','','','','');
+ * > 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 ('<appId>','jq_ui_dialog',
+ * > 5,1,'Dialog from jQuery UI framework','','','','',NULL ,NULL ,NULL ,
+ * > NULL ,NULL ,'','','','../plugins/jq_ui_dialog.js',
+ * > '../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.dialog.js',
+ * > '','jq_ui','');
  *
  * Help:
- * http://www.mapbender.org/Dialog_Manager
+ * http://jqueryui.com/demos/dialog
  *
  * Maintainer:
- * http://www.mapbender.org/User:Lars_Beck
+ * http://www.mapbender.org/User:Christoph_Baudson
  * 
- * Parameters:
- * <normal element var name>      - <type and description>
- * <optional element var name>    - *[optional]* <type and description>
- * <deprecated element var name>  - *[deprecated]* <type and description>
- *
  * License:
  * Copyright (c) 2009, Open Source Geospatial Foundation
  * 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
  */
-
-var defaultOptions = {};
-
-defaultOptions.content      = (typeof options.dialogContent      !== 'undefined') ? options.dialogContent      : '';
-defaultOptions.url          = (typeof options.dialogURL          !== 'undefined') ? options.dialogURL          : null;
-defaultOptions.dimensions   = (typeof options.dialogDimensions   !== 'undefined') ? options.dialogDimensions   : [550,400];
-defaultOptions.position     = (typeof options.dialogPosition     !== 'undefined') ? options.dialogPosition     : 'center';
-defaultOptions.isModal      = (typeof options.dialogIsModal      !== 'undefined') ? options.dialogIsModal      : true;
-defaultOptions.isResizeable = (typeof options.dialogIsResizeable !== 'undefined') ? options.dialogIsResizeable : false;
-defaultOptions.isDraggable  = (typeof options.dialogIsDraggable  !== 'undefined') ? options.dialogIsDraggable  : false;
-defaultOptions.title        = (typeof options.dialogTitle        !== 'undefined') ? options.dialogTitle        : null;
-defaultOptions.effectShow   = (typeof options.dialogEffectShow   !== 'undefined') ? options.dialogEffectShow   : null;
-defaultOptions.effectHide   = (typeof options.dialogEffectHide   !== 'undefined') ? options.dialogEffectHide   : null;
-
-var DialogManager = function() {
-	
-	this.dialogOptions  = {};
-	this.currentDialogs = [];
-	
-	this.openDialog = function(customOptions) {
-		if(typeof customOptions === 'undefined') {
-			customOptions = {};
-		}
-
-		dialogManager = this;
-		
-		this.createDialogID();
-
-		this.dialogOptions.content      = (typeof customOptions.content      !== 'undefined') ? customOptions.content      : defaultOptions.content;
-		this.dialogOptions.dimensions   = (typeof customOptions.dimensions   !== 'undefined') ? customOptions.dimensions   : defaultOptions.dimensions;
-		this.dialogOptions.position     = (typeof customOptions.position     !== 'undefined') ? customOptions.position     : defaultOptions.position;
-		this.dialogOptions.isModal      = (typeof customOptions.isModal      !== 'undefined') ? customOptions.isModal      : defaultOptions.isModal;
-		this.dialogOptions.isResizeable = (typeof customOptions.isResizeable !== 'undefined') ? customOptions.isResizeable : defaultOptions.isResizeable;
-		this.dialogOptions.isDraggable  = (typeof customOptions.isDraggable  !== 'undefined') ? customOptions.isDraggable  : defaultOptions.isDraggable;
-		this.dialogOptions.title        = (typeof customOptions.title        !== 'undefined') ? customOptions.title        : defaultOptions.title;
-		this.dialogOptions.effectShow   = (typeof customOptions.effectShow   !== 'undefined') ? customOptions.effectShow   : defaultOptions.effectShow;
-		this.dialogOptions.effectHide   = (typeof customOptions.effectHide   !== 'undefined') ? customOptions.effectHide   : defaultOptions.effectHide;
-
-		if(typeof customOptions.url !== 'undefined') {
-			this.dialogOptions.content = '<iframe src="' + customOptions.url + '" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>';
-		}
-	
-		this.dialog = $(document.createElement('div'))
-			.attr('id',this.dialogID)
-			.html(this.dialogOptions.content)
-			.appendTo('body')
-			.dialog({
-				width:      this.dialogOptions.dimensions.shift(),
-				height:     this.dialogOptions.dimensions.shift(),
-				position:   this.dialogOptions.position,
-				modal:      this.dialogOptions.isModal,
-				resizeable: this.dialogOptions.isResizable,
-				draggable:  this.dialogOptions.isResizable,
-				title:      this.dialogOptions.title,
-				show:       this.dialogOptions.effectShow,
-				hide:       this.dialogOptions.effectHide,
-				open:       function() {
-					dialogManager.addToCurrentDialogs(this.id);
-				},
-				close:      function() {
-					dialogManager.removeFromCurrentDialogs(this.id);
-				}
-		});
-		
-		return this.dialog;
-	}
-
-	this.closeDialog = function(openDialog) {
-		$(openDialog).dialog('close');
-	}
-
-	this.createDialogID = function() {
-			this.dialogID = 'mb-dialog-' + parseInt(new Date().getTime());
-	}
-	
-	this.addToCurrentDialogs = function() {
-		this.currentDialogs.push(this.dialogID);
-	}
-
-	this.removeFromCurrentDialogs = function(dialogID) {
-		for(var i = 0; i < this.currentDialogs.length; i++) {
-			if(this.currentDialogs[i] === dialogID) {
-				if (i === 0) {
-					this.currentDialogs.shift();
-				}
-				else if (i === (this.currentDialogs.length - 1)) {
-					this.currentDialogs.pop();
-				}
-				else {
-					var partA = this.currentDialogs.slice(0,(i - 1));
-					var partB = this.currentDialogs.slice(i + 1,(this.currentDialogs.length - 1));
-					
-					this.currentDialogs = (partA + partB);
-				}
-				
-				return;
-			}
-		}
-	}
-	
-};
-
-/*
-$(document).ready(function() {
-	Mapbender.modules[options.id] = $.extend(new DialogManager(),Mapbender.modules[options.id]);	
-});
-
-$('#dialog-trigger-a').click(function() {
-	Mapbender.modules.dialogManager.openDialog();
-});
-
-$('#dialog-trigger-b').click(function() {
-	Mapbender.modules.dialogManager.openDialog({
-		'url':        'http://www.google.de/',
-		'dimensions': [800,600],
-		'position':   [5,5],
-		'title':      'Google',
-		'isModal':    false,
-		'effectShow': 'blind'
-	});
-});
-
-$('#dialog-trigger-c').click(function() {
-	Mapbender.modules.dialogManager.openDialog({
-		'content':    'Verbrechen lohnt sich nicht.',
-		'title':      'Hinweis',
-		'effectShow': 'puff',
-		'effectHide': 'puff'
-	});
-});
-*/
\ No newline at end of file

Added: trunk/mapbender/http/plugins/jq_ui_effects.js
===================================================================
--- trunk/mapbender/http/plugins/jq_ui_effects.js	                        (rev 0)
+++ trunk/mapbender/http/plugins/jq_ui_effects.js	2010-01-29 07:28:40 UTC (rev 5449)
@@ -0,0 +1,80 @@
+/**
+ * Package: jq_ui_effects
+ *
+ * Description:
+ * A collection of jQuery UI effects
+ * 
+ * Files:
+ *  - http/plugins/jq_ui_effects.js
+ *  - http/extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.effects.*
+ *
+ * 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, 
+ * > e_mb_mod, e_target, e_requires, e_url) VALUES ('<appId>','jq_ui_effect',
+ * > 1,1,'','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','',
+ * > 'jq_ui_effects.php',
+ * > '../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.effects.core.js',
+ * > '','','');
+ * > 
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'blind', 
+ * > '0', '1 = effect active' ,'php_var');
+ * > 
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'bounce', 
+ * > '0', '1 = effect active' ,'php_var');
+ * >
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'clip', 
+ * > '0', '1 = effect active' ,'php_var');
+ * > 
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'drop', 
+ * > '0', '1 = effect active' ,'php_var');
+ * > 
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'explode', 
+ * > '0', '1 = effect active' ,'php_var');
+ * > 
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'fold', 
+ * > '0', '1 = effect active' ,'php_var');
+ * > 
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'highlight', 
+ * > '0', '1 = effect active' ,'php_var');
+ * > 
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'pulsate', 
+ * > '0', '1 = effect active' ,'php_var');
+ * > 
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'scale', 
+ * > '0', '1 = effect active' ,'php_var');
+ * >
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'shake', 
+ * > '0', '1 = effect active' ,'php_var');
+ * > 
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'slide', 
+ * >'0', '1 = effect active' ,'php_var');
+ * >
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'transfer', 
+ * > '1', '1 = effect active' ,'php_var');
+ *
+ * Help:
+ * http://jqueryui.com/docs/effect/
+ *
+ * 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.  
+ * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
+ */

Modified: trunk/mapbender/http/plugins/jq_ui_effects.php
===================================================================
--- trunk/mapbender/http/plugins/jq_ui_effects.php	2010-01-29 07:27:45 UTC (rev 5448)
+++ trunk/mapbender/http/plugins/jq_ui_effects.php	2010-01-29 07:28:40 UTC (rev 5449)
@@ -1,88 +1,10 @@
-/**
- * Package: jq_ui_effects
- *
- * Description:
- * A collection of jQuery UI effects
- * 
- * Files:
- *  - http/plugins/jq_ui_effects.js
- *  - http/extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.effects.*
- *
- * 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, 
- * > e_mb_mod, e_target, e_requires, e_url) VALUES ('<appId>','jq_ui_effect',
- * > 1,1,'','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','',
- * > 'jq_ui_effects.php',
- * > '../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.effects.core.js',
- * > '','','');
- * > 
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'blind', 
- * > '0', '1 = effect active' ,'php_var');
- * > 
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'bounce', 
- * > '0', '1 = effect active' ,'php_var');
- * >
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'clip', 
- * > '0', '1 = effect active' ,'php_var');
- * > 
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'drop', 
- * > '0', '1 = effect active' ,'php_var');
- * > 
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'explode', 
- * > '0', '1 = effect active' ,'php_var');
- * > 
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'fold', 
- * > '0', '1 = effect active' ,'php_var');
- * > 
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'highlight', 
- * > '0', '1 = effect active' ,'php_var');
- * > 
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'pulsate', 
- * > '0', '1 = effect active' ,'php_var');
- * > 
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'scale', 
- * > '0', '1 = effect active' ,'php_var');
- * >
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'shake', 
- * > '0', '1 = effect active' ,'php_var');
- * > 
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'slide', 
- * >'0', '1 = effect active' ,'php_var');
- * >
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'jq_ui_effect', 'transfer', 
- * > '1', '1 = effect active' ,'php_var');
- *
- * Help:
- * http://www.mapbender.org/<wiki site name>
- *
- * 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.  
- * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
- */
 <?php
 	$uiPath = dirname(__FILE__) . '/' . 
 		"../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/";
 
 	include '../include/dyn_php.php';
+
+	include 'jq_ui_effects.js';
 	
 	if ($blind) {
 		include $uiPath . "min.effects.blind.js";
@@ -132,4 +54,4 @@
 		include $uiPath . "min.effects.transfer.js";
 	}
 	
-?>
+?>
\ No newline at end of file

Added: trunk/mapbender/http/plugins/jq_ui_slider.js
===================================================================
--- trunk/mapbender/http/plugins/jq_ui_slider.js	                        (rev 0)
+++ trunk/mapbender/http/plugins/jq_ui_slider.js	2010-01-29 07:28:40 UTC (rev 5449)
@@ -0,0 +1,33 @@
+/**
+ * Package:
+ * jq_ui_slider
+ *
+ * Description:
+ * Slider from jQuery UI framework
+ * 
+ * Files:
+ * - ../plugins/jq_ui_slider.js
+ * - ../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.slider.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, 
+ * > e_mb_mod, e_target, e_requires, e_url) VALUES ('<appId>','jq_ui_dialog',
+ * > 5,1,'Dialog from jQuery UI framework','','','','',NULL ,NULL ,NULL ,
+ * > NULL ,NULL ,'','','','../plugins/jq_ui_slider.js',
+ * > '../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.slider.js',
+ * > '','jq_ui','');
+ *
+ * Help:
+ * http://jqueryui.com/demos/dialog
+ *
+ * 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.  
+ * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
+ */

Modified: trunk/mapbender/http/plugins/mb_cookie.js
===================================================================
--- trunk/mapbender/http/plugins/mb_cookie.js	2010-01-29 07:27:45 UTC (rev 5448)
+++ trunk/mapbender/http/plugins/mb_cookie.js	2010-01-29 07:28:40 UTC (rev 5449)
@@ -49,8 +49,9 @@
 	var currentMapState = Mapbender.modules[mod_mapCookie_target];
 	var cookieData      = document.cookie.split(';');
 	var cookieExists = false;
+	var i, j;
 	
-	for(var i = 0; i < cookieData.length; i++) {
+	for (i = 0; i < cookieData.length; i++) {
 		var cookieName = new RegExp(mod_mapCookie_cookieName);
 		
 		if(!cookieData[i].match(cookieName)) {
@@ -63,13 +64,13 @@
 		currentMapState.epsg   = storedMapState.epsg;
 		
 		var currentWmsLayers = [];
-		for(var j = 0; j < currentMapState.wms.length; j++) {
+		for (j = 0; j < currentMapState.wms.length; j++) {
 			for(var k = 0; k < currentMapState.wms[j].objLayer.length; k++) {
 				currentWmsLayers.push(currentMapState.wms[j].objLayer[k]);
 			}
 		}
 	
-		for(var j = 0; j < currentWmsLayers.length; j++) {
+		for (j = 0; j < currentWmsLayers.length; j++) {
 			for(k = 0; k < storedMapState.layers.length; k++) {
 				var storedWmsTitle           = storedMapState.layers[k][0];
 				var storedLayerId            = storedMapState.layers[k][1];
@@ -86,8 +87,8 @@
 
 		var index = getMapObjIndexByName(mod_mapCookie_target);     
 		var dimensions = storedMapState.mapsize.split(",");
-		var width      = parseInt(dimensions[0]);
-		var height     = parseInt(dimensions[1]);
+		var width      = parseInt(dimensions[0], 10);
+		var height     = parseInt(dimensions[1], 10);
 
 		var coordArray = storedMapState.extent.split(",");
 		var newExtent = new Mapbender.Extent(
@@ -107,12 +108,12 @@
 		return;
 	}		
 
-	for(var i = 0; i < currentMapState.wms.length; i++) {
+	for (i = 0; i < currentMapState.wms.length; i++) {
 		mb_restateLayers(mod_mapCookie_target,currentMapState.wms[i].wms_id);
 	}
 
 //	eventAfterLoadWMS.trigger();
-	for(var i = 0; i < mb_mapObj.length; i++) {
+	for (i = 0; i < mb_mapObj.length; i++) {
 		mb_mapObj[i].setMapRequest();
 	}
 }

Modified: trunk/mapbender/http/plugins/mb_resultList_transferToDigitize.js
===================================================================
--- trunk/mapbender/http/plugins/mb_resultList_transferToDigitize.js	2010-01-29 07:27:45 UTC (rev 5448)
+++ trunk/mapbender/http/plugins/mb_resultList_transferToDigitize.js	2010-01-29 07:28:40 UTC (rev 5449)
@@ -30,7 +30,7 @@
  * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
  */
 
-var originalI18nObj = {
+var originalI18nObject = {
 	labelButton: "edit"	
 };
 
@@ -46,16 +46,31 @@
 });
 
 Mapbender.events.init.register(function () {
-	options.$target.mapbender(function () {
-		this.addGlobalButton({
-			title: translatedI18nObject.labelButton, 
-			callback: function (data) {
-				var digitizeArray = new GeometryArray();
-				digitizeArray.importGeoJSON(data.selectedRows.toString());
-				digitizeArray.get(0).wfs_conf = data.WFSConf;				
-				tab_open(options.digitizeId);
-				window.frames[options.digitizeId].appendGeometryArray(digitizeArray);
+	Mapbender.modules[options.target[0]].addGlobalButton({
+		title: translatedI18nObject.labelButton, 
+		callback: function (data) {
+			tab_open(options.digitizeId);
+
+			var digitizeArray = new GeometryArray();
+
+			var wfsConf = get_complete_wfs_conf();
+			
+			var getJsWfsConfIdByDbWfsConfId = function (wfsConf, id) {
+				for (var i = 0; i < wfsConf.length; i++) {
+					if (parseInt(wfsConf[i].wfs_conf_id, 10) === id) {
+						return i;
+					}
+				}
+				return null;
+			};
+			
+			for (var i in data.selectedRows) {
+				digitizeArray.importGeoJSON(data.selectedRows[i].toString());
+				digitizeArray.get(-1).wfs_conf = 
+					getJsWfsConfIdByDbWfsConfId(wfsConf, parseInt(data.WFSConf.wfs_conf_id));
 			}
-		});
+			window.frames[options.digitizeId].appendGeometryArray(digitizeArray);
+			tab_open(options.digitizeId);
+		}
 	});	
 });
\ No newline at end of file

Added: trunk/mapbender/http/plugins/mb_tabs_vertical.js
===================================================================
--- trunk/mapbender/http/plugins/mb_tabs_vertical.js	                        (rev 0)
+++ trunk/mapbender/http/plugins/mb_tabs_vertical.js	2010-01-29 07:28:40 UTC (rev 5449)
@@ -0,0 +1,81 @@
+/**
+ * Package: tabs_vertical
+ *
+ * Description:
+ * An accordion decorator, replaces the deprecated element "tabs"
+ *
+ * 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
+ * absolutely.
+ *
+ * The width of this module determines the accordion width, but the height
+ * of the individual elements determines the height.
+ *
+ *
+ * Files:
+ *  - http/plugins/mb_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, 
+ * > e_mb_mod, e_target, e_requires, e_url) VALUES('<appId>',
+ * > 'tabs_vertical',2,1,
+ * > 'An accordion decorator, replaces the deprecated element tabs',
+ * > '','div','','',10,130,300,NULL ,2,'','','div',
+ * > '../plugins/jq_ui_accordion.js','','','jq_ui_accordion','');
+ * > 
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
+ * > var_value, context, var_type) VALUES('<appId>', 'tabs_vertical', 
+ * > 'active', '2', 'which tab to open on startup [1..n]' ,'var');
+ *
+ * Help:
+ * 
+ *
+ * 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.
+ * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
+ */
+
+$this = $(this);
+
+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 +
+			"</a></h3>"
+		)
+	).append(
+		$(
+			"<div></div>"
+		).append(
+			$(
+				"<div style='height:" + $c.css("height") +	"'></div>"
+			).append($c)
+		)
+	);
+}
+
+var accordionOptions = {
+	collapsible: true,
+	autoHeight: false,
+	active: typeof options.active !== "number" ? 
+		false : options.active - 1
+};
+
+if (typeof options.attribute !== "undefined") {
+	accordionOptions[attribute] = options.attribute;
+}
+
+$this.accordion(accordionOptions);



More information about the Mapbender_commits mailing list