Add separate Tab for Menu - move menu from Others Tab

Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/084232f1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/084232f1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/084232f1

Branch: refs/heads/feature/fontawesome
Commit: 084232f13fb5c1ff51dd28bf9d54bcecc39c67f9
Parents: f57712e
Author: piotrz <pio...@apache.org>
Authored: Mon Jan 2 09:33:05 2017 +0100
Committer: piotrz <pio...@apache.org>
Committed: Mon Jan 2 09:33:05 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/MainNavigation.mxml           | 24 ++---------
 .../flexjs/MDLExample/src/main/flex/Menus.mxml  | 45 ++++++++++++++++++++
 2 files changed, 48 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/084232f1/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml 
b/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
index 5527d73..ee1a583 100644
--- a/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
@@ -23,10 +23,6 @@ limitations under the License.
                       xmlns:mdl="library://ns.apache.org/flexjs/mdl"
                       xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:models="models.*"
                       fixedHeader="true">
-    <mdl:model>
-        <models:MenuModel id="menuModel"/>
-    </mdl:model>
-
     <mdl:Header>
         <mdl:HeaderRow>
             <mdl:LayoutTitle text="FlexJS Material Design Layout"/>
@@ -50,6 +46,7 @@ limitations under the License.
             <mdl:TabBarButton text="Toggles" href="#toggles_panel"/>
             <mdl:TabBarButton text="Lists" href="#lists_panel"/>
             <mdl:TabBarButton text="Loading" href="#loading_panel"/>
+            <mdl:TabBarButton text="Menu" href="#menus_panel"/>
             <mdl:TabBarButton text="Other" href="#others_panel"/>
         </mdl:TabBar>
     </mdl:Header>
@@ -92,6 +89,8 @@ limitations under the License.
 
         <local:Loading id="loading_panel"/>
 
+        <local:Menus id="menus_panel"/>
+
         <mdl:TabBarPanel id="others_panel">
             
             <js:Div text="account_box" className="material-icons" 
style="color: rgba(0, 0, 0, 0.24);">
@@ -117,23 +116,6 @@ limitations under the License.
                     <mdl:Badge dataBadge="1"/>
                 </js:beads>
             </js:A>
-
-            <mdl:Button id="menu_btn" icon="true">
-                <mdl:materialIcon>
-                    <mdl:MaterialIconMoreVert/>
-                </mdl:materialIcon>
-            </mdl:Button>
-            
-            <mdl:Menu dataMdlFor="menu_btn" ripple="true" bottom="true" 
left="false"
-                      labelField="label" className="customMenuItemRenderer">
-                <mdl:beads>
-                    <js:ConstantBinding
-                            sourceID="menuModel"
-                            sourcePropertyName="menuItems"
-                            destinationPropertyName="dataProvider" />
-                </mdl:beads>
-            </mdl:Menu>
-            
         </mdl:TabBarPanel>
         
     </mdl:NavigationLayoutContent>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/084232f1/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Menus.mxml 
b/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
new file mode 100644
index 0000000..50e9735
--- /dev/null
+++ b/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+
+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.
+
+-->
+<mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009";
+                 xmlns:mdl="library://ns.apache.org/flexjs/mdl"
+                 xmlns:js="library://ns.apache.org/flexjs/basic"
+                 xmlns:models="models.*">
+    <mdl:model>
+        <models:MenuModel id="menuModel"/>
+    </mdl:model>
+
+    <mdl:Grid width="100">
+        <mdl:Button id="menu_btn" icon="true">
+            <mdl:materialIcon>
+                <mdl:MaterialIconMoreVert/>
+            </mdl:materialIcon>
+        </mdl:Button>
+
+        <mdl:Menu dataMdlFor="menu_btn" ripple="true" bottom="true" 
left="false"
+                  labelField="label" className="customMenuItemRenderer">
+            <mdl:beads>
+                <js:ConstantBinding
+                        sourceID="menuModel"
+                        sourcePropertyName="menuItems"
+                        destinationPropertyName="dataProvider" />
+            </mdl:beads>
+        </mdl:Menu>
+    </mdl:Grid>
+</mdl:TabBarPanel>

Reply via email to