[Mapbender-commits] r8868 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu May 15 05:00:44 PDT 2014


Author: hwbllmnn
Date: 2014-05-15 05:00:44 -0700 (Thu, 15 May 2014)
New Revision: 8868

Modified:
   trunk/mapbender/http/plugins/mb_digitize_widget.php
Log:
added style preview to attributes dialog, fixed some event unbinding bugs


Modified: trunk/mapbender/http/plugins/mb_digitize_widget.php
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_widget.php	2014-05-15 11:36:09 UTC (rev 8867)
+++ trunk/mapbender/http/plugins/mb_digitize_widget.php	2014-05-15 12:00:44 UTC (rev 8868)
@@ -97,7 +97,7 @@
 
     var editAttributesHtml = '<div title="Feature attributes">' +
         '<div class="digitize-image digitize-style"></div>' +
-        '<div class="digitize-image digitize-polygon"></div><br></br>' +
+        '<div class="digitize-preview"></div><br></br>' +
         '<table><tr><td>Name</td><td><input type="text" name="name" value="Titel"></input></td></tr>' +
         '<tr><td>Description</td><td><input type="text" name="description" value="Beschreibung CDATA"></input></td></tr>' +
         '</table><br></br>' +
@@ -243,6 +243,7 @@
     var editAttributes = function(feature, kml, url) {
         return function() {
             attributesDialog.dialog('open');
+            attributesDialog.find('*').unbind();
             var rows = '';
             $.each(feature.properties, function(k, v) {
                 if(k.match(/Mapbender:/)) return;
@@ -268,12 +269,14 @@
                 editDialog.dialog('close');
                 kml.refresh(url);
             });
+            var preview = attributesDialog.find('.digitize-preview').html('').get(0);
+            kml.renderPreview(feature, preview);
         };
     };
 
     var editObject = function($link, menu) {
         return function() {
-            editDialog.find().unbind();
+            editDialog.find('*').unbind();
             $link.addClass('kmltree-selected').siblings().removeClass('kmltree-selected');
             var idx = $link.attr('idx');
             var kml = $('#mapframe1').data('kml');



More information about the Mapbender_commits mailing list