[Mapbender-commits] r2266 - in branches/nimix_dev/http: javascripts
php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Mar 18 10:13:46 EDT 2008
Author: nimix
Date: 2008-03-18 10:13:46 -0400 (Tue, 18 Mar 2008)
New Revision: 2266
Modified:
branches/nimix_dev/http/javascripts/mod_horizTab.php
branches/nimix_dev/http/javascripts/mod_wfs_client.html
branches/nimix_dev/http/javascripts/mod_wfs_gazetteer_client.php
branches/nimix_dev/http/php/mod_editGuiWms.php
branches/nimix_dev/http/php/mod_loadCapabilitiesList.php
branches/nimix_dev/http/php/mod_owsproxy_conf.php
Log:
various bugfixes eg. http://trac.osgeo.org/mapbender/ticket/197
Modified: branches/nimix_dev/http/javascripts/mod_horizTab.php
===================================================================
--- branches/nimix_dev/http/javascripts/mod_horizTab.php 2008-03-18 11:11:50 UTC (rev 2265)
+++ branches/nimix_dev/http/javascripts/mod_horizTab.php 2008-03-18 14:13:46 UTC (rev 2266)
@@ -18,8 +18,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/********** Configuration*************************************************/
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
$tab_ids = array();
include(dirname(__FILE__)."/../include/dyn_php.php");
Modified: branches/nimix_dev/http/javascripts/mod_wfs_client.html
===================================================================
--- branches/nimix_dev/http/javascripts/mod_wfs_client.html 2008-03-18 11:11:50 UTC (rev 2265)
+++ branches/nimix_dev/http/javascripts/mod_wfs_client.html 2008-03-18 14:13:46 UTC (rev 2266)
@@ -46,6 +46,12 @@
var vupdateWfs = {};
/*
+ * deleteWfs_['action']: instructs the servercomponent
+ * deleteWfs_['wfs']: id of wfs to update
+ */
+var deleteWfs_ = {};
+
+/*
* geturl['action']: instructs the servercomponent
* geturl['wfs']: id of wfs to get the url for
* geturl['column']: column of the url to get in table wfs
@@ -143,11 +149,11 @@
}
function deleteWfs(){
- deleteWfs['action'] = 'deleteWfs';
- deleteWfs['wfs'] = getSelectedWfs();
- if(deleteWfs['wfs']&&deleteWfs['wfs']!="gui_confs"){
- if(confirm("Do you really want to delete the Wfs with Wfs-id:"+deleteWfs['wfs']+"?")){
- getData(deleteWfs);
+ deleteWfs_['action'] = 'deleteWfs';
+ deleteWfs_['wfs'] = getSelectedWfs();
+ if(deleteWfs_['wfs']&&deleteWfs_['wfs']!="gui_confs"){
+ if(confirm("Do you really want to delete the Wfs with Wfs-id:"+deleteWfs_['wfs']+"?")){
+ getData(deleteWfs_);
}
return true;
}
@@ -221,8 +227,10 @@
break;
case "deleteWfs":
if(dsJson['success']){
+ clearList(document.forms[0].wfsList);
+ clearList(document.forms[0].guiList);
getWfsList();
- getGuis();
+ getGuis();
alert("WFS deleted.");
}
break;
@@ -281,7 +289,9 @@
wfsConf['wfsConf'] = {};
wfsConf['wfsConf'] = dsJson.wfsConf;
var o = wfsConf['wfsConf'];
- document.forms[0].wfsConfList.innerHTML = '';
+ document.forms[0].wfsConfList.innerHTML = '';
+ if(typeof(o.id)=="undefined")
+ return;
for(var i=0; i<o.id.length; i++){
appendOption(document.forms[0].wfsConfList, o.abstract[i], o.id[i], false);
}
@@ -306,7 +316,11 @@
function appendOption(boxObject, optionText, optionValue, selected){
var newOption = new Option(optionText,optionValue,false,selected);
boxObject.options[boxObject.length] = newOption;
-}
+}
+function clearList(boxObject){
+ boxObject.length = 0;
+}
+
/*
* returns id and abstract from a wfs configuration
*/
Modified: branches/nimix_dev/http/javascripts/mod_wfs_gazetteer_client.php
===================================================================
--- branches/nimix_dev/http/javascripts/mod_wfs_gazetteer_client.php 2008-03-18 11:11:50 UTC (rev 2265)
+++ branches/nimix_dev/http/javascripts/mod_wfs_gazetteer_client.php 2008-03-18 14:13:46 UTC (rev 2266)
@@ -456,6 +456,7 @@
parent.zoom(targetArray[0], 'true', 1.0);
global_resultHighlight.add(currentGeom, cw_fillcolor);
}
+ global_resultHighlight.paint();
return true;
}
</script>
Modified: branches/nimix_dev/http/php/mod_editGuiWms.php
===================================================================
--- branches/nimix_dev/http/php/mod_editGuiWms.php 2008-03-18 11:11:50 UTC (rev 2265)
+++ branches/nimix_dev/http/php/mod_editGuiWms.php 2008-03-18 14:13:46 UTC (rev 2266)
@@ -138,6 +138,15 @@
}
}
}
+function showSld(origUrl){
+ var url = document.getElementById("this_gui_wms_sldurl").value;
+ if(url==""){
+ if(origUrl=="")
+ return;
+ url=origUrl;
+ }
+ window.open(url);
+}
</script>
</head>
@@ -587,10 +596,10 @@
if($wms_supportsld[0]) {
echo "<tr>";
echo "<td>SLD-URL: </td><td>";
- echo "<input type='text' class='myText' name='this_gui_wms_sldurl' title='".$gui_wms_sldurl[0]."' value='".$gui_wms_sldurl[0]."'>";
+ echo "<input type='text' class='myText' name='this_gui_wms_sldurl' id='this_gui_wms_sldurl' title='".$gui_wms_sldurl[0]."' value='".$gui_wms_sldurl[0]."'>";
#echo "<a href='' onclick='return window.open(\"editor-start.php\");'><img src='sld_editor.png' border=0></a>";
#$layer_names = implode(",", $layer_name);
- echo " <a href='".$gui_wms_sldurl[0]."' target='_new'>SLD laden/anzeigen</a>";
+ echo " <a href='javascript:showSld(\"".$gui_wms_sldurl[0]."\");'>SLD laden/anzeigen</a>";
echo "</td>";
echo "</tr>";
} else {
Modified: branches/nimix_dev/http/php/mod_loadCapabilitiesList.php
===================================================================
--- branches/nimix_dev/http/php/mod_loadCapabilitiesList.php 2008-03-18 11:11:50 UTC (rev 2265)
+++ branches/nimix_dev/http/php/mod_loadCapabilitiesList.php 2008-03-18 14:13:46 UTC (rev 2266)
@@ -140,11 +140,11 @@
$cnt = 0;
while($row = db_fetch_array($res)){
$sql_ins = "INSERT INTO gui_wms (fkey_gui_id,fkey_wms_id,gui_wms_position,gui_wms_mapformat,";
- $sql_ins .= "gui_wms_featureinfoformat,gui_wms_exceptionformat,gui_wms_epsg,gui_wms_visible) ";
- $sql_ins .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8)";
+ $sql_ins .= "gui_wms_featureinfoformat,gui_wms_exceptionformat,gui_wms_epsg,gui_wms_visible,gui_wms_opacity,gui_wms_sldurl) ";
+ $sql_ins .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10)";
$v = array($guiList,$wmsID,$gui_wms_position,$row["gui_wms_mapformat"],$row["gui_wms_featureinfoformat"],
- $row["gui_wms_exceptionformat"],$row["gui_wms_epsg"],$row["gui_wms_visible"]);
- $t = array('s','i','i','s','s','s','s','i');
+ $row["gui_wms_exceptionformat"],$row["gui_wms_epsg"],$row["gui_wms_visible"],$row["gui_wms_opacity"],$row["gui_wms_sldurl"]);
+ $t = array('s','i','i','s','s','s','s','i','i','s');
db_prep_query($sql_ins,$v,$t);
$cnt++;
}
@@ -156,12 +156,12 @@
$cnt = 0;
while($row = db_fetch_array($res)){
$sql_ins = "INSERT INTO gui_layer (fkey_gui_id,fkey_layer_id,gui_layer_wms_id,gui_layer_status,gui_layer_selectable,";
- $sql_ins .= "gui_layer_visible,gui_layer_queryable,gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale,gui_layer_priority) ";
- $sql_ins .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11)";
+ $sql_ins .= "gui_layer_visible,gui_layer_queryable,gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale,gui_layer_priority,gui_layer_style,gui_layer_wfs_featuretype) ";
+ $sql_ins .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13)";
$v = array($guiList,$row["fkey_layer_id"],$wmsID,$row["gui_layer_status"],$row["gui_layer_selectable"],
$row["gui_layer_visible"],$row["gui_layer_queryable"],$row["gui_layer_querylayer"],$row["gui_layer_minscale"],
- $row["gui_layer_maxscale"],$row["gui_layer_priority"]);
- $t = array('s','i','i','i','i','i','i','i','i','i','i');
+ $row["gui_layer_maxscale"],$row["gui_layer_priority"],$row["gui_layer_style"],$row["gui_layer_wfs_featuretype"]);
+ $t = array('s','i','i','i','i','i','i','i','i','i','i','s','s');
db_prep_query($sql_ins,$v,$t);
$cnt++;
}
Modified: branches/nimix_dev/http/php/mod_owsproxy_conf.php
===================================================================
--- branches/nimix_dev/http/php/mod_owsproxy_conf.php 2008-03-18 11:11:50 UTC (rev 2265)
+++ branches/nimix_dev/http/php/mod_owsproxy_conf.php 2008-03-18 14:13:46 UTC (rev 2266)
@@ -39,7 +39,7 @@
</style>
<script language="JavaScript" type="text/javascript">
function set(wms_id, status){
- document.location.href = "mod_owsproxy_conf.php?wms_id="+wms_id+"&status="+status+"&<?php echo SID; ?>";
+ document.location.href = "mod_owsproxy_conf.php?<?php echo $urlParameters;?>&wms_id="+wms_id+"&status="+status+"&<?php echo SID; ?>";
}
</script>
More information about the Mapbender_commits
mailing list