Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

csv import and sql import now keep existing key type when you go back

and change table display name.

Change-Id: Ie03e4a903400276eb6767ff2feda2e0ca53b6c66
  • Loading branch information...
commit e933dd8fbd11deabaf38dc246de896f407a2b2e8 1 parent dfdf933
@adufilie adufilie authored
View
23 WeaveAdmin/src/weave/ui/admin/GeometryCollectionDialog.mxml
@@ -36,7 +36,7 @@
<mx:HBox>
<mx:RadioButton id="keyTypeRadio" group="{shapeOrKey}" selected="true" label="{Strings.key_type}" textAlign="left" width="{_indent}" toolTip="{Strings.tip_key_type_radiobutton}"/>
<mx:HBox enabled="{keyTypeRadio.selected &amp;&amp; !refreshingKeyTypes}">
- <ui:CustomComboBox id="keyTypeCombo" editable="true" text="{keyType}" enabled="{keyTypeCombo.dataProvider.length > 0}" dataProvider="{AdminInterface.instance.keyTypes}" toolTip="{Strings.tip_key_type_dropdown}" valueCommit="keyType = keyTypeCombo.text"/>
+ <ui:CustomComboBox id="keyTypeCombo" editable="true" text="{_defaultKeyType}" enabled="{keyTypeCombo.dataProvider.length > 0}" dataProvider="{AdminInterface.instance.keyTypes}" toolTip="{Strings.tip_key_type_dropdown}" valueCommit="if (UIUtils.hasFocus(keyTypeCombo)) keyTypeIsSet = true;"/>
<mx:Button id="keyTypeRefresh" label="Refresh" click="getKeyTypes()" toolTip="{Strings.tip_refresh_key_types}"/>
</mx:HBox>
<!--mx:Button label="?" click="showHelpForKeyType()"/-->
@@ -46,6 +46,7 @@
<mx:Script>
<![CDATA[
import weave.Strings;
+ import weave.core.UIUtils;
import weave.services.AdminInterface;
import weave.services.DelayedAsyncInvocation;
@@ -78,14 +79,20 @@
public function get selectedKeyType():String
{
- if (keyTypeRadio.selected)
- return keyTypeCombo.text;
- else
- return '';
- }
-
- [Bindable] public var keyType:String = "";
+ if (keyTypeRadio.selected)
+ return keyTypeCombo.text;
+
+ return '';
+ }
+
+ public function set defaultKeyType(value:String):void
+ {
+ if (!keyTypeIsSet)
+ _defaultKeyType = value;
+ }
+ [Bindable] private var _defaultKeyType:String = '';
+ private var keyTypeIsSet:Boolean = false;
[Bindable] private var refreshingGeoms:Boolean = false;
[Bindable] private var refreshingKeyTypes:Boolean = false;
View
4 WeaveAdmin/src/weave/ui/admin/wizards/CSVImportWizard.mxml
@@ -34,7 +34,7 @@
<ui:TextInputWithPrompt id="csvFileNameInput" prompt="Select a CSV file." change="enableAllWidgets(csvFileNameInput.text.length > 0)" editable="true"/>
<mx:Button label="Upload File" click="browseAndUpload();"/>
<mx:Button label="Choose File on Server" click="openServerBrowser();" />
- <mx:Text text="{fileStatus.text}" id="fileStatus"/>
+ <mx:Text id="fileStatus"/>
</ui:Indent>
<mx:VBox visible="{csvFileNameInput.asTextInput().text.length > 0}">
<admin:SQLTableSelectorDialog id="tableSelector" showTableCombo="false" tableOverwriteCheckVisible="{AdminInterface.instance.currentUserIsSuperuser}"/>
@@ -69,7 +69,7 @@
<mx:Label text="What do these keys correspond to?"/>
<admin:GeometryCollectionDialog id="geometrySelector"
paddingLeft="{paddingIndent}"
- keyType="{dataTableNameInput.asTextInput().text}"/>
+ defaultKeyType="{dataTableNameInput.asTextInput().text}"/>
<mx:CheckBox id="secondaryKeyColumnCheckBox" label="Format data for Dimension Slider" selected="false"/>
<ui:Indent label="Secondary key column"
View
2  WeaveAdmin/src/weave/ui/admin/wizards/SQLImportWizard.mxml
@@ -40,7 +40,7 @@
</ui:Indent>
<mx:VBox visible="{keyColumnComboBox.selectedItem}">
<mx:Label text="What do these keys correspond to?"/>
- <admin:GeometryCollectionDialog paddingLeft="{paddingIndent}" id="geometrySelector" keyType="{tableSelector.activeTable}"/>
+ <admin:GeometryCollectionDialog paddingLeft="{paddingIndent}" id="geometrySelector" defaultKeyType="{tableSelector.activeTable}"/>
<mx:CheckBox change="handleKeyColumnChange()" id="secondaryKeyColumnCheckBox" label="Format data for Dimension Slider" selected="false"/>
<ui:Indent paddingLeft="{paddingIndent}"
Please sign in to comment.
Something went wrong with that request. Please try again.