[Mapbender-commits] r6925 - in trunk/mapbender: http/javascripts
resources/db/pgsql/UTF-8/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Sep 21 15:07:04 EDT 2010
Author: marc
Date: 2010-09-21 19:07:04 +0000 (Tue, 21 Sep 2010)
New Revision: 6925
Added:
trunk/mapbender/http/javascripts/mod_searchCSW_ajax_button.php
Modified:
trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.2_to_2.7rc1_pgsql_UTF-8.sql
Log:
http://trac.osgeo.org/mapbender/ticket/682
Added: trunk/mapbender/http/javascripts/mod_searchCSW_ajax_button.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_searchCSW_ajax_button.php (rev 0)
+++ trunk/mapbender/http/javascripts/mod_searchCSW_ajax_button.php 2010-09-21 19:07:04 UTC (rev 6925)
@@ -0,0 +1,86 @@
+<?php
+# $Id: mod_addWmsFromFilteredList_button.php 6834 2010-08-30 08:52:00Z verenadiewald $
+# 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 searchCSWId = '" . $e_id . "';";
+?>
+var searchCSW_title;
+var searchCSWPopup;
+
+eventInit.register(function () {
+ var $searchCSWButton = $("#" + searchCSWId);
+ searchCSW_title = $searchCSWButton.get(0).title;
+ $searchCSWButton.click(function () {
+ var $searchCSWButton = $("#" + searchCSWId);
+ searchCSW_title = $searchCSWButton.get(0).title;
+ searchCSW_showPopup();
+ });
+});
+
+var searchCSW_showPopup = function () {
+ if($('.searchCSWIframe').size() > 0) {
+ $('.searchCSWIframe').dialog('destroy');
+ }
+ var $searchCSWPopup = $('<div class="searchCSWIframe"><iframe style="width:100%;height:98%;" src="../javascripts/mod_searchCSW_ajax.php?<?php
+
+ echo session_name() . '=' . session_id() . '&';
+ echo "guiID=" . $gui_id . '&';
+ echo "elementID=" . $e_id;
+
+ ?>"></iframe></div>');
+ $searchCSWPopup.dialog({
+ title : searchCSW_title,
+ bgiframe: true,
+ autoOpen: true,
+ modal: false,
+ width: 720,
+ height: 600,
+ pos: [300,100]
+ });
+};
+
+eventLocalize.register(function () {
+ if($('.searchCSWIframe').size() > 0) {
+ $('.searchCSWIframe').dialog('destroy');
+ }
+});
+
+eventInit.register(function () {
+ mod_searchCSW_init();
+});
+
+var mod_searchCSW_img = new Image();
+mod_searchCSW_img.src = "<?php echo $e_src; ?>";
+var mod_searchCSW_img_over = new Image();
+mod_searchCSW_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function mod_searchCSW_init() {
+ var obj = document.getElementById(searchCSWId);
+ obj.src = mod_searchCSW_img.src;
+ obj.onmouseover = new Function("mod_searchCSW_over()");
+ obj.onmouseout = new Function("mod_searchCSW_out()");
+}
+function mod_searchCSW_over(){
+ document.getElementById(searchCSWId).src = mod_searchCSW_img_over.src;
+}
+
+function mod_searchCSW_out(){
+ document.getElementById(searchCSWId).src = mod_searchCSW_img.src;
+}
\ No newline at end of file
Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.2_to_2.7rc1_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.2_to_2.7rc1_pgsql_UTF-8.sql 2010-09-21 17:55:38 UTC (rev 6924)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.2_to_2.7rc1_pgsql_UTF-8.sql 2010-09-21 19:07:04 UTC (rev 6925)
@@ -2806,3 +2806,10 @@
--
ALTER TABLE mb_group ADD COLUMN mb_group_homepage VARCHAR(255);
+--
+--UPDATE addCSW (Ticket #682)
+--
+UPDATE gui_element SET e_attributes='', e_js_file='mod_searchCSW_ajax_button.php' WHERE e_id='addCSW';
+
+
+
More information about the Mapbender_commits
mailing list