From 9d9fa2e15ac71cdce1b3d4ba1fd69d213773d808 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Sun, 14 Feb 2010 16:48:47 +0000 Subject: [PATCH] New Relation button --- TODO.txt | 2 +- net/systemeD/potlatch2/RelationSelectPanel.mxml | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/TODO.txt b/TODO.txt index a66ff103..fd4c9854 100644 --- a/TODO.txt +++ b/TODO.txt @@ -33,8 +33,8 @@ Potlatch 2: main outstanding issues * UI for geometry operations * Keyboard shortcuts * CSS editing -* "New relations" panel * Direct click-to-edit of relation role should actually work +* Relation member changes should update TagViewer automatically == Tagging == diff --git a/net/systemeD/potlatch2/RelationSelectPanel.mxml b/net/systemeD/potlatch2/RelationSelectPanel.mxml index 5b2a8bd8..136fa9e8 100644 --- a/net/systemeD/potlatch2/RelationSelectPanel.mxml +++ b/net/systemeD/potlatch2/RelationSelectPanel.mxml @@ -42,12 +42,23 @@ relation.appendMember(new RelationMember(entity, '')); PopUpManager.removePopUp(this); } + + public function closeAndNewRelation():void { + var relation:Relation = conn.createRelation({}, [new RelationMember(entity, '')]) + PopUpManager.removePopUp(this); + trace("edit relation "+id); + var panel:RelationEditorPanel = RelationEditorPanel( + PopUpManager.createPopUp(Application(Application.application), RelationEditorPanel, true)); + panel.setRelation(relation); + PopUpManager.centerPopUp(panel); + } + ]]> - + -- 2.36.1