First stab at merge button, albeit the visibility stuff doesn't work
[potlatch2.git] / net / systemeD / potlatch2 / panels / BackgroundMergePanel.mxml
index ca397504347e19b42ec39737c0ed32846202bd0b..c19cc8ddf974ae3e2facfb14ed11029aa544a958 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