You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2018/09/02 21:49:05 UTC
[royale-asjs] branch develop updated: separate combo & dropdown
examples and refactor to Grid layout for better responsive layout
This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new f816f90 separate combo & dropdown examples and refactor to Grid layout for better responsive layout
f816f90 is described below
commit f816f90d72f2e3bd81aba6dff924a0e3bc403060
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Sep 2 23:49:00 2018 +0200
separate combo & dropdown examples and refactor to Grid layout for better responsive layout
---
...ListPlayGround.mxml => ComboBoxPlayGround.mxml} | 80 ----------------------
.../src/main/royale/DropDownListPlayGround.mxml | 78 +--------------------
.../JewelExample/src/main/royale/MainContent.mxml | 3 +-
.../src/main/royale/models/MainNavigationModel.as | 5 +-
4 files changed, 6 insertions(+), 160 deletions(-)
diff --git a/examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/ComboBoxPlayGround.mxml
similarity index 56%
copy from examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml
copy to examples/royale/JewelExample/src/main/royale/ComboBoxPlayGround.mxml
index cb94b63..6e4fbe7 100644
--- a/examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/ComboBoxPlayGround.mxml
@@ -25,18 +25,10 @@ limitations under the License.
<fx:Script>
<![CDATA[
- private function watchmenDropDownListHandler(event:Event):void {
- watchmenDropDownListResult.html = "<strong>DropDownList selectedItem:</strong> " + event.target.selectedItem;
- }
-
private function watchmenComboBoxSelectedItem(event:Event):void {
watchmenComboBoxResult.html = "<strong>ComboBox selectedItem:</strong> " + event.target.selectedItem;
}
- private function avengersDropDownListHandler(event:Event):void {
- avengersDropDownListResult.html = "<strong>DropDownList selectedItem:</strong> " + event.target.selectedItem.label;
- }
-
private function avengersComboBoxSelectedItem(event:Event):void {
avengersComboBoxResult.html = "<strong>ComboBox selectedItem:</strong> " + event.target.selectedItem.label;
}
@@ -118,77 +110,5 @@ limitations under the License.
</j:Card>
</j:GridCell>
</j:Grid>
-
- <html:H5 text="Jewel DropDownList (This component is still in development)"/>
-
- <j:Grid gap="true" itemsVerticalAlign="itemsSameHeight">
-
- <j:GridCell desktopNumerator="1" desktopDenominator="1"
- tabletNumerator="1" tabletDenominator="1"
- phoneNumerator="1" phoneDenominator="1">
- <j:Card>
-
- <html:H3 text="Jewel DropDownList (String Collection)"/>
-
- <j:Grid gap="true" itemsVerticalAlign="itemsCentered">
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:DropDownList id="watchmenDropDownList" dataProvider="{listModel.watchmen}" change="watchmenDropDownListHandler(event)"/>
- </j:GridCell>
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
- <j:Label text="Select Index: "/>
- <j:NumericStepper valueChange="watchmenDropDownList.selectedIndex = event.target.value" minimum="0" maximum="5"/>
- </j:HGroup>
- </j:GridCell>
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:Label id="watchmenDropDownListResult" html="<strong>DropDownList selectedItem:</strong> "/>
- </j:GridCell>
- </j:Grid>
- </j:Card>
-
- </j:GridCell>
-
- <j:GridCell desktopNumerator="1" desktopDenominator="1"
- tabletNumerator="1" tabletDenominator="1"
- phoneNumerator="1" phoneDenominator="1">
- <j:Card>
-
- <html:H3 text="Jewel DropDownList (Object Collection)"/>
-
- <j:Grid gap="true" itemsVerticalAlign="itemsCentered">
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:DropDownList id="avengersDropDownList" labelField="label" dataProvider="{listModel.avengers}" change="avengersDropDownListHandler(event)"/>
- </j:GridCell>
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
- <j:Label text="Select Index: "/>
- <j:NumericStepper valueChange="avengersDropDownList.selectedIndex = event.target.value" minimum="0" maximum="8"/>
- </j:HGroup>
- </j:GridCell>
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:Label id="avengersDropDownListResult" html="<strong>DropDownList selectedItem:</strong> "/>
- </j:GridCell>
- </j:Grid>
- </j:Card>
- </j:GridCell>
- </j:Grid>
</j:SectionContent>
diff --git a/examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml
index cb94b63..0eb22d6 100644
--- a/examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml
@@ -28,18 +28,10 @@ limitations under the License.
private function watchmenDropDownListHandler(event:Event):void {
watchmenDropDownListResult.html = "<strong>DropDownList selectedItem:</strong> " + event.target.selectedItem;
}
-
- private function watchmenComboBoxSelectedItem(event:Event):void {
- watchmenComboBoxResult.html = "<strong>ComboBox selectedItem:</strong> " + event.target.selectedItem;
- }
private function avengersDropDownListHandler(event:Event):void {
avengersDropDownListResult.html = "<strong>DropDownList selectedItem:</strong> " + event.target.selectedItem.label;
}
-
- private function avengersComboBoxSelectedItem(event:Event):void {
- avengersComboBoxResult.html = "<strong>ComboBox selectedItem:</strong> " + event.target.selectedItem.label;
- }
]]>
</fx:Script>
@@ -51,76 +43,8 @@ limitations under the License.
<models:ListsModel id="listModel"/>
</j:model>
- <j:Grid gap="true" itemsVerticalAlign="itemsSameHeight">
-
- <j:GridCell desktopNumerator="1" desktopDenominator="1"
- tabletNumerator="1" tabletDenominator="1"
- phoneNumerator="1" phoneDenominator="1">
-
- <j:Card>
- <html:H3 text="Jewel ComboBox (String Collection)"/>
-
- <j:Grid gap="true" itemsVerticalAlign="itemsCentered">
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:ComboBox id="watchmenComboBox" dataProvider="{listModel.watchmen}" change="watchmenComboBoxSelectedItem(event)"/>
- </j:GridCell>
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
- <j:Label text="Select Index: "/>
- <j:NumericStepper valueChange="watchmenComboBox.selectedIndex = event.target.value" minimum="0" maximum="5"/>
- </j:HGroup>
- </j:GridCell>
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:Label id="watchmenComboBoxResult" html="<strong>ComboBox selectedItem:</strong> "/>
- </j:GridCell>
- </j:Grid>
- </j:Card>
- </j:GridCell>
-
- <j:GridCell desktopNumerator="1" desktopDenominator="1"
- tabletNumerator="1" tabletDenominator="1"
- phoneNumerator="1" phoneDenominator="1">
- <j:Card>
- <html:H3 text="Jewel ComboBox (Object Collection)"/>
-
- <j:Grid gap="true" itemsVerticalAlign="itemsCentered">
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:ComboBox id="avengersComboBox" labelField="label" dataProvider="{listModel.avengers}" change="avengersComboBoxSelectedItem(event)"/>
- </j:GridCell>
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
- <j:Label text="Select Index: "/>
- <j:NumericStepper valueChange="avengersComboBox.selectedIndex = event.target.value" minimum="0" maximum="8"/>
- </j:HGroup>
- </j:GridCell>
- <j:GridCell desktopNumerator="1" desktopDenominator="3"
- tabletNumerator="1" tabletDenominator="3"
- phoneNumerator="1" phoneDenominator="1"
- itemsVerticalAlign="itemsCentered" width="290">
- <j:Label id="avengersComboBoxResult" html="<strong>ComboBox selectedItem:</strong> "/>
- </j:GridCell>
- </j:Grid>
- </j:Card>
- </j:GridCell>
- </j:Grid>
-
<html:H5 text="Jewel DropDownList (This component is still in development)"/>
-
+
<j:Grid gap="true" itemsVerticalAlign="itemsSameHeight">
<j:GridCell desktopNumerator="1" desktopDenominator="1"
diff --git a/examples/royale/JewelExample/src/main/royale/MainContent.mxml b/examples/royale/JewelExample/src/main/royale/MainContent.mxml
index 06547b8..25adfcf 100644
--- a/examples/royale/JewelExample/src/main/royale/MainContent.mxml
+++ b/examples/royale/JewelExample/src/main/royale/MainContent.mxml
@@ -119,7 +119,7 @@ limitations under the License.
<local:ButtonPlayGround id="button_panel"/>
<local:NumericStepperPlayGround id="numericstepper_panel"/>
<local:DateComponentsPlayGround id="datecomponents_panel"/>
- <local:DropDownListPlayGround id="dropdownlist_panel"/>
+ <local:ComboBoxPlayGround id="combobox_panel"/>
<local:CheckBoxPlayGround id="checkbox_panel"/>
<local:MiscelaneaPlayGound id="miscelanea_panel"/>
<local:HeadingsAndText id="text_panel"/>
@@ -132,6 +132,7 @@ limitations under the License.
<local:CardPlayGround id="card_panel"/>
<local:TablePlayGround id="tables_panel"/>
<local:FormsValidationPlayGround id="form_validation_panel"/>
+ <local:DropDownListPlayGround id="dropdownlist_panel"/>
</j:ApplicationMainContent>
</j:ApplicationResponsiveView>
diff --git a/examples/royale/JewelExample/src/main/royale/models/MainNavigationModel.as b/examples/royale/JewelExample/src/main/royale/models/MainNavigationModel.as
index 64d4986..44a6bef 100644
--- a/examples/royale/JewelExample/src/main/royale/models/MainNavigationModel.as
+++ b/examples/royale/JewelExample/src/main/royale/models/MainNavigationModel.as
@@ -29,7 +29,7 @@ package models
new NavigationLinkVO("Button", "button_panel", MaterialIconType.CROP_7_5),
new NavigationLinkVO("NumericStepper", "numericstepper_panel", MaterialIconType.UNFOLD_MORE),
new NavigationLinkVO("Date Components", "datecomponents_panel", MaterialIconType.DATE_RANGE),
- new NavigationLinkVO("DropDownList/ComboBox", "dropdownlist_panel", MaterialIconType.CREDIT_CARD),
+ new NavigationLinkVO("ComboBox", "combobox_panel", MaterialIconType.CREDIT_CARD),
new NavigationLinkVO("CheckBox", "checkbox_panel", MaterialIconType.CHECK_BOX),
new NavigationLinkVO("Icon", "miscelanea_panel", MaterialIconType.FACE),
new NavigationLinkVO("Label", "label_panel", MaterialIconType.LABEL),
@@ -38,7 +38,8 @@ package models
new NavigationLinkVO("Slider", "slider_panel", MaterialIconType.STORAGE),
new NavigationLinkVO("Text", "text_panel", MaterialIconType.SUBJECT),
new NavigationLinkVO("TextInput", "textinput_panel", MaterialIconType.TEXT_FIELDS),
- new NavigationLinkVO("Forms & Validation", "form_validation_panel", MaterialIconType.ASSIGNMENT_TURNED_IN)
+ new NavigationLinkVO("Forms & Validation", "form_validation_panel", MaterialIconType.ASSIGNMENT_TURNED_IN),
+ new NavigationLinkVO("DropDownList", "dropdownlist_panel", MaterialIconType.CREDIT_CARD)
// new NavigationLinkVO("Menu", "menus_panel"),
// new NavigationLinkVO("Loading", "loading_panel"),