Repository: flex-asjs
Updated Branches:
  refs/heads/develop d4757492f -> aec80ceb8


Secondary action and material icon star


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

Branch: refs/heads/develop
Commit: aec80ceb86a9b3897bc1631f66ffd6f3b841e724
Parents: d475749
Author: Carlos Rovira <carlosrov...@apache.org>
Authored: Sat Dec 10 17:59:51 2016 +0100
Committer: Carlos Rovira <carlosrov...@apache.org>
Committed: Sat Dec 10 17:59:51 2016 +0100

----------------------------------------------------------------------
 .../flex/mdl/beads/ListItemSecondaryAction.as   | 85 ++++++++++++++++++++
 .../mdl/beads/materialIcons/MaterialIconStar.as | 72 +++++++++++++++++
 .../beads/materialIcons/MaterialIconsType.as    |  1 +
 .../src/main/resources/mdl-manifest.xml         |  2 +
 4 files changed, 160 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aec80ceb/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ListItemSecondaryAction.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ListItemSecondaryAction.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ListItemSecondaryAction.as
new file mode 100644
index 0000000..2f64127
--- /dev/null
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ListItemSecondaryAction.as
@@ -0,0 +1,85 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.mdl.beads
+{
+       import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IBead;
+       import org.apache.flex.core.UIBase;
+
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+
+       /**
+        *  The ListItemSecondaryAction class decorates a tag element in a list 
item renderer
+     *  
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class ListItemSecondaryAction implements IBead
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function ListItemSecondaryAction()
+               {
+                       super();   
+               }
+               
+               private var host:UIBase;
+
+               private var _strand:IStrand;            
+               /**
+                *  @copy org.apache.flex.core.IBead#strand
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                *  @flexjsignorecoercion org.apache.flex.mdl.TextInput;
+                */
+               public function set strand(value:IStrand):void
+               {
+                       _strand = value;
+                       
+                       COMPILE::JS
+                       {
+                               host = value as UIBase;
+                               
+                               if (host.element is HTMLElement)
+                               {
+                                       
host.element.classList.add("mdl-list__item-secondary-action");
+                               }
+                               else
+                               {
+                                       throw new Error("Host component must be 
an MDL element.");
+                               }
+                       }
+               }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aec80ceb/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/materialIcons/MaterialIconStar.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/materialIcons/MaterialIconStar.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/materialIcons/MaterialIconStar.as
new file mode 100644
index 0000000..9ebfa26
--- /dev/null
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/materialIcons/MaterialIconStar.as
@@ -0,0 +1,72 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.mdl.beads.materialIcons
+{
+    import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.UIBase;
+    import org.apache.flex.mdl.supportClasses.MaterialIconBase;
+
+    /**
+     *  The MaterialMaterialIconStarIconPerson bead class is a specialty bead 
that add "star" icon
+     *  to component taken from "material-icons"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+    public class MaterialIconStar extends MaterialIconBase implements IBead
+    {
+        /**
+         *  constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function MaterialIconStar()
+        {
+            super();
+        }
+        
+        private var _strand:IStrand;
+
+        /**
+         * @flexjsignorecoercion HTMLElement
+         *
+         * @param value
+         */
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+
+            COMPILE::JS
+            {
+                var host:UIBase = value as UIBase;
+                var htmlElement:HTMLElement = host.element as HTMLElement;
+
+                materialIcon.text = MaterialIconsType.STAR;
+
+                htmlElement.appendChild(element);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aec80ceb/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/materialIcons/MaterialIconsType.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/materialIcons/MaterialIconsType.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/materialIcons/MaterialIconsType.as
index ecbb1d5..026cf9f 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/materialIcons/MaterialIconsType.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/materialIcons/MaterialIconsType.as
@@ -23,5 +23,6 @@ package org.apache.flex.mdl.beads.materialIcons
         public static const CANCEL:String = "cancel";
         public static const ADD:String = "add";
         public static const PERSON:String = "person";
+        public static const STAR:String = "star";
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aec80ceb/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml 
b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index 958382d..1fb51ba 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -46,6 +46,7 @@
     <component id="ListView" class="org.apache.flex.mdl.beads.views.ListView"/>
     <component id="ListItemRenderer" 
class="org.apache.flex.mdl.itemRenderers.ListItemRenderer"/>
     <component id="ListItemPrimaryContent" 
class="org.apache.flex.mdl.beads.ListItemPrimaryContent"/>
+    <component id="ListItemSecondaryAction" 
class="org.apache.flex.mdl.beads.ListItemSecondaryAction"/>
     <component id="ItemRendererFactoryForArrayData" 
class="org.apache.flex.mdl.supportClasses.ItemRendererFactoryForArrayData"/>
     <component id="NavigationLayout" 
class="org.apache.flex.mdl.NavigationLayout"/>
     <component id="LayoutTitle" class="org.apache.flex.mdl.LayoutTitle"/>
@@ -69,6 +70,7 @@
     <component id="MaterialIconCancel" 
class="org.apache.flex.mdl.beads.materialIcons.MaterialIconCancel"/>
     <component id="MaterialIconAdd" 
class="org.apache.flex.mdl.beads.materialIcons.MaterialIconAdd"/>
     <component id="MaterialIconPerson" 
class="org.apache.flex.mdl.beads.materialIcons.MaterialIconPerson"/>
+    <component id="MaterialIconStar" 
class="org.apache.flex.mdl.beads.materialIcons.MaterialIconStar"/>
     <component id="ContactChip" class="org.apache.flex.mdl.beads.ContactChip"/>
     <component id="ContactImageChip" 
class="org.apache.flex.mdl.beads.ContactImageChip"/>
     <component id="Tooltip" class="org.apache.flex.mdl.beads.Tooltip"/>

Reply via email to