From: Andy Allan Date: Sat, 26 Nov 2011 18:13:15 +0000 (+0000) Subject: Start moving editors over to use a spark Form and FormLayout X-Git-Url: https://git.openstreetmap.org/potlatch2.git/commitdiff_plain/3ae87e492b85cd12fc049c32948803287081cf40 Start moving editors over to use a spark Form and FormLayout --- diff --git a/net/systemeD/potlatch2/TagViewer.mxml b/net/systemeD/potlatch2/TagViewer.mxml index 3dd633e7..816242ec 100644 --- a/net/systemeD/potlatch2/TagViewer.mxml +++ b/net/systemeD/potlatch2/TagViewer.mxml @@ -229,7 +229,10 @@ import net.systemeD.controls.CollapsiblePanel; import mx.collections.*; - import mx.containers.*; + import mx.containers.VBox; + import mx.containers.HBox; + import mx.containers.TabNavigator; + import mx.containers.Accordion; import mx.events.*; import mx.core.*; import mx.managers.PopUpManager; @@ -241,6 +244,8 @@ import mx.managers.DragManager; import mx.core.DragSource; import mx.controls.TabBar; + import spark.components.Form; + import spark.layouts.FormLayout; // import flexlib.containers.SuperTabNavigator; [Bindable] [Embed(source="../../../embedded/tab_basic.png" )] private var tabIconBasic:Class; @@ -455,7 +460,7 @@ // Add to basic editor box first if ( factory.presence.isEditorPresent(factory, selectedEntity, null) ) { var editor:DisplayObject = factory.createEditorInstance(selectedEntity); - if (editor) basicEditorBox.addChild(editor); + if (editor) Form(basicEditorBox.getChildByName("form")).addElement(UIComponent(editor)); } // Then prepare to add to category panel @@ -500,6 +505,11 @@ box.percentWidth = 100; box.percentHeight = 100; box.styleName = "dndEditorContainer"; + var form:Form = new Form(); + form.name = "form"; + var layout:FormLayout = new FormLayout(); + form.layout = layout; + box.addChild(form); return box; } diff --git a/net/systemeD/potlatch2/mapfeatures/editors/CheckboxEditor.mxml b/net/systemeD/potlatch2/mapfeatures/editors/CheckboxEditor.mxml index 66b997b4..35af92b6 100644 --- a/net/systemeD/potlatch2/mapfeatures/editors/CheckboxEditor.mxml +++ b/net/systemeD/potlatch2/mapfeatures/editors/CheckboxEditor.mxml @@ -2,6 +2,7 @@ - - + + + - - - - - - - - "+choice.label+""; - return choice.label; - } - ]]> - - - - + + + + + + + + "+choice.label+""; + return choice.label; + } + ]]> + + + + + - - - + + +