First stab at merge button, albeit the visibility stuff doesn't work
authorAndy Allan <andy@gravitystorm.co.uk>
Mon, 4 Jul 2011 10:36:07 +0000 (11:36 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Mon, 4 Jul 2011 10:36:07 +0000 (11:36 +0100)
net/systemeD/potlatch2/panels/BackgroundMergePanel.mxml

index ca39750..c19cc8d 100644 (file)
     <mx:columns>
       <mx:DataGridColumn editable="false" dataField="k" headerText="key" />
       <mx:DataGridColumn editable="false" dataField="e" headerText="OSM value" />
+      <mx:DataGridColumn editable="false" headerText="Merge">
+        <mx:itemRenderer>
+          <mx:Component>
+            <mx:Button label="++" visible="{data.b == null}" click="trace('b is '+data.b);parentDocument.mergeForKey(data.k);" />
+          </mx:Component>
+        </mx:itemRenderer>
+      </mx:DataGridColumn>
       <mx:DataGridColumn editable="false" dataField="b" headerText="Background value" />
     </mx:columns>
   </mx:DataGrid>
               tagDataProvider.addItem({k:key, e:editableEntity.getTag(key), b:backgroundEntity.getTag(key)});
           }
       }
+
+      public function mergeForKey(key:String):void {
+          trace("merge for " + key);
+      }
   ]]>
   </mx:Script>
 </mx:VBox>
\ No newline at end of file