[Mapbender-commits] r6150 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon May 10 09:25:41 EDT 2010
Author: christoph
Date: 2010-05-10 09:25:39 -0400 (Mon, 10 May 2010)
New Revision: 6150
Modified:
trunk/mapbender/http/plugins/mb_metadata_edit.js
trunk/mapbender/http/plugins/mb_metadata_edit.php
trunk/mapbender/http/plugins/mb_metadata_layer.js
trunk/mapbender/http/plugins/mb_metadata_server.php
Log:
Modified: trunk/mapbender/http/plugins/mb_metadata_edit.js
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_edit.js 2010-05-10 12:32:29 UTC (rev 6149)
+++ trunk/mapbender/http/plugins/mb_metadata_edit.js 2010-05-10 13:25:39 UTC (rev 6150)
@@ -35,7 +35,9 @@
this.serialize = function (callback) {
var data = $metadataForm.easyform("serialize");
if ($.isFunction(callback)) {
- callback(data);
+ callback({
+ wms: data
+ });
}
return data;
};
Modified: trunk/mapbender/http/plugins/mb_metadata_edit.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_edit.php 2010-05-10 12:32:29 UTC (rev 6149)
+++ trunk/mapbender/http/plugins/mb_metadata_edit.php 2010-05-10 13:25:39 UTC (rev 6150)
@@ -34,9 +34,24 @@
<input name="accessconstraints" id="accessconstraints"/>
<img class="metadata_img" src="../img/misc/inspire_eu_klein.png"></img>
</p>
+<?php
+ $sql = "SELECT termsofuse_id, name FROM termsofuse";
+ $res = db_query($sql);
+ $termsofuse = array();
+ while ($row = db_fetch_assoc($res)) {
+ $termsofuse[$row["termsofuse_id"]] = $row["name"];
+ }
+?>
<p>
- <label for="">WMS Predefined Licence (Registry):</label>
- <input name="" id""/>
+ <label for="wms_termsofuse">WMS Predefined Licence (Registry):</label>
+ <select name="wms_termsofuse" id="wms_termsofuse">
+ <option>...</option>
+<?php
+ foreach ($termsofuse as $key => $value) {
+ echo "<option value='" . $key . "'>" . htmlentities($value, ENT_QUOTES, CHARSET) . "</option>";
+ }
+?>
+ </select>
<img class="metadata_img" src="../img/questionmark.png"></img>
</p>
<p>
@@ -90,12 +105,12 @@
</p>
<p>
<label for="wms_timestamp_create">Date of first registration (Registry):</label>
- <input name="wms_timestamp_create" id="wms_timestamp_create"/>
+ <input disabled="disabled" name="wms_timestamp_create" id="wms_timestamp_create"/>
<img class="metadata_img" src="../img/misc/inspire_eu_klein.png"></img>
</p>
<p>
<label for="wms_timestamp">Date of last revision (Registry):</label>
- <td><input name="wms_timestamp" id="wms_timestamp"/>
+ <td><input disabled="disabled" name="wms_timestamp" id="wms_timestamp"/>
<img class="metadata_img" src="../img/misc/inspire_eu_klein.png"></img>
</p>
</fieldset>
Modified: trunk/mapbender/http/plugins/mb_metadata_layer.js
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_layer.js 2010-05-10 12:32:29 UTC (rev 6149)
+++ trunk/mapbender/http/plugins/mb_metadata_layer.js 2010-05-10 13:25:39 UTC (rev 6150)
@@ -35,7 +35,9 @@
this.serialize = function (callback) {
var data = $metadataForm.easyform("serialize");
if ($.isFunction(callback)) {
- callback(data);
+ callback({
+ layer: data
+ });
}
return data;
};
Modified: trunk/mapbender/http/plugins/mb_metadata_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_server.php 2010-05-10 12:32:29 UTC (rev 6149)
+++ trunk/mapbender/http/plugins/mb_metadata_server.php 2010-05-10 13:25:39 UTC (rev 6150)
@@ -121,6 +121,20 @@
$resultObj["wms_keywords"] = implode(", ", $keywords);
+ $termsofuseSql = <<<SQL
+SELECT fkey_termsofuse_id FROM wms_termsofuse WHERE fkey_wms_id = $wmsId
+SQL;
+
+ $termsofuseRes = db_query($termsofuseSql);
+ if ($termsofuseRes) {
+ $termsofuseRow = db_fetch_assoc($termsofuseRes);
+ $resultObj["wms_termsofuse"] = $termsofuseRow["fkey_termsofuse_id"];
+ }
+ else {
+ $resultObj["wms_termsofuse"] = null;
+ }
+
+
$ajaxResponse->setResult($resultObj);
$ajaxResponse->setSuccess(true);
More information about the Mapbender_commits
mailing list