Sparkify relation editor panel
authorRichard Fairhurst <richard@systemeD.net>
Fri, 24 Mar 2017 15:03:59 +0000 (15:03 +0000)
committerRichard Fairhurst <richard@systemeD.net>
Fri, 24 Mar 2017 15:03:59 +0000 (15:03 +0000)
net/systemeD/potlatch2/RelationEditorPanel.mxml

index 1fd6b53..df9aa86 100644 (file)
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<mx:TitleWindow
+<s:TitleWindow
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:potlatch2="net.systemeD.potlatch2.*"
-       title="Edit Relation" width="350" height="400"
-       showCloseButton="true" close="PopUpManager.removePopUp(this);">
+    xmlns:s="library://ns.adobe.com/flex/spark"
+       title="Edit Relation" width="350" height="420" close="closePanel(event)" >
        
        <potlatch2:TagViewer width="100%" height="100%" id="tagViewer"
            creationComplete="checkRelation()"/>
                import net.systemeD.halcyon.connection.*;
                import net.systemeD.potlatch2.*;
                import mx.managers.PopUpManager;
+               import mx.events.CloseEvent;
 
         private var _relation:Relation;
         
+               private function closePanel(evt:CloseEvent):void {
+                       PopUpManager.removePopUp(this);
+               }
+
                public function setRelation(relation:Relation):void {
             _relation = relation;
 //            if ( tagViewer != null )
@@ -28,5 +33,4 @@
                 tagViewer.setEntity([_relation]);
         }
     ]]></fx:Script>
-</mx:TitleWindow>
-
+</s:TitleWindow>