You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2015/01/14 21:23:04 UTC
[2/3] git commit: [flex-asjs] [refs/heads/develop] - Created
FlexJSStore_jquery example.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2bd7d1e8/examples/FlexJSStore_jquery/src/beige.css
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/beige.css b/examples/FlexJSStore_jquery/src/beige.css
new file mode 100755
index 0000000..764b49c
--- /dev/null
+++ b/examples/FlexJSStore_jquery/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/2bd7d1e8/examples/FlexJSStore_jquery/src/blue.css
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/blue.css b/examples/FlexJSStore_jquery/src/blue.css
new file mode 100755
index 0000000..58e98cd
--- /dev/null
+++ b/examples/FlexJSStore_jquery/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/2bd7d1e8/examples/FlexJSStore_jquery/src/data/catalog.json
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/data/catalog.json b/examples/FlexJSStore_jquery/src/data/catalog.json
new file mode 100755
index 0000000..89bdd43
--- /dev/null
+++ b/examples/FlexJSStore_jquery/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/2bd7d1e8/examples/FlexJSStore_jquery/src/data/catalog.xml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/data/catalog.xml b/examples/FlexJSStore_jquery/src/data/catalog.xml
new file mode 100755
index 0000000..423e177
--- /dev/null
+++ b/examples/FlexJSStore_jquery/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/2bd7d1e8/examples/FlexJSStore_jquery/src/main.css
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/main.css b/examples/FlexJSStore_jquery/src/main.css
new file mode 100755
index 0000000..938413e
--- /dev/null
+++ b/examples/FlexJSStore_jquery/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.NonVirtualBasicLayout");
+}
+
+.sectionHeader
+{
+ fontWeight: "bold";
+ fontSize: 11;
+}
+
+.homeSection
+{
+ cornerRadius: 4;
+ borderStyle: "solid";
+}
+
+.hoverButton
+{
+ height: 20px;
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2bd7d1e8/examples/FlexJSStore_jquery/src/productsView/CatalogTitleButtons.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/productsView/CatalogTitleButtons.mxml b/examples/FlexJSStore_jquery/src/productsView/CatalogTitleButtons.mxml
new file mode 100755
index 0000000..d2cca30
--- /dev/null
+++ b/examples/FlexJSStore_jquery/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.
+
+-->
+<basic:HContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:basic="library://ns.apache.org/flexjs/basic"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ currentState="showFilter">
+ <basic:style>
+ <basic:SimpleCSSStyles verticalAlign="middle"
+ paddingTop="0"
+ paddingBottom="0" />
+ </basic:style>
+ <basic:beads>
+ <basic:ParentDocumentBead id="pdb" />
+ <basic:ContainerDataBinding />
+ </basic: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" />
+
+ <basic:Label id="findPhones" text="Find Developers" click="currentState = 'showFilter'"
+ className.showFilter="catalogTitleButtonSelected"
+ className.showCart="catalogTitleButtonDeselected"
+ rollOver.showCart="rollOverLabel(event)"
+ rollOut.showCart="rollOutLabel(event)"/>
+ <basic:HRule height="{findPhones.height * .75}" alpha=".75" style="color:#333333" />
+ <basic: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)"/>
+
+ <basic:states>
+ <mx:State name="showFilter" />
+ <mx:State name="showCart" />
+ </basic:states>
+</basic:HContainer>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2bd7d1e8/examples/FlexJSStore_jquery/src/productsView/Grip.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/productsView/Grip.mxml b/examples/FlexJSStore_jquery/src/productsView/Grip.mxml
new file mode 100755
index 0000000..127c764
--- /dev/null
+++ b/examples/FlexJSStore_jquery/src/productsView/Grip.mxml
@@ -0,0 +1,49 @@
+<?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.
+
+-->
+<basic:VContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:basic="library://ns.apache.org/flexjs/basic"
+ xmlns:mx="library://ns.adobe.com/flex/mx" width="17" height="100%" >
+ <basic:style>
+ <basic:SimpleCSSStyles paddingTop="10" horizontalAlign="center" />
+ </basic:style>
+
+ <fx:Script>
+ <![CDATA[
+ [Bindable]
+ public var gripTip:String;
+
+ [Bindable]
+ public var gripIcon:String;
+ ]]>
+ </fx:Script>
+ <basic:beads>
+ <basic:ContainerDataBinding />
+ <basic:LayoutChangeNotifier watchedProperty="{icon.height}" initialValue="0" />
+ <basic:LayoutChangeNotifier watchedProperty="{grip.height}" initialValue="0" />
+ </basic:beads>
+
+ <basic:Image id="icon" source="{gripIcon}" />
+ <basic:Image id="grip" source="assets/grip.png" >
+ <basic:beads>
+ <basic:ToolTipBead toolTip="{gripTip}" />
+ </basic:beads>
+ </basic:Image>
+
+</basic:VContainer>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2bd7d1e8/examples/FlexJSStore_jquery/src/productsView/ProductCart.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/productsView/ProductCart.mxml b/examples/FlexJSStore_jquery/src/productsView/ProductCart.mxml
new file mode 100755
index 0000000..40555d9
--- /dev/null
+++ b/examples/FlexJSStore_jquery/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.
+
+-->
+<basic:Container xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:basic="library://ns.apache.org/flexjs/basic"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:productsView="productsView.*"
+ >
+ <basic:style>
+ <basic:SimpleCSSStyles horizontalAlign="right"
+ paddingTop="8"
+ paddingBottom="8"
+ paddingRight="4"
+ paddingLeft="4" />
+ </basic:style>
+ <basic:beads>
+ <basic:ContainerDataBinding />
+ <basic:OneFlexibleChildVerticalLayout id="flexLayout" flexibleChild="{productList}" />
+ </basic: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>
+ <basic:CurrencyFormatter currencySymbol="$" id="cf" fractionalDigits="2"/>
+ </fx:Declarations>
+
+ <basic: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" />
+
+ <basic:Container style="paddingRight:0" width="100%">
+ <basic:beads>
+ <basic:VerticalColumnLayout numColumns="2" />
+ </basic:beads>
+ <basic:Label text="Total:" width="100%" />
+ <basic:Label width="70" text="{cf.format(total)}" id="lblTotal" style="textAlign:'right'"/>
+
+ <basic:Label text="Service Fee:" width="100%" />
+ <basic:Label width="70" text="{cf.format(numProducts * SHIPPING)}" id="lblFee" style="textAlign:'right'"/>
+
+ <basic:Label text="Grand Total:" style="fontWeight:'bold'" width="100%" />
+ <basic:Label width="70" text="{cf.format(total + (numProducts * SHIPPING))}" id="lblGrandTotal" style="textAlign:'right'"/>
+
+ </basic:Container>
+
+ <basic:TextButton text="Submit Order" click="SimpleAlert.show('This feature is not implemented in this sample', 'Submit Order')"/>
+
+</basic:Container>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2bd7d1e8/examples/FlexJSStore_jquery/src/productsView/ProductCatalogPanel.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/productsView/ProductCatalogPanel.mxml b/examples/FlexJSStore_jquery/src/productsView/ProductCatalogPanel.mxml
new file mode 100755
index 0000000..e944e9b
--- /dev/null
+++ b/examples/FlexJSStore_jquery/src/productsView/ProductCatalogPanel.mxml
@@ -0,0 +1,548 @@
+<?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.
+
+-->
+<basic:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:basic="library://ns.apache.org/flexjs/basic"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ implements="org.apache.flex.core.IDragInitiator"
+ xmlns:productsView="productsView.*"
+ currentState="browse"
+ title.browse="Browse"
+ title.compare="Product Comparison"
+ title.details="Product Details"
+ className="catalogPanel"
+ >
+
+ <fx:Metadata>
+ [Event(name="purchase", type="samples.flexstore.ProductThumbEvent")]
+ [Event(name="compare", type="samples.flexstore.ProductThumbEvent")]
+ [Event(name="details", type="samples.flexstore.ProductThumbEvent")]
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.effects.Effect;
+ import org.apache.flex.effects.Fade;
+ import org.apache.flex.effects.Move;
+ import org.apache.flex.effects.Parallel;
+ import org.apache.flex.effects.Tween;
+ import org.apache.flex.events.DragEvent;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.net.dataConverters.LazyCollection;
+
+ import samples.flexstore.Product;
+ import samples.flexstore.ProductFilter;
+ import samples.flexstore.ProductFilterEvent;
+ import samples.flexstore.ProductThumbEvent;
+
+
+ private var accepted:Object = new Object();
+ private var thumbnails:Array;
+ private var filterCount:int;
+ private var thumbnailState:String = 'browse'; //either 'browse' or 'compare'
+
+ [Bindable]
+ public var cartCount:int;
+
+ //-----------------------------
+ // catalog
+ //-----------------------------
+
+ private var _catalog:LazyCollection;
+
+ [Bindable]
+ public function set catalog(c:LazyCollection):void
+ {
+ _catalog = c;
+ createThumbnails();
+ }
+
+ public function get catalog():LazyCollection
+ {
+ return _catalog;
+ }
+
+ //----------------------------------------------------------------------
+ // methods
+ //----------------------------------------------------------------------
+
+ private function createThumbnails():void
+ {
+ var i:int; //variables are hoisted up in scope so declare here to avoid warning
+ if (thumbnails != null)
+ {
+ for (i=0; i < thumbnails.length; i++)
+ {
+ thumbContent.removeElement(thumbnails[i]);
+ }
+ }
+
+ var row:int = 0;
+ var col:int = -1;
+ var n:int = catalog.length;
+ thumbnails = new Array(n);
+ filterCount = n;
+
+ for (i=0; i < n; i++)
+ {
+ var thumb:ProductCatalogThumbnail = new ProductCatalogThumbnail();
+ thumb.x = 0;
+ thumb.y = 0;
+ thumbnails[i] = thumb;
+ // thumbnails[i].showInAutomationHierarchy = true;
+ thumb.product = catalog.getItemAt(i) as Product;
+ accepted[thumb.product.productId.toString()] = true;
+ thumbContent.addElement(thumb);
+ thumb.addEventListener(ProductThumbEvent.PURCHASE, productThumbEventHandler);
+ thumb.addEventListener(ProductThumbEvent.COMPARE, productThumbEventHandler);
+ thumb.addEventListener(ProductThumbEvent.DETAILS, productThumbEventHandler);
+ thumb.addEventListener(DragEvent.DRAG_START,thumbDragStartHandler);
+ }
+
+ var lastMove:Effect = layoutCatalog();
+ if (lastMove)
+ {
+ lastMove.addEventListener(Tween.TWEEN_UPDATE, updateLayout);
+ lastMove.addEventListener(Tween.TWEEN_END, updateLayout);
+ }
+ }
+
+ private function updateLayout(event:org.apache.flex.events.Event):void
+ {
+ thumbContentGroup.dispatchEvent(new org.apache.flex.events.Event("layoutNeeded"));
+ }
+
+ private function thumbDragStartHandler(event:MouseEvent):void
+ {
+ if (DragMouseController.dragging == false)
+ {
+ var thumb:ProductCatalogThumbnail = event.target as ProductCatalogThumbnail;
+ DragEvent.dragSource = thumb.product;
+
+ var di:ProductCatalogThumbnail = new ProductCatalogThumbnail();
+ di.product = thumb.product;
+ di.currentState = thumb.currentState;
+ DragMouseController.dragImage = di;
+
+ DragEvent.dragInitiator = this;
+ }
+ }
+
+ public function filter(productFilter:ProductFilter, live:Boolean):void
+ {
+ currentState = "browse";
+ thumbnailState = "browse";
+ var count:int=0;
+ var n:int = thumbnails.length;
+ var targets:Array = [];
+ for (var i:int = 0; i < n; i++)
+ {
+ var thumb:ProductCatalogThumbnail = thumbnails[i];
+ var product:Product = thumb.product;
+ if (productFilter.accept(product))
+ {
+ accepted[product.productId.toString()] = true;
+ thumb.alpha = 1;
+ count++;
+ }
+ else
+ {
+ accepted[product.productId.toString()] = false;
+ if (live)
+ {
+ thumb.alpha = .1;
+ }
+ else if (thumb.alpha == 1) //only fade if we hadn't started
+ {
+ targets.push(thumb);
+ }
+ }
+ }
+ productFilter.count = count;
+ filterCount = count;
+
+ if (targets.length > 0)
+ {
+ var p:Parallel = new Parallel();
+ n = targets.length;
+ for (i = 0; i < n; i++)
+ {
+ var fadeOut:Fade = new Fade(targets[i] as IUIBase);
+ fadeOut.alphaFrom = 1;
+ fadeOut.alphaTo = .1;
+ p.addChild(fadeOut);
+ }
+ p.play();
+ p.addEventListener(Effect.EFFECT_END,
+ function(event:org.apache.flex.events.Event):void
+ {
+ layoutCatalog();
+ });
+ }
+ else if (!live)
+ {
+ layoutCatalog();
+ }
+ }
+
+ private function layoutCatalog():Effect
+ {
+ var tileWidth:Number;
+ var tileHeight:Number;
+ var numCols:int;
+
+ if (filterCount > 9 || currentState == "compare")
+ {
+ numCols = 4;
+ tileWidth = ProductCatalogThumbnail.COL_WIDTH_4;
+ tileWidth = currentState == "compare"
+ ? ProductCatalogThumbnail.COMPARE_WIDTH
+ : ProductCatalogThumbnail.COL_WIDTH_4
+ tileHeight = currentState == "compare"
+ ? height - 4
+ : ProductCatalogThumbnail.COL_HEIGHT_4;
+ }
+ else if (filterCount > 4)
+ {
+ numCols = 3;
+ tileWidth = ProductCatalogThumbnail.COL_WIDTH_3;
+ tileHeight = ProductCatalogThumbnail.COL_HEIGHT_3;
+ }
+ else if (filterCount <= 9)
+ {
+ numCols = 2;
+ tileWidth = ProductCatalogThumbnail.COL_WIDTH_2;
+ tileHeight = ProductCatalogThumbnail.COL_HEIGHT_2;
+ }
+ else
+ {
+ }
+
+ var row:int = 0;
+ var col:int = -1;
+
+ var move:Move = null;
+
+ var n:int = catalog.length;
+ for (var i:int = 0 ; i < n ; i++)
+ {
+ var product:Product = catalog.getItemAt(i) as Product;
+ var thumb:ProductCatalogThumbnail = thumbnails[i];
+ if (accepted[product.productId.toString()])
+ {
+ thumb.currentState = "x" + numCols + "cols";
+ col++;
+ if (col > numCols - 1)
+ {
+ row++;
+ col = 0;
+ }
+
+ var xTo:Number = col * (tileWidth + ProductCatalogThumbnail.HORIZONTAL_GAP);
+ var yTo:Number = row * (tileHeight + ProductCatalogThumbnail.VERTICAL_GAP);
+
+ // If the thumbnail is already visible
+ // animate it to its new position.
+ if (thumb.visible)
+ {
+ // Animate only if the position is different
+ // from its current position.
+ if (thumb.x != xTo || thumb.y != yTo)
+ {
+ move = new Move(thumb);
+ move.xTo = xTo;
+ move.yTo = yTo;
+ move.play();
+ }
+ }
+
+ // If the thumbnail was not previously visible, sets its
+ // x and y coordinates. We'll make it reappear after all
+ // the visible thumbnails have reached their new position.
+ else
+ {
+ thumb.x = xTo;
+ thumb.y = yTo;
+// thumb.includeInLayout = true;
+ }
+ }
+ else
+ {
+ thumb.visible = false;
+// thumb.includeInLayout = false;
+ }
+ }
+
+ if (!move)
+ {
+ // No visible thumbnails were animated to a new position;
+ // fade in newly selected thumbnails right away.
+ fadeInThumbnails();
+ }
+ else
+ {
+ //since movement is happening get the scrollbar back to the top
+ scv.verticalScrollPosition = 0;
+ // Fade in newly selected thumbnails after the last
+ // visible thumbnail has moved to its new position.
+ move.addEventListener(Effect.EFFECT_END,
+ function(event:org.apache.flex.events.Event):void
+ {
+ fadeInThumbnails();
+ });
+ }
+ thumbContentGroup.dispatchEvent(new org.apache.flex.events.Event("layoutNeeded"));
+ //return the last move to watch
+ return move;
+ }
+
+ //return the last effect so we could add effectEnd handler if desired
+ private function fadeInThumbnails():void
+ {
+ var n:int = thumbnails.length;
+ var targets:Array = [];
+ for (var i:int = 0; i < n ; i++)
+ {
+ var thumb:ProductCatalogThumbnail = thumbnails[i];
+ if (accepted[thumb.product.productId.toString()] && !thumb.visible)
+ {
+ thumb.alpha = 0;
+ thumb.visible = true;
+ targets.push(thumb);
+ }
+ }
+ if (targets.length > 0)
+ {
+ n = targets.length;
+ for (i = 0; i < n; i++)
+ {
+ var effect:Fade = new Fade(targets[i] as IUIBase);
+ effect.alphaTo = 1;
+ effect.play();
+ }
+ }
+ }
+
+ private function showDetails(product:Product):void
+ {
+ if (currentState == "details")
+ {
+ details.product = product;
+ return;
+ }
+
+ var row:int = -1;
+
+ //should be computed using border metrics instead of hard-coding the 20, but...
+ var xTo:Number = thumbContent.width - ProductCatalogThumbnail.COL_WIDTH_4 - 20;
+ var yTo:Number;
+
+ var move:Move;
+ var first:Boolean = true;
+ var selectedThumb:ProductCatalogThumbnail;
+
+ var n:int = thumbnails.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var thumb:ProductCatalogThumbnail = thumbnails[i];
+ if (thumb.visible)
+ {
+ row++;
+ yTo = row * (ProductCatalogThumbnail.COL_HEIGHT_4 + ProductCatalogThumbnail.VERTICAL_GAP);
+
+ thumb.currentState = "x4cols";
+
+ if (thumb.x != xTo || thumb.y != yTo)
+ {
+ move = new Move(thumb);
+ if (first)
+ {
+ move.addEventListener(Effect.EFFECT_END,
+ function(event:org.apache.flex.events.Event):void
+ {
+ details.product = product;
+ currentState = "details";
+ });
+
+ first = false;
+ }
+ move.xTo = xTo;
+ move.yTo = yTo;
+ move.play();
+ }
+
+ if (thumb.product == product)
+ {
+ selectedThumb = thumb;
+ }
+ }
+ }
+ if (selectedThumb != null)
+ {
+ //make sure that the selected thumb is visible in the list on the right
+ move.addEventListener(Effect.EFFECT_END,
+ function(e:org.apache.flex.events.Event):void
+ {
+ var curpos:int = scv.verticalScrollPosition;
+ if (selectedThumb.y < curpos)
+ {
+ scv.verticalScrollPosition = y;
+ }
+ else if (selectedThumb.y + ProductCatalogThumbnail.COL_HEIGHT_4 > curpos + thumbContent.height)
+ {
+ //this logic doesn't seem to be perfect but it will do
+ var diff:int = selectedThumb.y - (curpos + thumbContent.height)
+ scv.verticalScrollPosition += diff + ProductCatalogThumbnail.COL_HEIGHT_4 + ProductCatalogThumbnail.VERTICAL_GAP;
+ }
+ });
+ }
+
+ }
+
+ private function productThumbEventHandler(event:ProductThumbEvent):void
+ {
+ if (event.type == ProductThumbEvent.DETAILS)
+ {
+ showDetails(event.product);
+ }
+ else if (event.type == ProductThumbEvent.BROWSE)
+ {
+ if (thumbnailState == "browse")
+ {
+ currentState = "browse";
+ layoutCatalog();
+ }
+ else
+ {
+ compare();
+ }
+ }
+ else
+ {
+ dispatchEvent(event);
+ }
+ }
+
+ public function compare(toCompare:Array=null):void
+ {
+ currentState = "compare";
+ thumbnailState = "compare";
+ if (toCompare != null)
+ {
+ var n:int = thumbnails.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ accepted[thumbnails[i].product.productId.toString()] = false;
+ }
+ for (i=0; i < toCompare.length; i++)
+ {
+ accepted[toCompare[i].productId.toString()] = true;
+ }
+ }
+ var lastEffect:Effect = layoutCatalog();
+ if (lastEffect != null)
+ {
+ lastEffect.addEventListener(Effect.EFFECT_END,
+ function (event:org.apache.flex.events.Event):void
+ {
+ setCompareState();
+ });
+ }
+ else
+ {
+ setCompareState();
+ }
+ }
+
+ private function setCompareState():void
+ {
+ //avoid an issue if the user clicks quickly where we move into
+ //compare state even though we're no longer in compare
+ if (currentState == "compare")
+ {
+ var n:int = thumbnails.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var thumb:ProductCatalogThumbnail = thumbnails[i];
+ if (accepted[thumb.product.productId.toString()])
+ {
+ thumb.currentState = "compare";
+ }
+ }
+
+ }
+ }
+
+ public function acceptingDrop(dropTarget:Object, type:String):void
+ {
+
+ }
+
+ public function acceptedDrop(dropTarget:Object, type:String):void
+ {
+
+ }
+
+ ]]>
+ </fx:Script>
+
+ <basic:beads>
+ <basic:ContainerDataBinding />
+ <basic:NonVirtualVerticalLayout />
+ <basic:DragMouseController id="dragger" />
+ <basic:ParentDocumentBead id="pdb" />
+ <basic:PanelView>
+ <basic:titleBar>
+ <basic:TitleBar>
+ <basic:style>
+ <basic:SimpleCSSStyles backgroundColor="0xA65904" />
+ </basic:style>
+ <basic:beads>
+ <productsView:ProductCatalogPanelTitleBarView />
+ </basic:beads>
+ </basic:TitleBar>
+ </basic:titleBar>
+ </basic:PanelView>
+ </basic:beads>
+ <basic:Container width="100%" height="100%">
+ <basic:Container id="thumbContentGroup" width="100%" height="100%">
+ <basic:beads>
+ <basic:ScrollingContainerView id="scv" />
+ <basic:NonVirtualBasicScrollingLayout />
+ </basic:beads>
+ <basic:Container id="thumbContent" width="100%" height="100%" />
+ </basic:Container>
+ <productsView:ProductDetails id="details"
+ width="{ProductCatalogThumbnail.COL_WIDTH_4 * 3}"
+ height="100%"
+ visible="false"
+ visible.details="true"
+ compare="productThumbEventHandler(event)"
+ purchase="productThumbEventHandler(event)"
+ browse="productThumbEventHandler(event)" />
+ </basic:Container>
+
+ <basic:states>
+ <mx:State name="browse" />
+ <mx:State name="compare" />
+ <mx:State name="details" />
+ </basic:states>
+
+</basic:Panel>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2bd7d1e8/examples/FlexJSStore_jquery/src/productsView/ProductCatalogPanelTitleBarView.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/productsView/ProductCatalogPanelTitleBarView.mxml b/examples/FlexJSStore_jquery/src/productsView/ProductCatalogPanelTitleBarView.mxml
new file mode 100755
index 0000000..004dc1c
--- /dev/null
+++ b/examples/FlexJSStore_jquery/src/productsView/ProductCatalogPanelTitleBarView.mxml
@@ -0,0 +1,50 @@
+<?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.
+
+-->
+<basic:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:basic="library://ns.apache.org/flexjs/basic"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:productsView="productsView.*"
+ >
+ <fx:Script>
+ <![CDATA[
+ import org.apache.flex.html.TitleBar;
+ import org.apache.flex.core.ITitleBarModel;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.Event;
+
+ private function clickHandler():void
+ {
+ var newEvent:org.apache.flex.events.Event = new org.apache.flex.events.Event('close',true);
+ UIBase(_strand).dispatchEvent(newEvent)
+ }
+ ]]>
+ </fx:Script>
+ <basic:beads>
+ <basic:MXMLBeadViewBaseDataBinding />
+ <basic:ParentDocumentBead id="pdb" />
+ <basic:LayoutChangeNotifier watchedProperty="{titleLabel.height}" />
+ </basic:beads>
+ <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}"
+ />
+ <basic:CloseButton id="closeButton" click="clickHandler()"
+ visible="{ITitleBarModel(model).showCloseButton}";
+ />
+ <productsView:CatalogTitleButtons />
+</basic:MXMLBeadViewBase>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2bd7d1e8/examples/FlexJSStore_jquery/src/productsView/ProductCatalogThumbnail.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/productsView/ProductCatalogThumbnail.mxml b/examples/FlexJSStore_jquery/src/productsView/ProductCatalogThumbnail.mxml
new file mode 100755
index 0000000..f7a0ea4
--- /dev/null
+++ b/examples/FlexJSStore_jquery/src/productsView/ProductCatalogThumbnail.mxml
@@ -0,0 +1,221 @@
+<?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.
+
+-->
+<basic:Container xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:basic="library://ns.apache.org/flexjs/basic"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ width="{COL_WIDTH_4}" height="{COL_HEIGHT_4}" height.compare="502"
+ width.x4cols="{COL_WIDTH_4}" height.x4cols="{COL_HEIGHT_4}"
+ width.x3cols="{COL_WIDTH_3}" height.x3cols="{COL_HEIGHT_3}"
+ width.x2cols="{COL_WIDTH_2}" height.x2cols="{COL_HEIGHT_2}"
+ rollOver="rollOverHandler(event)"
+ rollOut="rollOutHandler(event)"
+ mouseDown="mouseDownHandler(event)"
+ mouseMove="mouseMoveHandler(event)"
+ mouseUp="mouseUpHandler(event)"
+ click="clickHandler(event)"
+ currentState="x4cols"
+ >
+ <!-- automationName="{product.name}" -->
+ <basic:beads>
+ <basic:ContainerDataBinding />
+ <basic:LayoutChangeNotifier watchedProperty="{borderStyles.borderColor}" initialValue="#FFFFFF" />
+ </basic:beads>
+ <basic:style>
+ <basic:BindableCSSStyles id="borderStyles" borderStyle="solid"
+ borderColor="#FFFFFF" backgroundColor="#FFFFFF"/>
+ </basic:style>
+ <fx:Metadata>
+ [Event(name="purchase", type="samples.flexstore.ProductThumbEvent")]
+ [Event(name="compare", type="samples.flexstore.ProductThumbEvent")]
+ [Event(name="details", type="samples.flexstore.ProductThumbEvent")]
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+
+ import org.apache.flex.events.*;
+ import org.apache.flex.utils.PointUtils;
+
+ import samples.flexstore.Product;
+ import samples.flexstore.ProductThumbEvent;
+
+ public static const COL_WIDTH_4:int = 162;
+ public static const COL_HEIGHT_4:int = 122;
+ public static const COL_WIDTH_3:int = 217;
+ public static const COL_HEIGHT_3:int = 165;
+ public static const COL_WIDTH_2:int = 327;
+ public static const COL_HEIGHT_2:int = 250;
+ public static const COMPARE_WIDTH:int = 162;
+ public static const HORIZONTAL_GAP:int = 2;
+ public static const VERTICAL_GAP:int = 3;
+
+ [Bindable]
+ public var product:Product;
+
+ private function rollOverHandler(event:MouseEvent):void
+ {
+ borderStyles.borderColor = "#CCCCCC";
+ //style["dropShadowEnabled"] = true;
+ buttons.visible = true;
+ }
+
+ private function rollOutHandler(event:MouseEvent):void
+ {
+ borderStyles.borderColor = "#FFFFFF";
+ //style["dropShadowEnabled"] = false;
+ buttons.visible = false;
+ }
+
+ private var dragStartPoint:Point;
+
+ public function mouseDownHandler(event:MouseEvent):void
+ {
+ if (event.target != purchase &&
+ event.target != compare &&
+ event.target != details)
+ {
+ dragStartPoint = new Point(event.clientX, event.clientY);
+ }
+ }
+
+ public function mouseMoveHandler(event:MouseEvent):void
+ {
+ if (dragStartPoint != null)
+ {
+ var dragEvent:DragEvent = new DragEvent(DragEvent.DRAG_START, true);
+ dragEvent.clientX = dragStartPoint.x;
+ dragEvent.clientY = dragStartPoint.y;
+ dragEvent.buttonDown = true;
+ dispatchEvent(dragEvent);
+
+ rollOutHandler(event);
+
+ dragStartPoint = null;
+ }
+ }
+
+ public function mouseUpHandler(event:MouseEvent):void
+ {
+ if (dragStartPoint != null)
+ {
+ dragStartPoint = null;
+ }
+ }
+
+ public function clickHandler(event:org.apache.flex.events.Event):void
+ {
+ if (event.target != purchase &&
+ event.target != compare &&
+ event.target != details)
+ {
+ dispatchEvent(new ProductThumbEvent(ProductThumbEvent.DETAILS, product));
+ }
+ }
+
+ ]]>
+ </fx:Script>
+ <fx:Declarations>
+ <basic:CurrencyFormatter currencySymbol="$" id="cf" fractionalDigits="2"/>
+ </fx:Declarations>
+
+ <basic:VContainer id="vb" width="100%" height="100%">
+ <basic:style>
+ <basic:SimpleCSSStyles paddingLeft="6" paddingTop="4" paddingRight="8" paddingBottom="4" />
+ <!-- gap="0"> -->
+ </basic:style>
+
+
+ <basic:Label text="{product.name}" style="fontWeight:bold"/>
+
+ <basic:HContainer width="100%" >
+ <basic:style>
+ <basic:SimpleCSSStyles paddingTop="0" /> <!-- gap="4 -->"
+ </basic:style>
+
+ <basic:Image id="img" height="45" width="45"
+ width.x3cols="60" height.x3cols="60"
+ width.x2cols="60" height.x2cols="60"
+ source="{product.image}" />
+
+ <basic:VContainer id="descr" height="100%" >
+ <basic:style>
+ <basic:SimpleCSSStyles paddingTop="0" right="0" /> <!-- gap="0" -->
+ </basic:style>
+ <basic:Label text="{product.featureString}" width="60" height="48" />
+ <basic:Label text="{cf.format(product.price)}" style="fontWeight:bold"/>
+ <basic:Spacer height="4"/>
+ <basic:Label text="{product.highlight1}" style="color:#EE8D0C" includeIn="x3cols, x2cols"/>
+ <basic:Label text="{product.highlight2}" style="color:#EE8D0C" includeIn="x3cols, x2cols"/>
+ </basic:VContainer>
+
+ </basic:HContainer>
+
+ <basic:Spacer height="8"/>
+
+ <basic:Label id="compYears" text="Years: {product.experience}" includeIn="compare"/>
+ <basic:Label id="compBlaze" text="BlazeDS: {product.blazeds}" includeIn="compare"/>
+ <basic:Label id="compMobile" text="Mobile: {product.mobile}" includeIn="compare"/>
+ <basic:Label id="compVideo" text="Video: {product.video}" includeIn="compare"/>
+ <basic:Label id="compHigh1" text="Highlight: {product.highlight1}" includeIn="compare"/>
+ <basic:Label id="compHigh2" text="Highlight: {product.highlight2}" includeIn="compare"/>
+ <basic:Label text="Description:" includeIn="compare"/>
+ <basic:MultilineLabel id="compDesc" text="{product.description}" width="100%" includeIn="compare"/>
+ </basic:VContainer>
+
+
+ <basic:VContainer id="buttons" visible="false" width="30">
+ <basic:style>
+ <basic:SimpleCSSStyles paddingRight="8" right="8" top="12" /> <!-- gap="4" -->
+ </basic:style>
+ <basic:ImageButton id="purchase" backgroundImage="assets/button_cart_empty.png" className="hoverButton"
+ click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.PURCHASE, product))"
+ width="30">
+ <basic:beads>
+ <basic:ToolTipBead toolTip="Add to cart"/>
+ </basic:beads>
+ </basic:ImageButton>
+ <basic:ImageButton id="compare" backgroundImage="assets/button_compare.png" className="hoverButton"
+ click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.COMPARE, product))"
+ width="30">
+ <basic:beads>
+ <basic:ToolTipBead toolTip="Add to compare list"/>
+ </basic:beads>
+ </basic:ImageButton>
+ <basic:ImageButton id="details" backgroundImage="assets/button_details.png" className="hoverButton"
+ click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.DETAILS, product))"
+ width="30">
+ <basic:beads>
+ <basic:ToolTipBead toolTip="Show details"/>
+ </basic:beads>
+ </basic:ImageButton>
+ </basic:VContainer>
+
+ <basic:states>
+
+ <mx:State name="compare" />
+
+ <mx:State name="x4cols" />
+
+ <mx:State name="x3cols" />
+
+ <mx:State name="x2cols"/>
+ </basic:states>
+
+</basic:Container>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2bd7d1e8/examples/FlexJSStore_jquery/src/productsView/ProductDetails.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore_jquery/src/productsView/ProductDetails.mxml b/examples/FlexJSStore_jquery/src/productsView/ProductDetails.mxml
new file mode 100755
index 0000000..ae128b7
--- /dev/null
+++ b/examples/FlexJSStore_jquery/src/productsView/ProductDetails.mxml
@@ -0,0 +1,153 @@
+<?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.
+
+-->
+<basic:Container xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:basic="library://ns.apache.org/flexjs/basic"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:productsView="productsView.*"
+ >
+ <basic:beads>
+ <basic:ContainerDataBinding />
+ </basic:beads>
+
+ <fx:Metadata>
+ [Event(name="purchase", type="samples.flexstore.ProductThumbEvent")]
+ [Event(name="compare", type="samples.flexstore.ProductThumbEvent")]
+ [Event(name="browse", type="samples.flexstore.ProductThumbEvent")]
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.*;
+
+ import samples.flexstore.Product;
+ import samples.flexstore.ProductThumbEvent;
+
+ private var _product:Product;
+
+ [Bindable]
+ public function get product():Product
+ {
+ return _product;
+ }
+
+ public function set product(p:Product):void
+ {
+ _product = p;
+ tn.selectedIndex = 0;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <basic:CurrencyFormatter currencySymbol="$" id="cf" fractionalDigits="2"/>
+ </fx:Declarations>
+
+ <basic:states>
+ <mx:State name="Features" />
+ <mx:State name="Support" />
+ </basic:states>
+
+ <basic:transitions>
+ <basic:Transition>
+ <basic:Fade />
+ </basic:Transition>
+ </basic:transitions>
+
+ <basic:ButtonBar id="tn" width="100%" change="currentState = tn.selectedItem as String">
+ <basic:dataProvider>
+ <fx:Array>
+ <fx:String>Features</fx:String>
+ <fx:String>Support</fx:String>
+ </fx:Array>
+ </basic:dataProvider>
+ </basic:ButtonBar>
+ <basic:Container width="100%" height="100%" >
+ <basic:style>
+ <basic:SimpleCSSStyles left="4" right="8" top="34" bottom="4" />
+ </basic:style>
+
+
+ <basic:VContainer width="100%" height="100%" includeIn="Features" >
+ <basic:style>
+ <!--<basic:SimpleCSSStyles gap="8"-->
+ <basic:SimpleCSSStyles
+ paddingLeft="8" paddingTop="8" paddingRight="8" paddingBottom="8"/>
+ </basic:style>
+ <basic:HContainer width="100%" style="gap:12">
+
+ <basic:Image id="img" width="101" height="101" source="{product.image}"/>
+
+ <basic:VContainer id="descr" width="100%" height="100%">
+ <basic:style>
+ <basic:SimpleCSSStyles paddingTop="0" />
+ <!--<basic:SimpleCSSStyles paddingTop="0" gap="4" />-->
+ </basic:style>
+
+ <basic:Label text="{product.name}" style="fontSize:11;fontWeight:'bold'"/>
+
+ <basic:Label text="{product.featureString}" width="80" height="48" />
+
+ <basic:Label text="{product.highlight1}" style="color:#EE8D0C"/>
+
+ <basic:Label text="{product.highlight2}" style="color:#EE8D0C"/>
+
+ <basic:Label text="{cf.format(product.price)}" style="fontWeight:'bold'"/>
+
+ </basic:VContainer>
+ </basic:HContainer>
+
+ <basic:Label id="descriptionText" width="100%" height="100%" text="{product.description}"/>
+
+ </basic:VContainer>
+
+ <productsView:ProductSupport width="100%" height="100%" includeIn="Support" />
+
+ </basic:Container>
+
+ <basic:VContainer>
+ <basic:beads>
+ <basic:LayoutChangeNotifier watchedProperty="{purchase.height}" initialValue="0" />
+ <basic:LayoutChangeNotifier watchedProperty="{compare.height}" initialValue="0" />
+ <basic:LayoutChangeNotifier watchedProperty="{tiles.height}" initialValue="0" />
+ </basic:beads>
+ <basic:style>
+ <basic:SimpleCSSStyles marginTop="4" right="16" top="36" />
+ </basic:style>
+ <basic:Spacer width="100%"/>
+ <basic:ImageButton id="purchase" backgroundImage="assets/button_cart_empty.png" click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.PURCHASE, product))" width="30">
+ <basic:beads>
+ <basic:ToolTipBead toolTip="Add to cart"/>
+ </basic:beads>
+ </basic:ImageButton>
+ <basic:ImageButton id="compare" backgroundImage="assets/button_compare.png" click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.COMPARE, product))" width="30">
+ <basic:beads>
+ <basic:ToolTipBead toolTip="Add to compare list"/>
+ </basic:beads>
+ </basic:ImageButton>
+ <basic:ImageButton id="tiles" backgroundImage="assets/button_tiles.png" click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.BROWSE, product));" width="30">
+ <basic:beads>
+ <basic:ToolTipBead toolTip="Back to thumbnail view"/>
+ </basic:beads>
+ </basic:ImageButton>
+ </basic:VContainer>
+
+</basic:Container>
\ No newline at end of file