[Mapbender-commits] r9166 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Mar 10 07:10:40 PDT 2015
Author: syed
Date: 2015-03-10 07:10:40 -0700 (Tue, 10 Mar 2015)
New Revision: 9166
Modified:
trunk/mapbender/http/plugins/mb_digitize_widget.php
Log:
add labels for different classes of feature attributes
Modified: trunk/mapbender/http/plugins/mb_digitize_widget.php
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_widget.php 2015-03-10 12:57:47 UTC (rev 9165)
+++ trunk/mapbender/http/plugins/mb_digitize_widget.php 2015-03-10 14:10:40 UTC (rev 9166)
@@ -655,19 +655,31 @@
attributesDialog.dialog('open');
attributesDialog.find('*').unbind();
var rows = '';
+ var nonEditableRows = '<tr><th>Fix-Data</th></tr>';
+ var editableRows = '<tr><th>Editable-Data</th></tr>';
+ var customRows = '<tr><th>Editable-Data</th></tr>';
+ // var divider = "<tr><th>divider</th></tr>";
$.each(feature.properties, function(k, v) {
- if(k.match(/Mapbender:/)) return;
- if (k == "Fläche [m²]" || k == "Länge [m]") {
+ if(k.match(/Mapbender:/)) return; // was soll hiermiet passieren?
+ if (k == "Fläche [m²]" || k == "Länge [m]" || k == "uuid" || k == "created" || k == "updated") {
- rows += '<tr><td>' + k + '</td><td><input disabled type="text" name="' + k + '" value="' + v + '"></input></td></tr>';
+ nonEditableRows += '<tr><td>' + k + '</td><td><input disabled type="text" name="' + k + '" value="' + v + '"></input></td></tr>';
- }else {
+ }else if(k == "title" || k == "name" || k == "description"){
- rows += '<tr><td>' + k + '</td><td><input type="text" name="' + k + '" value="' + v + '"></input></td></tr>';
+ editableRows += '<tr><td>' + k + '</td><td><input type="text" name="' + k + '" value="' + v + '"></input></td></tr>';
+ }else{
+
+ customRows += '<tr><td>' + k + '</td><td><input type="text" name="' + k + '" value="' + v + '"></input></td></tr>';
+
}
});
- attributesDialog.find('table').html(rows);
+
+ attributesDialog.find('table').html("'"+editableRows+"'"+nonEditableRows+"'"+customRows);
+ // attributesDialog.find('table').append(editableRows);
+ // attributesDialog.find('table').append(nonEditableRows);
+ // $(divider).after(rows);
attributesDialog.find('.digitize-add').bind('click', function() {
var newRow = $('<tr><td><input type="text"></input></td><td><input type="text"></input></td></tr>');
attributesDialog.find('table').append(newRow);
More information about the Mapbender_commits
mailing list