[Mapbender-commits] r6063 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon May 3 10:20:18 EDT 2010
Author: christoph
Date: 2010-05-03 10:20:18 -0400 (Mon, 03 May 2010)
New Revision: 6063
Modified:
trunk/mapbender/http/plugins/mb_metadata_layer.html
trunk/mapbender/http/plugins/mb_metadata_layer.js
Log:
categories
Modified: trunk/mapbender/http/plugins/mb_metadata_layer.html
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_layer.html 2010-05-03 14:19:42 UTC (rev 6062)
+++ trunk/mapbender/http/plugins/mb_metadata_layer.html 2010-05-03 14:20:18 UTC (rev 6063)
@@ -38,9 +38,6 @@
<img src="../img/questionmark.png"></img>
<img src="../img/misc/inspire_eu_klein.png"></img>
<select class="metadata_selectbox" id="layer_metadataurl" name="layer_metadataurl" size="2" multiple>
- <option>test</option>
- <option>test</option>
- <option>test</option>
</select>
<img src="../img/book.png"></img>
</p>
@@ -60,27 +57,18 @@
<label for="md_topic_category_code_de">ISO Topic Category:</label>
<img src="../img/misc/inspire_eu_klein.png"></img>
<select class="metadata_selectbox" id="md_topic_category_code_de" name="md_topic_category_code_de" size="2" multiple>
- <option>test</option>
- <option>test</option>
- <option>test</option>
</select>
</p>
<p>
<label for="fkey_inspire_category_id">INSPIRE Category:</label>
<img src="../img/misc/inspire_eu_klein.png"></img>
<select class="metadata_selectbox" id="fkey_inspire_category_id" name="fkey_inspire_category_id" size="2" multiple>
- <option>test</option>
- <option>test</option>
- <option>test</option>
</select>
</p>
<p>
<label for="fkey_custom_category_id">Custom Category:</label>
<em></em>
<select class="metadata_selectbox" id="fkey_custom_category_id" name="fkey_custom_category_id" size="2" multiple>
- <option>test</option>
- <option>test</option>
- <option>test</option>
</select>
</p>
</fieldset>
Modified: trunk/mapbender/http/plugins/mb_metadata_layer.js
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_layer.js 2010-05-03 14:19:42 UTC (rev 6062)
+++ trunk/mapbender/http/plugins/mb_metadata_layer.js 2010-05-03 14:20:18 UTC (rev 6063)
@@ -36,14 +36,20 @@
initialized: new Mapbender.Event()
};
- var initialized = function (obj, result, message) {
+ var initialized = function (obj) {
+ console.log(obj);
+ for (var id in obj.categories) {
+ var cat = obj.categories[id];
+ var $select = $metadataForm.find("#" + id);
+ for (var j = 0; j < cat.length; j++) {
+ $select.append("<option value='" + cat[j][0] + "'>" + cat[j][1] + "</option>");
+ }
+ }
+
that.events.initialized.trigger({
- wmsId: obj
+ wmsId: obj.wmsId
});
that.events.initialized.done = true;
- if (!result) {
- return;
- }
};
this.init = function (obj) {
@@ -57,7 +63,14 @@
parameters: {
"id": obj
},
- callback: initialized
+ callback: function(o, r, m) {
+ if (!r) {
+ return;
+ }
+ initialized($.extend({
+ wmsId: obj
+ }, o));
+ }
});
req.send();
More information about the Mapbender_commits
mailing list