delete icon for tags
authorRichard Fairhurst <richard@systemed.net>
Mon, 1 Nov 2010 17:47:12 +0000 (17:47 +0000)
committerRichard Fairhurst <richard@systemed.net>
Mon, 1 Nov 2010 17:47:12 +0000 (17:47 +0000)
net/systemeD/potlatch2/TagViewer.mxml

index 1e2f72e..e9df58d 100644 (file)
           <mx:htmlText><![CDATA[<i>No Selection</i>]]></mx:htmlText>
         </mx:Label>
 
+               <!-- ** FIXME:
+               
+                        This needs finishing and refactoring to:
+                        a) be a nice custom control which can be dropped in anywhere
+                        b) do autocomplete on values as well as keys
+                        c) do autocomplete on keys _properly_
+                        d) have proper lovely callback methods and events and stuff, rather than horrible parent.parent.parent.parent.badger.badger.badger hacks
+                        e) replace the big (X) with a little one
+                        f) be styled attractively
+                        g) generally suck less
+                       
+               -->
+
         <mx:DataGrid editable="true" width="100%" height="75%" id="advancedTagGrid" 
             doubleClickEnabled="true"
             doubleClick="if (event.target.parent==advancedTagGrid) { addNewTag(); }">
                                                </mx:itemEditor>
                                        </mx:DataGridColumn>
                     <mx:DataGridColumn editable="true" dataField="value" headerText="Value" />
+                                       <mx:DataGridColumn width="20" editable="false">
+                                               <mx:itemRenderer>
+                                                       <mx:Component>
+                                                               <mx:Image source="@Embed('../../../embedded/delete.svg')" 
+                                                                       click='event.stopPropagation();TagViewer(this.parent.parent.parent.parent.parent.parent.parent).removeTag();'
+                                                               buttonMode="true" useHandCursor="true" />
+                                                       </mx:Component>
+                                               </mx:itemRenderer>
+                                       </mx:DataGridColumn>
                 </mx:columns>
         </mx:DataGrid>