Merge branch 'master' of github.com:systemed/potlatch2
[potlatch2.git] / net / systemeD / potlatch2 / RelationEditorPanel.mxml
1 <?xml version="1.0" encoding="utf-8"?>
2 <s:TitleWindow
3         xmlns:fx="http://ns.adobe.com/mxml/2009"
4         xmlns:mx="library://ns.adobe.com/flex/mx"
5         xmlns:potlatch2="net.systemeD.potlatch2.*"
6     xmlns:s="library://ns.adobe.com/flex/spark"
7         skinClass="net.systemeD.controls.ResizableDraggableTitleWindowSkin"
8         title="Edit Relation" width="350" height="420" close="closePanel(event)" >
9         
10         <potlatch2:TagViewer width="100%" height="100%" id="tagViewer"
11             creationComplete="checkRelation()"/>
12         
13         <fx:Script><![CDATA[
14                 import net.systemeD.halcyon.*;
15                 import net.systemeD.halcyon.connection.*;
16                 import net.systemeD.potlatch2.*;
17                 import mx.managers.PopUpManager;
18                 import mx.events.CloseEvent;
19
20         private var _relation:Relation;
21         
22                 private function closePanel(evt:CloseEvent):void {
23                         PopUpManager.removePopUp(this);
24                 }
25
26                 public function setRelation(relation:Relation):void {
27             _relation = relation;
28 //            if ( tagViewer != null )
29 //                tagViewer.setEntity(_relation);
30                 }
31
32         public function checkRelation():void {
33             if ( _relation != null )
34                 tagViewer.setEntity([_relation]);
35         }
36     ]]></fx:Script>
37 </s:TitleWindow>