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] - Update MDL FlexTeamPage with newest changes
Date Fri, 24 Mar 2017 21:37:14 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 00941ff37 -> 04f9713e2


Update MDL FlexTeamPage with newest changes


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

Branch: refs/heads/develop
Commit: 04f9713e2b884a63fbc94bdd02c02f32537448bf
Parents: 00941ff
Author: piotrz <piotrz@apache.org>
Authored: Fri Mar 24 22:37:09 2017 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Fri Mar 24 22:37:09 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/MainView.mxml                 | 25 +++---
 .../flex/itemRenderers/MemberItemRenderer.mxml  |  4 +-
 .../src/main/flex/models/MembersModel.as        | 92 ++++++++++----------
 .../src/main/flex/vos/MemberVO.as               | 19 ++--
 4 files changed, 69 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04f9713e/examples/flexjs/FlexTeamPage_MDL/src/main/flex/MainView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/MainView.mxml b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/MainView.mxml
index 107dbbd..51cc09c 100644
--- a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/MainView.mxml
+++ b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/MainView.mxml
@@ -17,19 +17,19 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<basic:View xmlns:fx="http://ns.adobe.com/mxml/2009"
-            xmlns:basic="library://ns.apache.org/flexjs/basic" xmlns:models="models.*"
-            xmlns:mdl="library://ns.apache.org/flexjs/mdl" xmlns:binding="org.apache.flex.binding.*">
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:models="models.*"
+      xmlns:mdl="library://ns.apache.org/flexjs/mdl" xmlns:binding="org.apache.flex.binding.*"
+      xmlns:js="library://ns.apache.org/flexjs/basic">
 
-    <basic:beads>
-        <basic:ViewDataBinding />
-    </basic:beads>
+    <js:beads>
+        <js:ViewDataBinding />
+    </js:beads>
 
-    <basic:model>
+    <js:model>
         <models:MembersModel/>
-    </basic:model>
+    </js:model>
 
-    <basic:Container width="100%" height="100%" className="container">
+    <js:Group width="100%" height="100%">
         <!--<basic:H1 text="FlexJS Team page"></basic:H1>-->
         <mdl:List labelField="name" className="memberListItemRenderer membersList">
             <mdl:beads>
@@ -37,9 +37,8 @@ limitations under the License.
                         sourceID="model"
                         sourcePropertyName="members"
                         destinationPropertyName="dataProvider"
-                        eventName="membersChanged"
-                            />
+                        eventName="membersChanged"/>
             </mdl:beads>
         </mdl:List>
-    </basic:Container>
-</basic:View>
\ No newline at end of file
+    </js:Group>
+</js:View>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04f9713e/examples/flexjs/FlexTeamPage_MDL/src/main/flex/itemRenderers/MemberItemRenderer.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/itemRenderers/MemberItemRenderer.mxml
b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/itemRenderers/MemberItemRenderer.mxml
index ad8004b..f2c24e1 100644
--- a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/itemRenderers/MemberItemRenderer.mxml
+++ b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/itemRenderers/MemberItemRenderer.mxml
@@ -56,10 +56,10 @@ limitations under the License.
             <js:H6 text="{member.apacheID}"></js:H6>
         </mdl:CardTitle>
         <mdl:CardSupportingText>
-            <js:Container className="cardRow1">
+            <js:Group className="cardRow1">
                 <js:HTMLText html="{member.bio}" className="bio"/>
                 <js:Image src="http://flex.apache.org/{member.photoURL}" className="photo"/>
-            </js:Container>
+            </js:Group>
             <!--<js:TextNode text="{member.bio}"/>-->
         </mdl:CardSupportingText>
         <mdl:Spacer height="20"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04f9713e/examples/flexjs/FlexTeamPage_MDL/src/main/flex/models/MembersModel.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/models/MembersModel.as b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/models/MembersModel.as
