flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pio...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Make one of the element disabled in menu and add divider
Date Mon, 02 Jan 2017 07:45:14 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 9888a41e5 -> e5f88f42a


Make one of the element disabled in menu and add divider


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

Branch: refs/heads/develop
Commit: e5f88f42ad041c8366ef9be338a02cc864aab739
Parents: 9888a41
Author: piotrz <piotrz@apache.org>
Authored: Mon Jan 2 08:45:09 2017 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Mon Jan 2 08:45:09 2017 +0100

----------------------------------------------------------------------
 .../flex/itemRenderers/CustomMenuItemRenderer.mxml    |  7 ++++---
 .../MDLExample/src/main/flex/models/MenuModel.as      |  4 ++--
 .../flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as | 14 +++++++++++++-
 3 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e5f88f42/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
b/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
index 3eb4636..ccbd7c7 100644
--- a/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
@@ -18,10 +18,11 @@ limitations under the License.
 
 -->
 <mdl:MenuItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
-                      xmlns:mdl="library://ns.apache.org/flexjs/mdl">
-    <!--<mdl:beads>
+                      xmlns:mdl="library://ns.apache.org/flexjs/mdl"
+                      divider="{menuItem.hasDivider}">
+    <mdl:beads>
         <mdl:Disabled disabled="{menuItem.disabled}"/>
-    </mdl:beads> -->
+    </mdl:beads>
     <fx:Script><![CDATA[
         import vos.MenuItemVO;
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e5f88f42/examples/flexjs/MDLExample/src/main/flex/models/MenuModel.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/models/MenuModel.as b/examples/flexjs/MDLExample/src/main/flex/models/MenuModel.as
index a68f8b9..a883130 100644
--- a/examples/flexjs/MDLExample/src/main/flex/models/MenuModel.as
+++ b/examples/flexjs/MDLExample/src/main/flex/models/MenuModel.as
@@ -27,8 +27,8 @@ package models
     {
         private var _menuItems:Array = [
             new MenuItemVO("Some Action"),
-            new MenuItemVO("Another Action"),
-            new MenuItemVO("More Action", false)
+            new MenuItemVO("Another Action", true),
+            new MenuItemVO("More Action", false, false)
         ];
 
         public function get menuItems():Array

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e5f88f42/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as b/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as
index 414fe10..567672c 100644
--- a/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as
+++ b/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as
@@ -22,10 +22,12 @@ package vos
     {
         private var _label:String;
         private var _disabled:Boolean;
+        private var _hasDivider:Boolean;
 
-        public function MenuItemVO(label:String, disabled:Boolean = false)
+        public function MenuItemVO(label:String, hasDivider:Boolean = false, disabled:Boolean
= false)
         {
            this.label = label;
+           this.hasDivider = hasDivider;
            this.disabled = disabled;
         }
 
@@ -48,5 +50,15 @@ package vos
         {
             _disabled = value;
         }
+
+        public function get hasDivider():Boolean
+        {
+            return _hasDivider;
+        }
+
+        public function set hasDivider(value:Boolean):void
+        {
+            _hasDivider = value;
+        }
     }
 }


Mime
View raw message