http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/ProductJSONItemConverter.as ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/ProductJSONItemConverter.as b/examples/flexjs/FlexJSStore/src/ProductJSONItemConverter.as new file mode 100755 index 0000000..cb27bde --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/ProductJSONItemConverter.as @@ -0,0 +1,41 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// +package +{ + import org.apache.flex.collections.converters.JSONItemConverter; + + import samples.flexstore.Product; + + public class ProductJSONItemConverter extends JSONItemConverter + { + public function ProductJSONItemConverter() + { + super(); + } + + override public function convertItem(data:String):Object + { + var obj:Object = super.convertItem(data); + var product:Product = new Product(); + for (var p:String in obj) + product[p] = obj[p]; + return product; + } + } +} \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/ProductsView.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/ProductsView.mxml b/examples/flexjs/FlexJSStore/src/ProductsView.mxml new file mode 100755 index 0000000..70fccd1 --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/ProductsView.mxml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--> +<!-- width and height hard-coded in the root tag to better support the + Design view in FlexBuilder since we know the width and height from the + settings in flexstore.mxml --> +<js:Container xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:js="library://ns.apache.org/flexjs/basic" + xmlns:productsView="productsView.*" + width="990" height="550" + currentState="showFilter" + > + + <fx:Script> + <![CDATA[ + import org.apache.flex.events.Event; + import org.apache.flex.collections.LazyCollection; + import samples.flexstore.Product; + + private var _catalog:LazyCollection; + + [Bindable("catalogChange")] + public function get catalog():LazyCollection + { + return _catalog; + } + + public function set catalog(c:LazyCollection):void + { + _catalog = c; + if (filterPanel != null) + { + filterPanel.filter.count = c.length; + } + dispatchEvent(new org.apache.flex.events.Event("catalogChange")); + } + + public function addToCompare(product:Product):void + { + //setting the state before adding the product avoids jumpiness in the transition, not sure why + currentState = 'showFilter'; + filterPanel.productList.addProduct(product); + } + + public function addToCart(product:Product):void + { + //setting the state before adding the product avoids jumpiness in the transition, not sure why + currentState = 'showCart'; + cartPanel.productList.addProduct(product); + } + + + ]]> + </fx:Script> + <js:beads> + <js:ContainerDataBinding /> + </js:beads> + <js:Container + className="colorPanel" + height="100%" width="100%" + > + <js:beads> + <js:OneFlexibleChildHorizontalLayout flexibleChild="spacer" /> + </js:beads> + <productsView:Grip id="filterGrip" gripIcon="assets/icon_magnifier.png" + gripTip="Show filter panel" click="currentState = 'showFilter'"/> + + <productsView:ProductFilterPanel x="{filterGrip.width}" y="0" id="filterPanel" width="265" height="100%" + filter="catalogPanel.filter(event.filter, event.live)" + compare="catalogPanel.compare(filterPanel.productList.getProducts())" + initComplete="if (catalog) filterPanel.filter.count = catalog.length"/> + + <js:Spacer id="spacer" /> + + <productsView:ProductCart id="cartPanel" width="265" height="100%" /> + + <productsView:Grip id="cartGrip" gripIcon="assets/icon_cart_empty.png" + gripTip="Show cart" click="currentState = 'showCart'" /> + + </js:Container> + + <productsView:ProductCatalogPanel id="catalogPanel" y="4" width="685" height="540" + x.showFilter="288" x.showCart="0" + catalog="{catalog}" + compare="addToCompare(event.product)" + purchase="addToCart(event.product)" + cartCount="{cartPanel.numProducts}"> + </productsView:ProductCatalogPanel> + + <js:states> + <js:State name="showFilter" /> + <js:State name="showCart" /> + </js:states> + + <!-- + make sure to use transitions here instead of applying a Move effect + to the Panel itself which will result in odd behavior + --> + <js:transitions> + <js:Transition fromState="*" toState="*"> + <js:Move target="catalogPanel" /> + </js:Transition> + </js:transitions> + +</js:Container> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/SupportView.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/SupportView.mxml b/examples/flexjs/FlexJSStore/src/SupportView.mxml new file mode 100755 index 0000000..c0579e4 --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/SupportView.mxml @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--> +<!-- +This component is primarily static and is only meant to show what other +pages of the store could look like. + +Note that this page was put together in the Design view so you'll see more +hard coded locations and sizes. + +We did not have sizing issues here as much so you'll see more hardcoded +"y" values rather than "top." + +The width and height are hard-coded in the root tag to help the Design view. +--> +<js:Container xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:js="library://ns.apache.org/flexjs/basic" + xmlns="*" alpha="1.0" + width="990" height="550"> + + <fx:Script> + <![CDATA[ + import org.apache.flex.html.SimpleAlert; + ]]> + </fx:Script> + + <fx:Declarations> + <fx:Array id="locations"> + <fx:Object image="assets/support_mapmarker_a.png" name="601 Townsend St" /> + <fx:Object image="assets/support_mapmarker_b.png" name="Location B" /> + <fx:Object image="assets/support_mapmarker_c.png" name="Location C" /> + </fx:Array> + + </fx:Declarations> + + <js:HContainer x="0" y="0" width="100%" height="100%" className="colorPanel"> + + <js:VContainer width="32%" height="100%"> + <js:Container width="100%" height="420"> + + <js:Label y="10" text="Check Location" className="sectionHeader" x="20"/> + + <js:Container height="150" y="64" style="margin:auto"> + <js:beads> + <js:VerticalColumnLayout numColumns="2" /> + </js:beads> + <js:Label text="Address:"/> + <js:TextInput id="address"/> + + <js:Label text="City:" style="marginTop:20"/> + <js:TextInput id="city" style="marginTop:20"/> + + <js:Label text="State:" style="marginTop:20"/> + <js:DropDownList id="state" style="marginTop:20"> + <js:dataProvider> + <fx:Array> + <fx:String>California</fx:String> + <fx:String>Nevada</fx:String> + <fx:String>Oregon</fx:String> + <fx:String>Washington</fx:String> + </fx:Array> + </js:dataProvider> + </js:DropDownList> + + <js:Label text="ZIP Code:" style="marginTop:20"/> + <js:TextInput id="zip" style="marginTop:20"/> + + </js:Container> + + <js:Label y="38" text="Option1: Enter Address" style="margin:auto" className="instructions"/> + + <js:TextButton y="297" text="Locate" click="SimpleAlert.show('This feature is not implemented in this sample', 'Locate')" + style="margin:auto"/> + + <js:HContainer y="327" height="20" > + <js:style> + <js:SimpleCSSStyles margin="auto" verticalAlign="middle" /> + </js:style> + <js:HRule width="60" /> + <js:Label text="OR"/> + <js:HRule width="60" /> + </js:HContainer> + + <js:Label y="355" text="Option 2: Drag this marker into the map" style="margin:auto" className="instructions"/> + + <js:Image y="380" style="margin:auto" source="assets/support_mapmarker_plus.png"/> + + <js:HRule y="415" style="margin:auto" width="200" alpha="0.6"/> + + </js:Container> + + <js:Container width="100%" height="130"> + <js:VContainer width="80%" height="90%" > + <js:style> + <js:SimpleCSSStyles margin="auto" top="0"/> + </js:style> + <js:Label text="Location" className="instructions"/> + <js:List width="100%" dataProvider="{locations}"> + <js:itemRenderer> + <fx:Component> + <js:DataItemRenderer className="listItem" width="100%"> + <fx:Script> + <![CDATA[ + import samples.flexstore.Product; + [Bindable("__NoChangeEvent__")] + private function get product():Product + { + return data as Product; + } + ]]> + </fx:Script> + <js:Image width="21" height="25" source="{product.image}" /> + <js:Label width="100%" text="{product.name}" /> + </js:DataItemRenderer> + </fx:Component> + </js:itemRenderer> + </js:List> + </js:VContainer> + </js:Container> + + </js:VContainer> + + <js:Container width="68%" height="100%"> + <js:Image source="assets/support_map.png"> + <js:style> + <js:SimpleCSSStyles left="2" right="2" top="2" bottom="2"/> + </js:style> + </js:Image> + </js:Container> + + </js:HContainer> + +</js:Container> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/akotter.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/akotter.jpg b/examples/flexjs/FlexJSStore/src/assets/akotter.jpg new file mode 100755 index 0000000..1124b71 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/akotter.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/bcrater.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/bcrater.jpg b/examples/flexjs/FlexJSStore/src/assets/bcrater.jpg new file mode 100755 index 0000000..fd15d59 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/bcrater.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/beige_background.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/beige_background.jpg b/examples/flexjs/FlexJSStore/src/assets/beige_background.jpg new file mode 100755 index 0000000..8f034ba Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/beige_background.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/beige_dotted_map.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/beige_dotted_map.png b/examples/flexjs/FlexJSStore/src/assets/beige_dotted_map.png new file mode 100755 index 0000000..e88d9ef Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/beige_dotted_map.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/blue_background.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/blue_background.jpg b/examples/flexjs/FlexJSStore/src/assets/blue_background.jpg new file mode 100755 index 0000000..361ce0e Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/blue_background.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/blue_dotted_map.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/blue_dotted_map.png b/examples/flexjs/FlexJSStore/src/assets/blue_dotted_map.png new file mode 100755 index 0000000..5fa6714 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/blue_dotted_map.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/button_cart_empty.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/button_cart_empty.png b/examples/flexjs/FlexJSStore/src/assets/button_cart_empty.png new file mode 100644 index 0000000..0e1a2b5 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/button_cart_empty.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/button_cart_full.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/button_cart_full.png b/examples/flexjs/FlexJSStore/src/assets/button_cart_full.png new file mode 100644 index 0000000..9c9eea0 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/button_cart_full.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/button_compare.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/button_compare.png b/examples/flexjs/FlexJSStore/src/assets/button_compare.png new file mode 100644 index 0000000..c2ac969 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/button_compare.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/button_details.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/button_details.png b/examples/flexjs/FlexJSStore/src/assets/button_details.png new file mode 100644 index 0000000..3e6238c Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/button_details.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/button_tiles.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/button_tiles.png b/examples/flexjs/FlexJSStore/src/assets/button_tiles.png new file mode 100644 index 0000000..4266a22 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/button_tiles.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/grip.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/grip.png b/examples/flexjs/FlexJSStore/src/assets/grip.png new file mode 100755 index 0000000..64ee835 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/grip.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/icon_cart_empty.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/icon_cart_empty.png b/examples/flexjs/FlexJSStore/src/assets/icon_cart_empty.png new file mode 100644 index 0000000..562064b Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/icon_cart_empty.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/icon_compare.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/icon_compare.png b/examples/flexjs/FlexJSStore/src/assets/icon_compare.png new file mode 100644 index 0000000..efc3ea1 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/icon_compare.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/icon_magnifier.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/icon_magnifier.png b/examples/flexjs/FlexJSStore/src/assets/icon_magnifier.png new file mode 100755 index 0000000..939f814 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/icon_magnifier.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/icon_tiles.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/icon_tiles.png b/examples/flexjs/FlexJSStore/src/assets/icon_tiles.png new file mode 100644 index 0000000..dbf75b6 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/icon_tiles.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/jproctor.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/jproctor.jpg b/examples/flexjs/FlexJSStore/src/assets/jproctor.jpg new file mode 100755 index 0000000..1111787 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/jproctor.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/logo_blue.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/logo_blue.png b/examples/flexjs/FlexJSStore/src/assets/logo_blue.png new file mode 100755 index 0000000..132b894 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/logo_blue.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/logo_orange.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/logo_orange.png b/examples/flexjs/FlexJSStore/src/assets/logo_orange.png new file mode 100755 index 0000000..c776c8c Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/logo_orange.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/abrilliam.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/abrilliam.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/abrilliam.jpg new file mode 100755 index 0000000..6954858 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/abrilliam.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/akotter.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/akotter.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/akotter.jpg new file mode 100755 index 0000000..1124b71 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/akotter.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/bcrater.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/bcrater.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/bcrater.jpg new file mode 100755 index 0000000..fd15d59 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/bcrater.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/bleporte.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/bleporte.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/bleporte.jpg new file mode 100755 index 0000000..c4769e8 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/bleporte.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/bvanbrocklin.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/bvanbrocklin.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/bvanbrocklin.jpg new file mode 100755 index 0000000..489fa2e Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/bvanbrocklin.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/ccarpenter.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/ccarpenter.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/ccarpenter.jpg new file mode 100755 index 0000000..c1dc3d8 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/ccarpenter.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/clampberto.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/clampberto.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/clampberto.jpg new file mode 100755 index 0000000..9deacd2 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/clampberto.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/davenon.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/davenon.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/davenon.jpg new file mode 100755 index 0000000..6a2a142 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/davenon.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/dmcgoyal.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/dmcgoyal.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/dmcgoyal.jpg new file mode 100755 index 0000000..1124b71 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/dmcgoyal.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/dwillhelm.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/dwillhelm.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/dwillhelm.jpg new file mode 100755 index 0000000..fd15d59 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/dwillhelm.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/esunderland.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/esunderland.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/esunderland.jpg new file mode 100755 index 0000000..c4769e8 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/esunderland.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/jproctor.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/jproctor.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/jproctor.jpg new file mode 100755 index 0000000..1111787 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/jproctor.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/mfields.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/mfields.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/mfields.jpg new file mode 100755 index 0000000..489fa2e Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/mfields.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/pdempsey.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/pdempsey.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/pdempsey.jpg new file mode 100755 index 0000000..9deacd2 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/pdempsey.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/ptranep.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/ptranep.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/ptranep.jpg new file mode 100755 index 0000000..4b9a03b Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/ptranep.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/rcrawley.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/rcrawley.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/rcrawley.jpg new file mode 100755 index 0000000..9b60320 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/rcrawley.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/rdreifus.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/rdreifus.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/rdreifus.jpg new file mode 100755 index 0000000..6a2a142 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/rdreifus.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/pic/twong.jpg ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/pic/twong.jpg b/examples/flexjs/FlexJSStore/src/assets/pic/twong.jpg new file mode 100755 index 0000000..1124b71 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/pic/twong.jpg differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/support_map.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/support_map.png b/examples/flexjs/FlexJSStore/src/assets/support_map.png new file mode 100755 index 0000000..c2f2394 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/support_map.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_a.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_a.png b/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_a.png new file mode 100755 index 0000000..20c21e1 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_a.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_b.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_b.png b/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_b.png new file mode 100755 index 0000000..069ccd8 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_b.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_c.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_c.png b/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_c.png new file mode 100755 index 0000000..f6b587e Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_c.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_plus.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_plus.png b/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_plus.png new file mode 100755 index 0000000..4192088 Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/support_mapmarker_plus.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/assets/trashcan.png ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/assets/trashcan.png b/examples/flexjs/FlexJSStore/src/assets/trashcan.png new file mode 100644 index 0000000..483a37c Binary files /dev/null and b/examples/flexjs/FlexJSStore/src/assets/trashcan.png differ http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/beige.css ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/beige.css b/examples/flexjs/FlexJSStore/src/beige.css new file mode 100755 index 0000000..764b49c --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/beige.css @@ -0,0 +1,171 @@ +/* +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// +*/ + +/* Style for color-specific state - Beige */ + +@namespace "library://ns.apache.org/flexjs/basic"; + +/* +//---------------------------- +// Global styles +//---------------------------- +*/ +.global +{ + highlightAlphas: .5, .25; + borderColor: #939A9D; + headerColors: #A65904, #E68701; + themeColor: #75B1CE; + rollOverColor: #D6E6EE; + selectionColor: #B8D5E4; +} + +/* +//---------------------------- +// Type selectors +//---------------------------- +*/ +Application +{ + backgroundColor: #EAE6DD; + backgroundImage: "assets/beige_background.jpg"; +} + +/* +//---------------------------- +// Apply to Panels and Alerts by default +//---------------------------- +*/ +.windowStatus { + color: #FFCC99; +} + +.windowStyles { /* catalog panel's title text */ + color: #FFCC99; +} + +/* +//---------------------------- +// Named styles +//---------------------------- +*/ + +.colorPanel /* for the background of some surfaces */ +{ + borderStyle: "solid"; + borderWidth: 0; + backgroundColor: #BCB29F; + backgroundAlpha: 0.4; + color: #170505; + cornerRadius: 4; + dropShadowEnabled: true; +} + +.homeProgramHeader /* in HomeView */ +{ + fontWeight: "bold"; + fontSize: 13; + color: #BE7E3F; +} + +.homeMap +{ + borderStyle: "solid"; + cornerRadius: 4; + backgroundColor: #BE7E3F; + alpha: 1; + dottedMap: "assets/beige_dotted_map.png"; +} + +.instructions +{ + alpha: .85; + color: #5C5857; +} + +.storeControlBar +{ + fillAlphas: .60, .40; + fillColors: #8F8879, #BCB29F; + highlightAlphas: .05, .25; + cornerRadius: 3; + shadowDistance: 4; + paddingLeft: 0; + paddingRight: 0; + paddingTop: 0; + paddingBottom: 0; + horizontalGap: 0; + storeLogo: "assets/logo_orange.png"; +} + +.storeButtonBar +{ + cornerRadius: 0; + buttonStyleName: "storeButton"; + themeColor: #A65904; +} + +.storeButton +{ + cornerRadius: 0; + fillColors: #8F8879, #BCB29F, #A65904, #E68701; + fillAlphas: 1, 1; + highlightAlphas: .5, .25; + fontWeight: "normal"; + /** need to port to ButtonView + selectedOverSkin: ClassReference("samples.flexstore.ButtonBarButtonSkin"); + selectedUpSkin: ClassReference("samples.flexstore.ButtonBarButtonSkin"); + overSkin: ClassReference("samples.flexstore.ButtonBarButtonSkin"); + **/ +} + +.catalogTitleButtonSelected +{ + color: #FFFFFF; + fontWeight: "bold"; +} + +.catalogTitleButtonDeselected +{ + color: #222222; + fontWeight: "bold"; +} + +.catalogTitleButtonHighlighted +{ + color: #FFCC99; + fontWeight: "bold"; +} + +.catalogPanel +{ + highlightAlphas: .5, .25; + headerColors: #A65904, #E68701; + borderAlpha: 1; + borderColor: #FFFFFF; + border-width: 1px; + borderThicknessRight: 1; + borderThicknessBottom: 1; + paddingRight: 0; + paddingBottom: 0; +} + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/blue.css ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/blue.css b/examples/flexjs/FlexJSStore/src/blue.css new file mode 100755 index 0000000..58e98cd --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/blue.css @@ -0,0 +1,165 @@ +/* +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// +*/ + +/* Style for color-specific state - Beige */ + +/* +//---------------------------- +// Global styles +//---------------------------- +*/ +.global +{ + highlightAlphas: .5, .25; + borderColor: #939A9D; + headerColors: #456F84, #9ABBC9; + themeColor: #75B1CE; + rollOverColor: #D6E6EE; + selectionColor: #B8D5E4; +} + +/* +//---------------------------- +// Type selectors +//---------------------------- +*/ +Application +{ + backgroundColor: #AAB2B7; + backgroundImage: Embed("assets/blue_background.jpg"); +} + +/* +//---------------------------- +// Apply to Panels and Alerts by default +//---------------------------- +*/ +.windowStatus { + color: #BDE9FA; +} + +.windowStyles { /* catalog panel's title text */ + color: #BDE9FA; +} + +/* +//---------------------------- +// Named styles +//---------------------------- +*/ + +.colorPanel /* for the background of some surfaces */ +{ + borderStyle: "solid"; + borderThickness: 0; + backgroundColor: #BDD6E2; + backgroundAlpha: 0.4; + color: #170505; + cornerRadius: 4; + dropShadowEnabled: true; +} + +.homeProgramHeader /* in HomeView */ +{ + fontWeight: "bold"; + fontSize: 13; + color: #7AA4B9; +} + +.homeMap +{ + borderStyle: "solid"; + cornerRadius: 4; + backgroundColor: #7AA4B9; + alpha: 1; + dottedMap: Embed("assets/blue_dotted_map.png"); +} + +.instructions +{ + alpha: .85; + color: #5C5857; +} + +.storeControlBar +{ + fillAlphas: .60, .40; + fillColors: #4A6F81, #BDD6E2; + highlightAlphas: .05, .25; + cornerRadius: 3; + shadowDistance: 4; + paddingLeft: 0; + paddingRight: 0; + paddingTop: 0; + paddingBottom: 0; + horizontalGap: 0; + storeLogo: Embed("assets/logo_blue.png"); +} + +.storeButtonBar +{ + cornerRadius: 0; + buttonStyleName: "storeButton"; + themeColor: #456F84; +} + +.storeButton +{ + cornerRadius: 0; + fillColors: #4A6F81, #BDD6E2, #456F84, #9ABBC9; + fillAlphas: 1, 1; + highlightAlphas: .5, .25; + fontWeight: "normal"; + selectedOverSkin: ClassReference("samples.flexstore.ButtonBarButtonSkin"); + selectedUpSkin: ClassReference("samples.flexstore.ButtonBarButtonSkin"); + overSkin: ClassReference("samples.flexstore.ButtonBarButtonSkin"); +} + +.catalogTitleButtonSelected +{ + color: #FFFFFF; + fontWeight: "bold"; +} + +.catalogTitleButtonDeselected +{ + color: #222222; + fontWeight: "bold"; +} + +.catalogTitleButtonHighlighted +{ + color: #BDE9FA; + fontWeight: "bold"; +} + +.catalogPanel +{ + highlightAlphas: .5, .25; + headerColors: #456F84, #9ABBC9; + borderAlpha: 1; + borderColor: #FFFFFF; + borderThicknessRight: 1; + borderThicknessBottom: 1; + paddingRight: 0; + paddingBottom: 0; +} + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/data/catalog.json ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/data/catalog.json b/examples/flexjs/FlexJSStore/src/data/catalog.json new file mode 100755 index 0000000..89bdd43 --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/data/catalog.json @@ -0,0 +1,236 @@ +{ catalog : [ + + { "productId" :"1", + "name" : "Andrew Brilliam", + "description" : "15 years experience. 8 years with Flex. Specializing in Text Layout Framework", + "price" : 60.00, + "image" : "assets/pic/abrilliam.jpg", + "experience" : 15, + "blazeds" : false, + "mobile" : false, + "video" : false, + "highlight1" : "Text Layout Framework", + "highlight2" : "Parsley" + }, + + { "productId" : "2", + "name" : "Annette Kotter", + "description" : "Specializing in custom components. PHP servers.", + "price" : 55, + "image" : "assets/pic/akotter.jpg", + "experience" : 3, + "blazeds" : true, + "mobile" : false, + "video" : false, + "highlight1" : "Custom Components", + "highlight2" : "PHP" + }, + + { "productId" : "3", + "name" : "Ben Crater", + "description" : "Specializing in BlazeDS backends.", + "price" : 55, + "image" : "assets/pic/bcrater.jpg", + "experience" : 4, + "blazeds" : true, + "mobile" : false, + "video" : false, + "highlight1" : "BlazeDS", + "highlight2" : "Remote Object" + }, + + { "productId" : "4", + "name" : "Beth Leporte", + "description" : "BlazeDS or PHP servers. Multimedia messagin.", + "price" : 70.00, + "image" : "assets/pic/bleporte.jpg", + "experience" : 6, + "blazeds" : true, + "mobile" : false, + "video" : false, + "highlight1" : "Multimedia messaging", + "highlight2" : "BlazeDS" + }, + + { "productId" : "5", + "name" : "Brad Van Brocklin", + "description" : "Emphasis on mobile application development", + "price" : 80, + "image" : "assets/pic/bvanbrocklin.jpg", + "experience" : 6, + "blazeds" : false, + "mobile" : true, + "video" : false, + "highlight1" : "Mobile", + "highlight2" : "Android" + }, + + { "productId" : "6", + "name" : "Carlos Carpenter", + "description" : "Built many mobile apps and video apps.", + "price" : 80, + "image" : "assets/pic/ccarpenter.jpg", + "experience" : 4, + "blazeds" : false, + "mobile" : true, + "video" : true, + "highlight1" : "Mobile", + "highlight2" : "Video" + }, + + { "productId" : "7", + "name" : "Christine Lampberto", + "description" : "7 years experience building mobile applications.", + "price" : 90, + "image" : "assets/pic/clampberto.jpg", + "experience" : 7, + "blazeds" : true, + "mobile" : true, + "video" : false, + "highlight1" : "BlazeDS", + "highlight2" : "Mobile" + }, + + { "productId" : "8", + "name" : "Dee Dee Avenon", + "description" : "I've been making video apps for over 5 years and mobile apps for about 3 years.", + "price" : 100, + "image" : "assets/pic/davenon.jpg", + "experience" : 10, + "blazeds" : false, + "mobile" : true, + "video" : true, + "highlight1" : "Video Applications", + "highlight2" : "Mobile Applications" + }, + + { "productId" : "9", + "name" : "Denise McGoyal", + "description" : "Specializing in video sharing applicaions. MObile apps too.", + "price" : 100, + "image" : "assets/pic/dmcgoyal.jpg", + "experience" : 5, + "blazeds" : false, + "mobile" : true, + "video" : true, + "highlight1" : "Video Applications", + "highlight2" : "Mobile Applications" + }, + + { "productId" : "10", + "name" : "Daniel Willhelm", + "description" : "I'm into mobile apps, video apps and social apps.", + "price" : 70, + "image" : "assets/pic/dwillhelm.jpg", + "experience" : 90, + "blazeds" : false, + "mobile" : true, + "video" : true, + "highlight1" : "Video Applications", + "highlight2" : "Mobile Applications" + }, + + { "productId" : "11", + "name" : "Eunice Sunderland", + "description" : "My recent focus is on mobile apps, but I have considerable experience in video apps as well.", + "price" : 150, + "image" : "assets/pic/esunderland.jpg", + "experience" : 30, + "blazeds" : false, + "mobile" : true, + "video" : true, + "highlight1" : "Video Applications", + "highlight2" : "Mobile Applications" + }, + + { "productId" : "12", + "name" : "Jane Proctor", + "description" : "I've been developing mobile companion apps for the past 3 years.", + "price" : 75, + "image" : "assets/pic/jproctor.jpg", + "experience" : 6, + "blazeds" : false, + "mobile" : true, + "video" : true, + "highlight1" : "Video Applications", + "highlight2" : "Mobile Applications" + }, + + { "productId" : "13", + "name" : "Mark Fields", + "description" : "Video is my favorite thing. Mobile is also a favorite.", + "price" : 60, + "image" : "assets/pic/mfields.jpg", + "experience" : 70, + "blazeds" : false, + "mobile" : true, + "video" : true, + "highlight1" : "Video Applications", + "highlight2" : "Mobile Applications" + }, + + { "productId" : "14", + "name" : "Patricia Dempsey", + "description" : "I've been cranking out mobile apps for the past 6 years. A few have involved video as well.", + "price" : 120, + "image" : "assets/pic/pdempsey.jpg", + "experience" : 7, + "blazeds" : false, + "mobile" : true, + "video" : true, + "highlight1" : "Video Applications", + "highlight2" : "Mobile Applications" + }, + + { "productId" : "15", + "name" : "Paul Trandep", + "description" : "I've been working on a mobile app that incorporates music. It just shipped so now I'm looking for the next fun thing to work on.'", + "price" : 50, + "image" : "assets/pic/ptranep.jpg", + "experience" : 6, + "blazeds" : false, + "mobile" : true, + "video" : true, + "highlight1" : "Video Applications", + "highlight2" : "Mobile Applications" + }, + + { "productId" : "16", + "name" : "Roscoe Crawley", + "description" : "My main specialty is in BlazeDS connected to Flex.", + "price" : 59, + "image" : "assets/pic/rcrawley.jpg", + "experience" : 9, + "blazeds" : true, + "mobile" : false, + "video" : false, + "highlight1" : "BlazeDS", + "highlight2" : "Remote Object" + }, + + { "productId" : "17", + "name" : "Renee Dreifus", + "description" : "I can do it all: BlazeDS, Mobile, Video.", + "price" : 79, + "image" : "assets/pic/rdreifus.jpg", + "experience" : 90, + "blazeds" : true, + "mobile" : true, + "video" : true, + "highlight1" : "Video Applications", + "highlight2" : "Mobile Applications" + }, + + { "productId" : "18", + "name" : "Tina Wong", + "description" : "I've been developing Flex apps since 1.5. Most of my recent work has been on mobile apps.", + "price" : 109, + "image" : "assets/pic/twong.jpg", + "experience" : 9, + "blazeds" : false, + "mobile" : true, + "video" : true, + "highlight1" : "Video Applications", + "highlight2" : "Mobile Applications" + +]; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/data/catalog.xml ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/data/catalog.xml b/examples/flexjs/FlexJSStore/src/data/catalog.xml new file mode 100755 index 0000000..423e177 --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/data/catalog.xml @@ -0,0 +1,256 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + --> +<catalog> + + <product productId="1"> + <name>Andrew Brilliam</name> + <description>15 years experience. 8 years with Flex. Specializing in Text Layout Framework</description> + <price>60.00</price> + <image>assets/pic/abrilliam.jpg</image> + <experience>15</experience> + <blazeds>false</blazeds> + <mobile>false</mobile> + <video>false</video> + <highlight1>Text Layout Framework</highlight1> + <highlight2>Parsley</highlight2> + </product> + + <product productId="2"> + <name>Annette Kotter</name> + <description>Specializing in custom components. PHP servers.</description> + <price>55</price> + <image>assets/pic/akotter.jpg</image> + <experience>3</experience> + <blazeds>true</blazeds> + <mobile>false</mobile> + <video>false</video> + <highlight1>Custom Components</highlight1> + <highlight2>PHP</highlight2> + </product> + + <product productId="3"> + <name>Ben Crater</name> + <description>Specializing in BlazeDS backends.</description> + <price>55</price> + <image>assets/pic/bcrater.jpg</image> + <experience>4</experience> + <blazeds>true</blazeds> + <mobile>false</mobile> + <video>false</video> + <highlight1>BlazeDS</highlight1> + <highlight2>Remote Object</highlight2> + </product> + + <product productId="4"> + <name>Beth Leporte</name> + <description>BlazeDS or PHP servers. Multimedia messagin.</description> + <price>70.00</price> + <image>assets/pic/bleporte.jpg</image> + <experience>6</experience> + <blazeds>true</blazeds> + <mobile>false</mobile> + <video>false</video> + <highlight1>Multimedia messaging</highlight1> + <highlight2>BlazeDS</highlight2> + </product> + + <product productId="5"> + <name>Brad Van Brocklin</name> + <description>Emphasis on mobile application development</description> + <price>80</price> + <image>assets/pic/bvanbrocklin.jpg</image> + <experience>6</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>false</video> + <highlight1>Mobile</highlight1> + <highlight2>Android</highlight2> + </product> + + <product productId="6"> + <name>Carlos Carpenter</name> + <description>Built many mobile apps and video apps.</description> + <price>80</price> + <image>assets/pic/ccarpenter.jpg</image> + <experience>4</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Mobile</highlight1> + <highlight2>Video</highlight2> + </product> + + <product productId="7"> + <name>Christine Lampberto</name> + <description>7 years experience building mobile applications.</description> + <price>90</price> + <image>assets/pic/clampberto.jpg</image> + <experience>7</experience> + <blazeds>true</blazeds> + <mobile>true</mobile> + <video>false</video> + <highlight1>BlazeDS</highlight1> + <highlight2>Mobile</highlight2> + </product> + + <product productId="8"> + <name>Dee Dee Avenon</name> + <description>I've been making video apps for over 5 years and mobile apps for about 3 years.</description> + <price>100</price> + <image>assets/pic/davenon.jpg</image> + <experience>10</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Video Applications</highlight1> + <highlight2>Mobile Applications</highlight2> + </product> + + <product productId="9"> + <name>Denise McGoyal</name> + <description>Specializing in video sharing applicaions. MObile apps too.</description> + <price>100</price> + <image>assets/pic/dmcgoyal.jpg</image> + <experience>5</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Video Applications</highlight1> + <highlight2>Mobile Applications</highlight2> + </product> + + <product productId="10"> + <name>Daniel Willhelm</name> + <description>I'm into mobile apps, video apps and social apps.</description> + <price>70</price> + <image>assets/pic/dwillhelm.jpg</image> + <experience>90</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Video Applications</highlight1> + <highlight2>Mobile Applications</highlight2> + </product> + + <product productId="11"> + <name>Eunice Sunderland</name> + <description>My recent focus is on mobile apps, but I have considerable experience in video apps as well.</description> + <price>150</price> + <image>assets/pic/esunderland.jpg</image> + <experience>30</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Video Applications</highlight1> + <highlight2>Mobile Applications</highlight2> + </product> + + <product productId="12"> + <name>Jane Proctor</name> + <description>I've been developing mobile companion apps for the past 3 years.</description> + <price>75</price> + <image>assets/pic/jproctor.jpg</image> + <experience>6</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Video Applications</highlight1> + <highlight2>Mobile Applications</highlight2> + </product> + + <product productId="13"> + <name>Mark Fields</name> + <description>Video is my favorite thing. Mobile is also a favorite.</description> + <price>60</price> + <image>assets/pic/mfields.jpg</image> + <experience>70</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Video Applications</highlight1> + <highlight2>Mobile Applications</highlight2> + </product> + + <product productId="14"> + <name>Patricia Dempsey</name> + <description>I've been cranking out mobile apps for the past 6 years. A few have involved video as well.</description> + <price>120</price> + <image>assets/pic/pdempsey.jpg</image> + <experience>7</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Video Applications</highlight1> + <highlight2>Mobile Applications</highlight2> + </product> + + <product productId="15"> + <name>Paul Trandep</name> + <description>I've been working on a mobile app that incorporates music. It just shipped so now I'm looking for the next fun thing to work on.'</description> + <price>50</price> + <image>assets/pic/ptranep.jpg</image> + <experience>6</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Video Applications</highlight1> + <highlight2>Mobile Applications</highlight2> + </product> + + <product productId="16"> + <name>Roscoe Crawley</name> + <description>My main specialty is in BlazeDS connected to Flex.</description> + <price>59</price> + <image>assets/pic/rcrawley.jpg</image> + <experience>9</experience> + <blazeds>true</blazeds> + <mobile>false</mobile> + <video>false</video> + <highlight1>BlazeDS</highlight1> + <highlight2>Remote Object</highlight2> + </product> + + <product productId="17"> + <name>Renee Dreifus</name> + <description>I can do it all: BlazeDS, Mobile, Video.</description> + <price>79</price> + <image>assets/pic/rdreifus.jpg</image> + <experience>90</experience> + <blazeds>true</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Video Applications</highlight1> + <highlight2>Mobile Applications</highlight2> + </product> + + <product productId="18"> + <name>Tina Wong</name> + <description>I've been developing Flex apps since 1.5. Most of my recent work has been on mobile apps.</description> + <price>109</price> + <image>assets/pic/twong.jpg</image> + <experience>9</experience> + <blazeds>false</blazeds> + <mobile>true</mobile> + <video>true</video> + <highlight1>Video Applications</highlight1> + <highlight2>Mobile Applications</highlight2> + </product> + +</catalog> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/main.css ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/main.css b/examples/flexjs/FlexJSStore/src/main.css new file mode 100755 index 0000000..0787a24 --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/main.css @@ -0,0 +1,100 @@ +/* +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// +*/ + +@namespace basic "library://ns.apache.org/flexjs/basic"; + +/* +//---------------------------- +// Global styles +//---------------------------- +*/ +.global { + IStatesImpl: ClassReference("org.apache.flex.core.StatesWithTransitionsImpl"); + color: #170505; + fillAlphas: 1.00, 1.00; /* last pair are for OVER state */ + fillColors: #FFFFFF, #DDDDDD, #FFFFFF, #EEEEEE; +} + +global { + IStatesImpl: ClassReference("org.apache.flex.core.StatesWithTransitionsImpl"); +} + +/* +//---------------------------- +// Type selectors +//---------------------------- + +HRule +{ + color: #666666; +} +*/ + +/* +//---------------------------- +// Named styles +//---------------------------- +*/ +.glass { + borderColor: #767473; + fillAlphas: .60, .60, .60, .60; + fillColors: #888888, #F3F3F3, #9E9E9E, #FCFCFC; + highlightAlphas: .07, .45; +} + +.glassSlider +{ + fillAlphas: .80, .80, .80, .80; + fillColors: #F3F3F3, #BBBBBB, #FCFCFC, #CCCCCC; +} + +.listItem +{ + paddingLeft: 4; + paddingRight: 4; + horizontalGap: 5; + verticalAlign: "middle"; + backgroundColor: #FFFFFF; + backgroundAlpha: .5; + borderStyle: "outset"; +} + +basic|Container +{ + IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.BasicLayout"); +} + +.sectionHeader +{ + fontWeight: "bold"; + fontSize: 11; +} + +.homeSection +{ + cornerRadius: 4; + borderStyle: "solid"; +} + +.hoverButton +{ + height: 20px; +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/productsView/CatalogTitleButtons.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/productsView/CatalogTitleButtons.mxml b/examples/flexjs/FlexJSStore/src/productsView/CatalogTitleButtons.mxml new file mode 100755 index 0000000..77456be --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/productsView/CatalogTitleButtons.mxml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--> +<js:HContainer xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:js="library://ns.apache.org/flexjs/basic" + currentState="showFilter"> + <js:style> + <js:SimpleCSSStyles verticalAlign="middle" + paddingTop="0" + paddingBottom="0" /> + </js:style> + <js:beads> + <js:ParentDocumentBead id="pdb" /> + <js:ContainerDataBinding /> + <js:LayoutChangeNotifier watchedProperty="{viewCart.text}" initialValue="#FFFFFF" /> + </js:beads> + <fx:Script> + <![CDATA[ + [Bindable] + public var cartCount:int; + + private function rollOverLabel(event:Event):void + { + Label(event.target).className = "catalogTitleButtonHighlighted"; + } + + private function rollOutLabel(event:Event):void + { + Label(event.target).className = "catalogTitleButtonDeselected"; + } + ]]> + </fx:Script> + <fx:Binding source="ProductCatalogPanel(pdb.parentDocument).cartCount" destination="cartCount" /> + <!-- two-way binding between the states of panel title buttons and the product view state --> + <fx:Binding source="ProductsView(ProductCatalogPanel(pdb.parentDocument).pdb.parentDocument).currentState" destination="currentState" /> + <fx:Binding destination="ProductsView(ProductCatalogPanel(pdb.parentDocument).pdb.parentDocument).currentState" source="currentState" /> + + <js:Label id="findPhones" text="Find Developers" click="currentState = 'showFilter'" + className.showFilter="catalogTitleButtonSelected" + className.showCart="catalogTitleButtonDeselected" + rollOver.showCart="rollOverLabel(event)" + rollOut.showCart="rollOutLabel(event)"/> + <js:VRule height="{findPhones.height * .75}" alpha=".75" style="color:#333333" /> + <js:Label id="viewCart" text="View Cart ({cartCount} items)" click="currentState = 'showCart'" + className.showFilter="catalogTitleButtonDeselected" + className.showCart="catalogTitleButtonSelected" + rollOver.showFilter="rollOverLabel(event)" + rollOut.showFilter="rollOutLabel(event)"/> + + <js:states> + <js:State name="showFilter" /> + <js:State name="showCart" /> + </js:states> +</js:HContainer> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/productsView/Grip.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/productsView/Grip.mxml b/examples/flexjs/FlexJSStore/src/productsView/Grip.mxml new file mode 100755 index 0000000..281c572 --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/productsView/Grip.mxml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--> +<js:Container xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:js="library://ns.apache.org/flexjs/basic" + width="17" height="100%" > + <js:style> + <js:SimpleCSSStyles paddingTop="10" /> + </js:style> + + <fx:Script> + <![CDATA[ + [Bindable] + public var gripTip:String; + + [Bindable] + public var gripIcon:String; + ]]> + </fx:Script> + <js:beads> + <js:ContainerDataBinding /> + <js:OneFlexibleChildVerticalLayout flexibleChild="grip" /> + </js:beads> + + <js:Image id="icon" source="{gripIcon}" /> + <js:Image id="grip" source="assets/grip.png" > + <js:beads> + <js:ToolTipBead toolTip="{gripTip}" /> + </js:beads> + </js:Image> + +</js:Container> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d33fe63c/examples/flexjs/FlexJSStore/src/productsView/ProductCart.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/FlexJSStore/src/productsView/ProductCart.mxml b/examples/flexjs/FlexJSStore/src/productsView/ProductCart.mxml new file mode 100755 index 0000000..830bf21 --- /dev/null +++ b/examples/flexjs/FlexJSStore/src/productsView/ProductCart.mxml @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--> +<js:Container xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:js="library://ns.apache.org/flexjs/basic" + xmlns:productsView="productsView.*" + > + <js:style> + <js:SimpleCSSStyles + paddingTop="8" + paddingBottom="8" + paddingRight="4" + paddingLeft="4" /> + </js:style> + <js:beads> + <js:ContainerDataBinding /> + <js:OneFlexibleChildVerticalLayout id="flexLayout" flexibleChild="productList" /> + </js:beads> + <fx:Script> + <![CDATA[ + + import org.apache.flex.html.SimpleAlert; + + import samples.flexstore.Product; + import samples.flexstore.ProductListEvent; + + [Bindable] + public var numProducts:int=0; + + [Bindable] + private var total:Number = 0; + + private const SHIPPING:Number = 1.99; + + private function productListEventHandler(event:ProductListEvent):void + { + switch (event.type) + { + case ProductListEvent.ADD_PRODUCT: + event.product.qty = 0; + //fall through into the same logic as dup + case ProductListEvent.DUPLICATE_PRODUCT: + event.product.qty++; + //total += event.product.price; + total = total + event.product.price; + numProducts++; + break; + case ProductListEvent.PRODUCT_QTY_CHANGE: + case ProductListEvent.REMOVE_PRODUCT: + var items:Array = productList.items; + total = 0; + numProducts = 0; + for (var i:int=0; i < items.length; i++) + { + var product:Product = items[i].product; + //total += product.qty * product.price; + //numProducts += product.qty; + total = total + product.qty * product.price; + numProducts = numProducts + product.qty; + } + break; + default: + break; + } + } + + ]]> + </fx:Script> + <fx:Declarations> + <js:CurrencyFormatter currencySymbol="$" id="cf" fractionalDigits="2"/> + </fx:Declarations> + + <js:Label width="100%" text="Your Shopping Cart" className="sectionHeader"/> + + <productsView:ProductList id="productList" width="100%" + newItemStartX="-100" newItemStartY="-100" + addProduct="productListEventHandler(event)" + duplicateProduct="productListEventHandler(event)" + productQtyChange="productListEventHandler(event)" + removeProduct="productListEventHandler(event)" + showQuantity="true" /> + + <js:Container style="right:0" id="totalContainer"> + <js:beads> + <js:VerticalColumnLayout numColumns="2" /> + </js:beads> + <js:Label text="Total:" /> + <js:Label width="70" text="{cf.format(total)}" id="lblTotal" style="textAlign:'right'"/> + + <js:Label text="Service Fee:" /> + <js:Label width="70" text="{cf.format(numProducts * SHIPPING)}" id="lblFee" style="textAlign:'right'"/> + + <js:Label text="Grand Total:" style="fontWeight:'bold'" /> + <js:Label width="70" text="{cf.format(total + (numProducts * SHIPPING))}" id="lblGrandTotal" style="textAlign:'right'"/> + + </js:Container> + + <js:TextButton text="Submit Order" click="SimpleAlert.show('This feature is not implemented in this sample', 'Submit Order')" + style="right:0"/> + +</js:Container>