index 9eec224..7b83231 100644
--- a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/models/MembersModel.as
+++ b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/models/MembersModel.as
@@ -18,64 +18,62 @@
 ////////////////////////////////////////////////////////////////////////////////
 package models
 {
-import org.apache.flex.events.Event;
-import org.apache.flex.events.EventDispatcher;
-import org.apache.flex.html.TextNode;
-import org.apache.flex.net.HTTPService;
+    import org.apache.flex.events.Event;
+    import org.apache.flex.events.EventDispatcher;
+    import org.apache.flex.net.HTTPService;
 
-import vos.MemberVO;
+    import vos.MemberVO;
 
-[Event(name="membersChanged", type="org.apache.flex.events.Event")]
+    [Event(name="membersChanged", type="org.apache.flex.events.Event")]
 
-public class MembersModel extends EventDispatcher
-{
+    public class MembersModel extends EventDispatcher
+    {
 
-    private var _members:Array = [];
+        private var _members:Array = [];
 
-    public function MembersModel() {
-        loadMembers();
-    }
+        public function MembersModel() {
+            loadMembers();
+        }
 
-    protected function loadMembers():void {
-        var httpService:HTTPService = new HTTPService();
-        httpService.url = 'http://flex.apache.org/team/team.json';
-        httpService.addEventListener("complete", handleLoadComplete);
-        httpService.addEventListener("ioError", handleError);
-        httpService.send();
-    }
+        protected function loadMembers():void {
+            var httpService:HTTPService = new HTTPService();
+            httpService.url = 'http://flex.apache.org/team/team.json';
+            httpService.addEventListener("complete", handleLoadComplete);
+            httpService.addEventListener("ioError", handleError);
+            httpService.send();
+        }
 
-    protected function handleLoadComplete(event:Event):void
-    {
-        var responseStr:String = event.target._element.response;
-        //Remove the comments
-        responseStr = responseStr.substr(responseStr.indexOf('{'),responseStr.length);
-        var response:Object = JSON.parse(responseStr);
-        createMemberVOs(response.members);
-    }
+        protected function handleLoadComplete(event:Event):void
+        {
+            var responseStr:String = event.target._element.response;
+            //Remove the comments
+            responseStr = responseStr.substr(responseStr.indexOf('{'),responseStr.length);
+            var response:Object = JSON.parse(responseStr);
+            createMemberVOs(response.members);
+        }
 
-    protected function handleError(event:Event):void
-    {
-        trace('Error loading team.json from http://flex.apache.org/team/team.json');
-    }
+        protected function handleError(event:Event):void
+        {
+            trace('Error loading team.json from http://flex.apache.org/team/team.json');
+        }
 
-    protected function createMemberVOs(membersArr:Array):void {
-        var v:Array = membersArr.map(function(memberObj):MemberVO {
-            return new MemberVO(memberObj.name,memberObj.apacheID,memberObj.photoURL,memberObj.bio,memberObj.twitter,memberObj.linkedIn,memberObj.facebook);
-        });
-        this.members = v;
-    }
+        protected function createMemberVOs(membersArr:Array):void {
+            var v:Array = membersArr.map(function(memberObj):MemberVO {
+                return new MemberVO(memberObj.name,memberObj.apacheID,memberObj.photoURL,memberObj.bio,memberObj.twitter,memberObj.linkedIn,memberObj.facebook);
+            });
+            this.members = v;
+        }
 
 
-    public function set members(v:Array):void {
-        _members = v;
-        dispatchEvent( new Event("membersChanged") );
-        var t:TextNode = new TextNode();
-    }
+        public function set members(value:Array):void {
+            _members = value;
+            dispatchEvent( new Event("membersChanged") );
+        }
 
-    public function get members():Array
-    {
-        return _members;
-    }
+        public function get members():Array
+        {
+            return _members;
+        }
 
-}
+    }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04f9713e/examples/flexjs/FlexTeamPage_MDL/src/main/flex/vos/MemberVO.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/vos/MemberVO.as b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/vos/MemberVO.as
index e558bc2..40b3d88 100644
--- a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/vos/MemberVO.as
+++ b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/vos/MemberVO.as
@@ -17,8 +17,10 @@
 //
 ////////////////////////////////////////////////////////////////////////////////
 package vos {
-    public class MemberVO {
 
+    [Bindable]
+    public class MemberVO
+    {
         public function MemberVO(name:String,apacheID:String,photoURL:String,bio:String,twitter:String,linkedIn:String,facebook:String){
             this.name = name;
             this.apacheID = apacheID;
@@ -29,13 +31,12 @@ package vos {
             this.facebook = facebook;
         }
 
-        [Bindable] public var name:String;
-        [Bindable] public var title:String;
-        [Bindable] public var apacheID:String;
-        [Bindable] public var photoURL:String;
-        [Bindable] public var bio:String;
-        [Bindable] public var twitter:String;
-        [Bindable] public var linkedIn:String;
-        [Bindable] public var facebook:String;
+        public var name:String;
+        public var apacheID:String;
+        public var photoURL:String;
+        public var bio:String;
+        public var twitter:String;
+        public var linkedIn:String;
+        public var facebook:String;
     }
 }


Mime
View raw message