[Mapbender-commits] r3873 - in trunk/mapbender: http/javascripts resources/db/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Apr 14 06:36:20 EDT 2009


Author: astrid_emde
Date: 2009-04-14 06:36:20 -0400 (Tue, 14 Apr 2009)
New Revision: 3873

Added:
   trunk/mapbender/http/javascripts/mod_addWmsFromFilteredList_button.php
Modified:
   trunk/mapbender/resources/db/update/update_2.7.sql
Log:
new script and SQL to handle AddWMSFromFilteredList regarding localization

Added: trunk/mapbender/http/javascripts/mod_addWmsFromFilteredList_button.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_addWmsFromFilteredList_button.php	                        (rev 0)
+++ trunk/mapbender/http/javascripts/mod_addWmsFromFilteredList_button.php	2009-04-14 10:36:20 UTC (rev 3873)
@@ -0,0 +1,80 @@
+<?php
+# $Id$
+# http://www.mapbender.org/Add_WMS_from_filtered_list_%28AJAX%29
+# Copyright (C) 2002 CCGIS 
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+echo "var addWmsFromFilteredListId = '" . $e_id . "';";
+?>
+var addWmsFromFilteredList_title;
+var addWmsFromFilteredListPopup;
+
+eventInit.register(function () {
+	var $addWmsFromFilteredListButton = $("#" + addWmsFromFilteredListId);
+	addWmsFromFilteredList_title = $addWmsFromFilteredListButton.get(0).title;
+	$addWmsFromFilteredListButton.click(function () {
+		var $addWmsFromFilteredListButton = $("#" + addWmsFromFilteredListId);
+		addWmsFromFilteredList_title = $addWmsFromFilteredListButton.get(0).title;
+		addWmsFromFilteredList_showPopup();
+	});
+});
+
+var addWmsFromFilteredList_showPopup = function () {
+	addWmsFromFilteredListPopup = new mb_popup({
+		title:addWmsFromFilteredList_title,
+		url:"../javascripts/mod_addWMSfromfilteredList_ajax.php?<?php 
+		
+	echo session_name() . '=' . session_id() . '&';
+	echo "guiID=" . $gui_id . '&';
+	echo "elementID=" . $e_id;
+	
+		?>",
+		width:720, 
+		height:600,
+		left:300, 
+		top:100
+	});
+	addWmsFromFilteredListPopup.show()
+};
+
+eventLocalize.register(function () {
+	addWmsFromFilteredListPopup.destroy();
+});
+
+eventInit.register(function () {
+	mod_addWmsFromFilteredList_init();
+});
+
+var mod_addWmsFromFilteredList_img = new Image(); 
+mod_addWmsFromFilteredList_img.src = "<?php  echo $e_src;  ?>";
+var mod_addWmsFromFilteredList_img_over = new Image(); 
+mod_addWmsFromFilteredList_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
+
+function mod_addWmsFromFilteredList_init() {
+	var obj = document.getElementById(addWmsFromFilteredListId);
+	obj.src = mod_addWmsFromFilteredList_img.src;
+	obj.onmouseover = new Function("mod_addWmsFromFilteredList_over()");
+	obj.onmouseout = new Function("mod_addWmsFromFilteredList_out()");
+}
+function mod_addWmsFromFilteredList_over(){
+	document.getElementById(addWmsFromFilteredListId).src = mod_addWmsFromFilteredList_img_over.src;
+}
+
+function mod_addWmsFromFilteredList_out(){
+	document.getElementById(addWmsFromFilteredListId).src = mod_addWmsFromFilteredList_img.src;
+}
\ No newline at end of file


Property changes on: trunk/mapbender/http/javascripts/mod_addWmsFromFilteredList_button.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Modified: trunk/mapbender/resources/db/update/update_2.7.sql
===================================================================
--- trunk/mapbender/resources/db/update/update_2.7.sql	2009-04-14 10:28:28 UTC (rev 3872)
+++ trunk/mapbender/resources/db/update/update_2.7.sql	2009-04-14 10:36:20 UTC (rev 3873)
@@ -1,4 +1,9 @@
 -- remove event handlers, are now in the script
 UPDATE gui_element SET e_attributes = '' WHERE e_id = 'selArea1';
 UPDATE gui_element SET e_attributes = '' WHERE e_id = 'pan1';
-UPDATE gui_element SET e_content = '' WHERE e_id = 'navFrame';
\ No newline at end of file
+UPDATE gui_element SET e_content = '' WHERE e_id = 'navFrame';
+
+
+-- 
+-- new definition of addWMSfromfilteredList_ajax due to i18n
+UPDATE gui_element set e_attributes = '', e_js_file = 'mod_addWmsFromFilteredList_button.php' where e_id = 'addWMSfromfilteredList_ajax';
\ No newline at end of file



More information about the Mapbender_commits mailing list