double-click to add new tag
[potlatch2.git] / net / systemeD / potlatch2 / TagViewer.mxml
index 1f3e3ef..213c0d1 100644 (file)
@@ -61,7 +61,9 @@
           <mx:htmlText><![CDATA[<i>No Selection</i>]]></mx:htmlText>
         </mx:Label>
 
-        <mx:DataGrid editable="true" width="100%" height="75%" id="advancedTagGrid">
+        <mx:DataGrid editable="true" width="100%" height="75%" id="advancedTagGrid" 
+            doubleClickEnabled="true"
+            doubleClick="if (event.target.parent==advancedTagGrid) { addNewTag(); }">
                 <mx:columns>
                     <mx:DataGridColumn editable="true" dataField="key" headerText="Key"/>
                     <mx:DataGridColumn editable="true" dataField="value" headerText="Value"/>
@@ -75,7 +77,8 @@
         
         <mx:DataGrid editable="true" width="100%" height="25%" id="relationsGrid"
             doubleClickEnabled="true"
-            itemDoubleClick="editRelation(relationsGrid.selectedItem.id)">
+            itemDoubleClick="editRelation(relationsGrid.selectedItem.id)"
+            doubleClick="if (event.target.parent==relationsGrid) { addToRelation(); }">
             <mx:columns>
                 <mx:DataGridColumn editable="false" dataField="description" headerText="Relation"/>
                 <mx:DataGridColumn editable="false" dataField="id_idx" headerText="ID"/>