[Mapbender-commits] r5003 - branches/2.6/resources/db/pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Nov 18 04:29:52 EST 2009


Author: astrid_emde
Date: 2009-11-18 04:29:50 -0500 (Wed, 18 Nov 2009)
New Revision: 5003

Added:
   branches/2.6/resources/db/pgsql/UTF-8/update/update_my_guis.sql
Log:
first version of a script that updates the user applications to 2.6

see Ticket http://trac.osgeo.org/mapbender/ticket/562

The script was prepared by frankjaeger. I made some changes to use it universal

Added: branches/2.6/resources/db/pgsql/UTF-8/update/update_my_guis.sql
===================================================================
--- branches/2.6/resources/db/pgsql/UTF-8/update/update_my_guis.sql	                        (rev 0)
+++ branches/2.6/resources/db/pgsql/UTF-8/update/update_my_guis.sql	2009-11-18 09:29:50 UTC (rev 5003)
@@ -0,0 +1,758 @@
+UPDATE gui_element SET e_mb_mod = 'map_obj.js,map.js,wms.js,wfs_obj.js,initWms.php' WHERE e_id = 'mapframe1';
+
+UPDATE gui_element SET e_js_file = 'wfs.php', e_target='mapframe1,overview' WHERE e_id = 'wfs';
+
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'forward';
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'back';
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'zoomIn1';
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'zoomOut1';
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'measure';
+
+
+DELETE FROM gui_element WHERE e_id = 'closePolygon';
+DELETE FROM gui_element WHERE e_id = 'rubber';
+DELETE FROM gui_element WHERE e_id = 'getArea';
+DELETE FROM gui_element WHERE e_id = 'rubberExt';
+
+UPDATE gui_element SET e_element = 'select', e_src = '', e_attributes = '', e_content = '<option value="">undefined</option>
+<option value="EPSG:4326">EPSG:4326</option>
+<option value="EPSG:31466">EPSG:31466</option>
+<option value="EPSG:31467">EPSG:31467</option>
+<option value="EPSG:31468">EPSG:31468</option>
+<option value="EPSG:31469">EPSG:31469</option>', e_closetag = 'select', e_js_file = 'mod_changeEPSG.php' WHERE e_id = 'changeEPSG';
+
+UPDATE gui_element SET e_element = 'div', 
+e_src = '', 
+e_attributes = '', 
+e_more_styles = 'overflow:hidden;',
+e_content = '',
+e_closetag = 'div', 
+e_js_file = 'mod_zoomCoords.php', 
+--e_target = 'mapframe1,overview', 
+e_requires = 'mapframe1' WHERE e_id = 'zoomCoords';
+
+--#new element vars for wfs_gazetteer
+-- ----------------------------------
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'gazetteerWFS', 'showResultInPopup', '1', 'if value is 1 search results will be displayed in popup, otherwise in gazetteer div' ,'var');
+
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'gazetteerWFS', 'wfs_spatial_request_conf_filename', 'wfs_additional_spatial_search.conf', 'location and name of the WFS configuration file for spatialRequest' ,'php_var');
+
+-- Fuer welche GUIs kommt das in Frage?
+--  SELECT fkey_gui_id 
+--    FROM gui_element
+--   WHERE e_id = 'gazetteerWFS'
+--     AND fkey_gui_id not like 'gui%'
+--   ORDER BY fkey_gui_id;
+
+
+-- Update ueber Subquery
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+  SELECT fkey_gui_id, 'gazetteerWFS', 'showResultInPopup', '1', 'if value is 1 search results will be displayed in popup, otherwise in gazetteer div' ,'var'
+    FROM gui_element
+   WHERE e_id = 'gazetteerWFS'
+     AND fkey_gui_id not like 'gui%'; 
+
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+  SELECT fkey_gui_id, 'gazetteerWFS', 'wfs_spatial_request_conf_filename', 'wfs_additional_spatial_search.conf', 'location and name of the WFS configuration file for spatialRequest' ,'php_var'
+    FROM gui_element
+   WHERE e_id = 'gazetteerWFS'
+     AND fkey_gui_id not like 'gui%'; 
+--#ENDE new element vars for wfs_gazetteer
+
+
+--#used modules
+-- ------------
+--add all used modules for gazetteerWFS
+--UPDATE gui_element 
+--   SET e_mb_mod = 'geometry.js,requestGeometryConstructor.js,popup.js,../extensions/jquery.tablesorter.js' 
+-- WHERE e_id     = 'gazetteerWFS' 
+--   AND fkey_gui_id = 'gui';
+
+-- Warum nicht gui2, die enthält auch 'gazetteerWFS' ???
+-- Wirklich auf alle anwenden?
+
+-- Welche GUIs wären betroffen?
+--SELECT fkey_gui_id, e_mb_mod FROM gui_element WHERE e_id     = 'gazetteerWFS'   AND fkey_gui_id not IN ('gui','gui1','gui_digitize','gui2');
+
+UPDATE gui_element 
+   SET e_mb_mod = 'geometry.js,requestGeometryConstructor.js,popup.js,../extensions/jquery.tablesorter.js' 
+ WHERE e_id     = 'gazetteerWFS'
+   AND fkey_gui_id not IN ('gui','gui1','gui_digitize','gui2');
+--#ENDE used modules
+
+
+--#new element vars
+-- ----------------
+-- Hier das Muster für GUI "gui"
+-- INSERT INTO gui_element_vars (fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+-- VALUES ('gui', 'body', 'popupcss', '../css/popup.css', 'file css', 'file/css');
+
+-- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+-- VALUES('gui', 'body', 'tablesortercss', '../css/tablesorter.css', 'file css' ,'file/css');
+
+--SELECT * 
+--  FROM gui_element_vars
+--WHERE  fkey_e_id = 'body'
+--  AND var_name   ='popupcss'
+--  AND fkey_gui_id IN 
+--    ( SELECT fkey_gui_id  FROM   gui_gui_category
+--      WHERE  fkey_gui_category_id in (3, 4, 5, 6, 7)
+--    );
+
+-- gesteuert ueber Kategorie
+-- Bei (fast) allen schon vorhanden, Löschen, sonst Schlüsselverletzung
+
+DELETE 
+  FROM gui_element_vars
+WHERE  fkey_e_id = 'body'
+  AND var_name   ='popupcss'
+  AND fkey_gui_id IN 
+    ( SELECT fkey_gui_id  FROM   gui_gui_category
+      WHERE  fkey_gui_category_id in (3, 4, 5, 6, 7)
+    );
+
+INSERT INTO gui_element_vars (fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+   SELECT fkey_gui_id,  'body', 'popupcss', '../css/popup.css', 'file css', 'file/css'
+   FROM   gui_gui_category
+   WHERE  fkey_gui_category_id in (3, 4, 5, 6, 7);
+
+--SELECT * 
+--  FROM gui_element_vars
+--WHERE  fkey_e_id = 'body'
+--  AND var_name   ='tablesortercss'
+--  AND fkey_gui_id IN 
+--    ( SELECT fkey_gui_id  FROM   gui_gui_category
+--      WHERE  fkey_gui_category_id in (3, 4, 5, 6, 7)
+--    );
+
+-- noch keins vorhanden ausser bei gui & Co.
+
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+   SELECT fkey_gui_id, 'body', 'tablesortercss', '../css/tablesorter.css', 'file css' ,'file/css' 
+   FROM   gui_gui_category
+   WHERE  fkey_gui_category_id in (3, 4, 5, 6, 7);
+--#ENDE new element vars
+
+
+
+--#style in gui_digitize
+-- ---------------------
+--add style class to element var text css of element digitize in gui_digitize
+
+UPDATE gui_element_vars 
+SET var_value = 
+'digitizeGeometryList {position:absolute; top:50px; left:0px;}
+.digitizeGeometryListItem {color:#000000; font-size:10px;}
+body {font-family: Arial, Helvetica, sans-serif; font-size:12px; color:#ff00ff; background-color:#ffffff; margin-top: 0px; margin-left:0px;}
+.button {height:18px; width:32px;}' 
+WHERE fkey_e_id = 'digitize' 
+  AND var_name  = 'text css';
+--#ENDE style in gui_digitize
+
+
+--#Admin-GUIs
+-- eigene Admin-GUI "Benutzerverwaltung" nachtragen
+UPDATE gui_element 
+   SET e_attributes = 'onload="init()"' 
+ WHERE e_id = 'body' 
+   AND fkey_gui_id IN ('Benutzerverwaltung');
+--#ENDE Admin-GUIs
+
+--#Koordinatensysteme
+ UPDATE gui_element 
+ SET e_element = 'select', 
+     e_src = '', 
+     e_attributes = '', 
+     e_content = '<option value="">undefined</option>
+ <option value="EPSG:4326">EPSG:4326</option>
+ <option value="EPSG:31466">EPSG:31466</option>
+ <option value="EPSG:31467">EPSG:31467</option>
+ <option value="EPSG:31468">EPSG:31468</option>
+ <option value="EPSG:31469">EPSG:31469</option>', 
+ e_closetag = 'select', 
+ e_js_file = 'mod_changeEPSG.php' 
+ WHERE e_id = 'changeEPSG';
+--#ENDE Koordinatensysteme
+
+
+--#demo splash screen for ....
+-- -----------------------------
+-- Muster fuer gui1
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui1', 'body', 'use_load_message', 'true', '' ,'php_var');
+
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui1', 'body', 'includeWhileLoading', '../include/splash.php', '' ,'php_var');
+
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+   SELECT gui_id, 'body', 'use_load_message', 'true', '' ,'php_var'
+	FROM gui WHERE gui_id not IN ('gui','gui1','gui_digitize','gui2','admin1', 'admin2_de','admin2_en','admin_de_services','admin_en_services') 
+	and gui_id not LIKE 'wms_%';
+	
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+   SELECT fkey_gui_id, 'body', 'includeWhileLoading', '../include/splash.php', '' ,'php_var'
+	FROM gui WHERE gui_id not IN ('gui','gui1','gui_digitize','gui2','admin1', 'admin2_de','admin2_en','admin_de_services','admin_en_services') 
+	and gui_id not LIKE 'wms_%';
+   --#Ende Splash
+
+
+
+--#WMS-Container
+-- -------------
+UPDATE gui_element 
+   SET e_attributes = 'onload="init()"' 
+ WHERE e_id = 'body' 
+ --AND fkey_gui_id IN (...'wms_germany', '...);
+   AND fkey_gui_id like 'wms at _%'  ESCAPE '@'
+    OR fkey_gui_id like 'WFS at _%'  ESCAPE '@';
+
+--#ENDE WMS-Container
+
+
+--#gui: tab: increase the size of the frames onmouseover
+-- -----------------------------------------------------
+--UPDATE gui_element 
+--   SET e_attributes  = 'frameborder = "0" onmouseover="this.style.zIndex=300;this.style.width=350;" onmouseout="this.style.zIndex=2;this.style.width=200"',
+--       e_more_styles = 'visibility:hidden; border: 1px solid #a19c8f;' 
+--WHERE e_id IN ('treeGDE','printPDF','legend','imprint','meetiongPoint','gazetteerWFS') 
+--  AND fkey_gui_id IN ('gui');  --                            *
+
+UPDATE gui_element 
+   SET e_attributes  = 'frameborder = "0" onmouseover="this.style.zIndex=300;this.style.width=350;" onmouseout="this.style.zIndex=2;this.style.width=200"',
+       e_more_styles = 'visibility:hidden; border: 1px solid #a19c8f;' 
+WHERE e_id IN ('treeGDE', 'legend') 
+  AND fkey_gui_id IN 
+  ( -- Subquery liefert GUIs aus bestimmten Katagorien
+   SELECT gui_id 
+	FROM gui WHERE gui_id not IN ('gui','gui1','gui_digitize','gui2','admin1', 'admin2_de','admin2_en','admin_de_services','admin_en_services') 
+	and gui_id not LIKE 'wms_%'
+  );
+
+
+-- set background colour of gazetteer
+--UPDATE gui_element 
+--SET e_more_styles = 'visibility:hidden; background:#fff; border: 1px solid #a19c8f;' 
+--WHERE e_id = 'gazetteerWFS' AND fkey_gui_id IN ('gui');
+
+-- "gazetteerWFS" oben raus genommen, wird hier getrennt behandelt statt nachträglich punktuell korrigiert
+UPDATE gui_element 
+   SET e_attributes  = 'frameborder = "0" onmouseover="this.style.zIndex=300;this.style.width=350;" onmouseout="this.style.zIndex=2;this.style.width=280"',
+       e_more_styles = 'visibility:hidden; background:#fff; border: 1px solid #a19c8f;' 
+WHERE e_id IN ('gazetteerWFS') 
+  AND fkey_gui_id IN 
+  ( -- Subquery liefert GUIs aus bestimmten Katagorien
+   SELECT gui_id 
+	FROM gui WHERE gui_id not IN ('gui','gui1','gui_digitize','gui2','admin1', 'admin2_de','admin2_en','admin_de_services','admin_en_services') 
+	and gui_id not LIKE 'wms_%'
+  );
+
+
+-- "MeetingPoint" ist im Original falsch geschrieben.
+-- .             .. ist aber sowieso breit genug und braucht gar nicht dynamisch erweitert werden
+-- "printPDF" ist ebenfalls breit genug: aus IN-Liste raus genommen
+-- 'imprint'  wird hier nicht verwendet: aus IN-Liste raus genommen
+
+--UPDATE gui_element 
+--   SET e_more_styles = e_more_styles || ' background-color:#FFFFFF;'  
+-- WHERE e_id IN ('treeGDE','imprint') 
+--   AND fkey_gui_id IN ('gui');
+
+-- nicht angepasst, weil:
+--   Wird unter "tabs wideout" sowieso wieder überschrieben
+
+--##Ende tab: "increase"
+
+
+--#tabs wideout
+-- ------------
+-- Bugfix for treegde in gui (tabs wideout)
+--UPDATE gui_element 
+--   SET e_more_styles='visibility:hidden; background-color:#ffffff;border: 1px solid #a19c8f;overflow:auto;' 
+-- WHERE fkey_gui_id='gui' 
+--   AND e_id='treeGDE';
+
+UPDATE gui_element 
+   SET e_more_styles='visibility:hidden; background-color:#ffffff;border: 1px solid #a19c8f;overflow:auto;' 
+ WHERE e_id='treeGDE'
+   AND fkey_gui_id IN 
+  ( -- Subquery liefert GUIs aus bestimmten Katagorien
+   SELECT gui_id 
+	FROM gui WHERE gui_id not IN ('gui','gui1','gui_digitize','gui2','admin1', 'admin2_de','admin2_en','admin_de_services','admin_en_services') 
+	and gui_id not LIKE 'wms_%'
+  );
+
+--#ENDE tabs wideout
+
+--#gui_treegde - delete entries which are not needed
+-- -------------------------------------------------
+--DELETE 
+--FROM gui_treegde 
+--WHERE fkey_gui_id IN ('gui','gui1','gui2','gui_digitize') 
+--  AND my_layer_title ='new';
+
+DELETE FROM gui_treegde 
+WHERE fkey_gui_id IN 
+   (   SELECT gui_id 
+	FROM gui WHERE gui_id not IN ('gui','gui1','gui_digitize','gui2','admin1', 'admin2_de','admin2_en','admin_de_services','admin_en_services') 
+	and gui_id not LIKE 'wms_%'
+   ) 
+  AND my_layer_title ='new';
+
+--#Ende "gui_treegde"
+
+
+--#module addWMSfromfilteredList_ajax
+-- ----------------------------------
+-- remove module addWMSfromfilteredList_ajax from every standard gui and set it new with new parameters and new element vars
+--DELETE FROM gui_element 
+--WHERE fkey_gui_id = 'gui'   -- Beispiel
+--  AND e_id        = 'addWMSfromfilteredList_ajax';
+
+-- Wo kommt das vor?
+--   SELECT *
+--     FROM gui_element 
+--    WHERE e_id = 'addWMSfromfilteredList_ajax';
+
+-- wieder einfügen
+--* Muster (ALT)
+--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('Buende_2',
+--'addWMSfromfilteredList_ajax',
+--2,1,
+--'add a WMS to the running application from a filtered list',
+--'Adding WMS from filtered list',
+--'img',
+--'../img/button_blink_red/add_filtered_list_off.png',
+--'onclick=''mod_addWMSfromfilteredList_win=window.open("../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID","mod_addWMSfromfilteredList_win","width=500, height=600, left=300, resizable=yes, scrollbars=yes")''  onmouseover=''this.src = this.src.replace(/_off/,"_over");''  onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="WMS hinzufügen aus gefilterter Liste"',
+--249,115,24,24,1,
+--'','','','',
+--'mod_addWMSgeneralFunctions.js',
+--'treeGDE,mapframe1',
+--'loadData',
+--'http://mapserver.krz.de/?Oberfl%E4che:Werkzeugleiste:WMS-Buttons');
+--* Ende Muster (Alt)
+
+--* Muster (NEU)
+--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',
+--'addWMSfromfilteredList_ajax',
+--2,1,
+--'add a WMS to the running application from a filtered list',
+--'Adding WMS from filtered list',
+--'img',
+--'../img/button_gray/add_filtered_list_off.png',
+--'onclick=''var addWmsFromFilteredListPopup = new mb_popup({title:"Add WMS from filtered list",url:"../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID",width:720, height:600,left:20, top:20});addWmsFromFilteredListPopup.show()''  onmouseover=''this.src = this.src.replace(/_off/,"_over");''  onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"',
+--490,10,24,24,1,
+--'','','','',
+--'mod_addWMSgeneralFunctions.js,popup.js',
+--'treeGDE,mapframe1',
+--'loadData',
+--'http://www.mapbender.org/index.php/Add_WMS_from_filtered_list');
+--* Ende Muster (NEU)
+
+-- Zerlegung NEU
+--key_gui_id	='gui'
+--e_id		='addWMSfromfilteredList_ajax'
+--e_pos		=2
+--e_public	=1
+--e_comment	='add a WMS to the running application from a filtered list'
+--e_title	='Adding WMS from filtered list'
+--e_element	='img'
+--e_src		='../img/button_gray/add_filtered_list_off.png'
+--e_attributes	='onclick=''var addWmsFromFilteredListPopup = new mb_popup({title:"Add WMS from filtered list",url:"../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID",width:720, height:600,left:20, top:20});addWmsFromFilteredListPopup.show()''  onmouseover=''this.src = this.src.replace(/_off/,"_over");''  onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"'
+--e_left	=490
+--e_top		=10
+--e_width	=24
+--e_height	=24
+--e_z_index	=1
+--e_more_styles	=''
+--e_content	=''
+--e_closetag	=''
+--e_js_file	=''
+--e_mb_mod	='mod_addWMSgeneralFunctions.js,popup.js'
+--e_target	='treeGDE,mapframe1'
+--e_requires	='loadData'
+--e_url		='http://www.mapbender.org/index.php/Add_WMS_from_filtered_list'
+
+-- Synthese aus alt/neu:
+-- Nur zu ändernde Teile in 'gui_element' überschreiben, andere Felder unberührt lassen
+UPDATE gui_element
+  SET  e_attributes ='onclick=''var addWmsFromFilteredListPopup = new mb_popup({title:"Add WMS from filtered list",url:"../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID",width:720, height:600,left:20, top:20});addWmsFromFilteredListPopup.show()''  onmouseover=''this.src = this.src.replace(/_off/,"_over");''  onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"',
+       e_mb_mod     ='mod_addWMSgeneralFunctions.js,popup.js'
+ WHERE e_id = 'addWMSfromfilteredList_ajax'
+   AND fkey_gui_id IN (SELECT DISTINCT fkey_gui_id FROM gui_gui_category
+                      WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)     );
+
+-- Alte Werte aus 'gui_element_vars' komplett löschen
+DELETE FROM gui_element_vars
+WHERE fkey_e_id = 'addWMSfromfilteredList_ajax'
+  AND fkey_gui_id IN (SELECT DISTINCT fkey_gui_id FROM gui_gui_category
+                     WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)     );
+
+--*Muster vars (neu)
+---1
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'addWMSfromfilteredList_ajax', 'cssfileAddWMS', '../css/addwms.css', '' ,'file/css');
+---2
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'addWMSfromfilteredList_ajax', 'capabilitiesInput', '1', 'load wms by capabilities url' ,'var');
+---3
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'addWMSfromfilteredList_ajax', 'option_dball', '1', '1 enables option "load all configured wms from db"' ,'var');
+---4
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'addWMSfromfilteredList_ajax', 'option_dbgroup', '1', '1 enables option "load configured wms by group"' ,'var');
+---5
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'addWMSfromfilteredList_ajax', 'option_dbgui', '1', '1 enables option "load configured wms by gui"' ,'var');
+--*Ende vars (neu)
+
+
+-- Einfügen der Element-Vars für 'addWMSfromfilteredList_ajax' für alle GUIs, die dieses Element besitzen,
+-- die aber noch nicht von den mitgelieferten Scripten aktualisiert wurden
+--1
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'addWMSfromfilteredList_ajax', 'cssfileAddWMS', '../css/addwms.css', '' ,'file/css'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)   -- GUI Kategorie
+   AND fkey_gui_id          in (
+     SELECT DISTINCT fkey_gui_id 
+       FROM gui_element
+      WHERE e_id ='addWMSfromfilteredList_ajax') -- Element vorhanden
+ ;
+
+--2
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'addWMSfromfilteredList_ajax', 'capabilitiesInput', '1', 'load wms by capabilities url' ,'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)   -- GUI Kategorie
+   AND fkey_gui_id          in (
+     SELECT DISTINCT fkey_gui_id 
+       FROM gui_element
+      WHERE e_id ='addWMSfromfilteredList_ajax') -- Element vorhanden
+ ;
+
+--3
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'addWMSfromfilteredList_ajax', 'option_dball', '1', '1 enables option "load all configured wms from db"' ,'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)   -- GUI Kategorie
+   AND fkey_gui_id          in (
+     SELECT DISTINCT fkey_gui_id 
+       FROM gui_element
+      WHERE e_id ='addWMSfromfilteredList_ajax') -- Element vorhanden
+ ;
+
+--4
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'addWMSfromfilteredList_ajax', 'option_dbgroup', '1', '1 enables option "load configured wms by group"' ,'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)   -- GUI Kategorie
+   AND fkey_gui_id          in (
+     SELECT DISTINCT fkey_gui_id 
+       FROM gui_element
+      WHERE e_id ='addWMSfromfilteredList_ajax') -- Element vorhanden
+ ;
+
+--5
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'addWMSfromfilteredList_ajax', 'option_dbgui', '1', '1 enables option "load configured wms by gui"' ,'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)   -- GUI Kategorie
+   AND fkey_gui_id          in (
+     SELECT DISTINCT fkey_gui_id 
+       FROM gui_element
+      WHERE e_id ='addWMSfromfilteredList_ajax') -- Element vorhanden
+ ;
+--#Ende module addWMSfromfilteredList_ajax
+
+
+--#popup in featureInfoTunnel
+-- --------------------------
+-- set standard element vars for possibility to use popup in featureInfoTunnel; activated for gui_digitize
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'featureInfoTunnel', 'featureInfoLayerPopup', 'false', '' ,'var');
+
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'featureInfoTunnel', 'featureInfoPopupHeight', '200', '' ,'var');
+
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'featureInfoTunnel', 'featureInfoPopupWidth', '270', '' ,'var');
+
+-- Nachsehen. Duplicate Keys
+--SELECT * 
+--  FROM gui_element_vars
+-- WHERE fkey_e_id = 'featureInfoTunnel'
+--   AND var_name IN ('featureInfoLayerPopup', 'featureInfoPopupHeight', 'featureInfoPopupWidth');
+
+
+
+DELETE 
+  FROM gui_element_vars
+ WHERE fkey_gui_id = 'lage_digitize'
+   AND fkey_e_id   = 'featureInfoTunnel'
+   AND var_name   IN ('featureInfoLayerPopup', 'featureInfoPopupHeight', 'featureInfoPopupWidth');
+
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'featureInfoTunnel', 'featureInfoLayerPopup', 'false', '' ,'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)   -- GUI Kategorie
+   AND fkey_gui_id          in (
+     SELECT DISTINCT fkey_gui_id 
+       FROM gui_element
+      WHERE e_id ='featureInfoTunnel') -- Element in GUI vorhanden 
+	  ;
+
+
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'featureInfoTunnel', 'featureInfoPopupHeight', '200', '' ,'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)   -- GUI Kategorie
+   AND fkey_gui_id          in (
+     SELECT DISTINCT fkey_gui_id 
+       FROM gui_element
+      WHERE e_id ='featureInfoTunnel') -- Element in GUI vorhanden
+ ;
+
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'featureInfoTunnel', 'featureInfoPopupWidth', '270', '' ,'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)   -- GUI Kategorie
+   AND fkey_gui_id          in (
+     SELECT DISTINCT fkey_gui_id 
+       FROM gui_element
+      WHERE e_id ='featureInfoTunnel') -- Element in GUI vorhanden
+ ;
+--#ENDE popup in featureInfoTunnel
+
+
+--#tooltip module
+-- --------------
+--*Muster-GUIs:
+-- tooltip module in gui2 + required gui elements wfs and wfs conf
+-- 1
+--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 ('gui2','tooltip',1,1,'Tooltip demo modul','','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','mod_tooltip.php','popup.js,geometry.js,wfsFilter.js','mapframe1','wfs,wfs_conf,featureInfoTunnel,popup','');
+-- 2
+--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('gui2','wfs',2,1,'wfs request and result handling','','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','wfs.php','../extensions/wz_jsgraphics.js,geometry.js','mapframe1,overview','','');
+-- 3
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui2', 'wfs', 'displayWfsResultList', '1', '' ,'var');
+-- 4
+--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('gui2','wfs_conf',2,1,'get all wfs_conf-params','','iframe','../php/mod_wfs.php','frameborder = "0"',1,1,1,1,NULL ,'visibility:hidden','','iframe','','','','','');
+
+
+
+-- von dort kann es in andere GUIUs manuell kopiert werden
+-- 1
+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) 
+SELECT fkey_gui_id, 'tooltip',1,1,'Tooltip demo modul','','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','mod_tooltip.php','popup.js,geometry.js,wfsFilter.js','mapframe1','wfs,wfs_conf,featureInfoTunnel,popup',''
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4)
+;
+-- 2
+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) 
+SELECT fkey_gui_id, 'wfs',2,1,'wfs request and result handling','','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','wfs.php','../extensions/wz_jsgraphics.js,geometry.js','mapframe1,overview','',''
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4)
+;
+-- 3
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'wfs', 'displayWfsResultList', '1', '' ,'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4) 
+;
+-- 4
+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) 
+SELECT fkey_gui_id, 'wfs_conf',2,1,'get all wfs_conf-params','','iframe','../php/mod_wfs.php','frameborder = "0"',1,1,1,1,NULL ,'visibility:hidden','','iframe','','','','',''
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4) 
+;
+
+-- element vars for tooltip
+--* Muster-GUIs
+--1
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES ('gui2', 'tooltip', 'tooltip_destinationFrame', '', '', 'var');
+--2
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES ('gui2', 'tooltip', 'tooltip_noResultArray', E'["Kein Ergebnis.","<body onload=\"javascript:window.close()\">"]', '', 'var');
+--3
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES ('gui2', 'tooltip', 'tooltip_styles', '.list_even{font-size:11px;color:red;}.list_uneven{font-size:11px;color:blue;}', '', 'var');
+--4
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES ('gui2', 'tooltip', 'tooltip_styles_detail', '.list_even{font-size:11px;color:green;}.list_uneven{font-size:11px;color:blue;}', '', 'var');
+--5
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES ('gui2', 'tooltip', 'tooltip_timeDelay', '1000', '', 'var');
+--6
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES ('gui2', 'tooltip', 'wfs_conf_filename', 'wfs_default.conf', '', 'php_var');
+--7
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES ('gui2', 'tooltip', 'tooltip_width', '270', '', 'var');
+--8
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES ('gui2', 'tooltip', 'tooltip_height', '200', '', 'var');
+
+
+--1
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'tooltip', 'tooltip_destinationFrame', '', '', 'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4);
+--2
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'tooltip', 'tooltip_noResultArray', E'["Kein Ergebnis.","<body onload=\'javascript:window.close()\'>"]', '', 'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4);
+--3
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'tooltip', 'tooltip_styles', '.list_even{font-size:11px;color:red;}.list_uneven{font-size:11px;color:blue;}', '', 'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4);
+--4
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'tooltip', 'tooltip_styles_detail', '.list_even{font-size:11px;color:green;}.list_uneven{font-size:11px;color:blue;}', '', 'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4);
+--5
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'tooltip', 'tooltip_timeDelay', '1000', '', 'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4);
+--6
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'tooltip', 'wfs_conf_filename', 'wfs_default.conf', '', 'php_var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4);
+--7
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'tooltip', 'tooltip_width', '350', '', 'var' -- Weite angepasst
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4);
+--8
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'tooltip', 'tooltip_height', '280', '', 'var' -- Hoehe angepasst
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4);
+
+-- new element vars for module tooltip to control whether user likes to have wfs getFeature request and/or whether user likes to have wms getfeatureInfo requests
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES ('gui2', 'tooltip', 'tooltip_disableWfs', '0', 'disable WFS getFeature Request', 'var');
+
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES ('gui2', 'tooltip', 'tooltip_disableWms', '1', 'disable WMS getFeatureInfo Request', 'var');
+
+-- Tool-Tipp: WMS Ja, WFS Nein
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'tooltip', 'tooltip_disableWfs', '1', 'disable WFS getFeature Request', 'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4);
+
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'tooltip', 'tooltip_disableWms', '0', 'disable WMS getFeatureInfo Request', 'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (4);
+
+-- auch auf andere GUIs anwenden?  _2  _3 ?
+--       Nein!
+-- weil ...
+--  Probleme mit dem ToolTipp:
+--  - Pfad vom Template zum .css passt nicht (relativ zum UMN-Home)
+--  - Umlaute falsch (Codes des Mapbender muss Code der Daten sein)
+
+-- ToDo:
+--  - Erst alle Datenbanken umstellen auf UTF8 (wie Mapbender)
+--  - in allen UMN-Templates die .css mit kompletten Pfaden verknüpfen.
+
+-- Das Templates würde man für ToolTip anders aufbauen als für einen neuen Rahmen.
+
+--#ENDE tooltip module
+
+
+--#treeGDE-css statement
+-- ---------------------
+--remove treeGDE-css statement from 'treeGDE' because its handled in 'body' element 
+--DELETE  from gui_element_vars 
+--WHERE fkey_gui_id IN ('gui','gui2','gui1','gui_digitize')    -- mitgelieferte
+--  AND fkey_e_id = 'treeGDE' 
+--  AND var_name  ='cssfile';
+
+-- Betroffen sind ...  134 GUIs
+--SELECT * 
+--FROM  gui_element_vars 
+--WHERE fkey_e_id = 'treeGDE' 
+--  AND var_name  ='cssfile';
+
+
+DELETE 
+FROM  gui_element_vars 
+WHERE fkey_e_id = 'treeGDE' 
+  AND var_name  ='cssfile';
+
+--#ENDE treeGDE-css statement
+
+
+--#new language fr, es pt
+
+UPDATE gui_element_vars 
+   SET var_value = 'de,en,bg,gr,nl,hu,it,fr,es,pt' 
+ WHERE fkey_e_id = 'switchLocale_noreload';
+
+--#ENDE new language 
+
+
+--#switchWMS
+-- ---------
+-- insert statement for switchWMS in template Guis was missing.
+-- http://trac.osgeo.org/mapbender/ticket/472
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'treeGDE', 'switchwms', 'true', 'enables/disables all layer of a wms' ,'var');
+
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+SELECT fkey_gui_id, 'treeGDE', 'switchwms', 'true', 'enables/disables all layer of a wms' ,'var'
+  FROM gui_gui_category
+ WHERE fkey_gui_category_id in (3, 4, 5, 6, 7)   -- GUI Kategorie
+   AND fkey_gui_id          in (
+     SELECT DISTINCT fkey_gui_id 
+       FROM gui_element
+      WHERE e_id ='treeGDE') -- Element in GUI vorhanden
+
+
+-- http://www.mapbender.org/Switchwms#DE
+
+--#ENDE switchWMS
+
+
+
+--#Favicon
+-- -------
+-- enable favicon per gui using element_var
+-- http://trac.osgeo.org/mapbender/ticket/514
+--INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) 
+--VALUES('gui', 'body', 'favicon', '../img/favicon.png', 'favicon' ,'php_var');
+
+--#ENDE Favicon
+
+
+
+--#printPDF Focus
+-- Button - kommt das vor?
+--SELECT *
+--  FROM gui_element
+-- WHERE e_id = 'printPDF'
+-- --AND e_element = 'img';
+
+UPDATE gui_element 
+   SET e_attributes = 'onclick=\'printWindow = window.open("../print/mod_printPDF.php?target=mapframe1&sessionID&conf=printPDF_b.conf","printWin","width=260, height=380, resizable=yes ");printWindow.focus();\'  onmouseover=\'this.src = this.src.replace(/_off/,"_over");\'  onmouseout=\'this.src = this.src.replace(/_over/, "_off");\'' 
+ WHERE fkey_gui_id  = 'gui1' 
+   AND e_id         = 'printPDF' 
+   AND e_element    = 'img' ;
+--#ENDE Focus
+



More information about the Mapbender_commits mailing list