Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D2226200C0B for ; Sun, 15 Jan 2017 01:14:28 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D0946160B52; Sun, 15 Jan 2017 00:14:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 80C94160B51 for ; Sun, 15 Jan 2017 01:14:27 +0100 (CET) Received: (qmail 58197 invoked by uid 500); 15 Jan 2017 00:14:26 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 58048 invoked by uid 99); 15 Jan 2017 00:14:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Jan 2017 00:14:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 53BB21A00E9; Sun, 15 Jan 2017 00:14:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.643 X-Spam-Level: *** X-Spam-Status: No, score=3.643 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, HTML_OBFUSCATE_10_20=1.162, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Ho1MMR-FSrm3; Sun, 15 Jan 2017 00:14:16 +0000 (UTC) Received: from mail-ua0-f193.google.com (mail-ua0-f193.google.com [209.85.217.193]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 019735F2EF; Sun, 15 Jan 2017 00:14:15 +0000 (UTC) Received: by mail-ua0-f193.google.com with SMTP id 96so6986388uaq.2; Sat, 14 Jan 2017 16:14:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=NTBCDYEJCZhhQoQzSoUqIXBIWo1WqYlPki3XzhiMgPU=; b=tQoFPGVwTsU5DQr77qnQzsaejJgoIdLQIjH92CaSajrEedQU54a1UVLxIKb3R9HfMY qOh+MFhbB3Ek3iuHpBQ0S9GXlnDPlSY5KfCHJMnOn2wctnbkDm8cSaPYLvt6SqgW0g01 MCpcuup+mTgExJ9zD3e9ch195q0gwoNugfJGawqHx1yYNChtgKlAfXrFLP+ULBs2Pits 8ZbbCbtns5zUPMJrawlsozkV6QQs8ZLYlu2XnPMqY8qCKRW7LhjJ4uwEeihSDsZ5VQzt vYY9zvbkNmFIcPFLmdNWN6mW8eM5ls+icGqfdpNSGEcA64uQo1ohcbp+jEvxMLgjFC6q 8T8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=NTBCDYEJCZhhQoQzSoUqIXBIWo1WqYlPki3XzhiMgPU=; b=G8r2wIHu6pfexYEqya5EOtjIYS+CxVuNl01nPtQo8nC0jy9vugbaK0oqds17nnHkf4 wYSznEivL21n4OmgJjqs1+XoTesdkvhNutrZhwZVPmn8vrDZHl0JGARfMfxyo9Yhy8Mj Pd7yyKV45HlYTCuoTEj9sTCQ02ekJzZuyl3w1KpWPtG/GB+diEVIhK7Sr4fzjfToKq4z iSFL2r9+a9M5bm4jUzQUGsfcogwZbpQvJ1bxQ3C4MkjQsHBHy0RQw2NjKRq4UCFgUrhz kgARPnt2HHXZIwYBAsp3wX8RjBudZ/zAMRNh2ZetBdK7vWtt7UyjVmSlJHeM05UHlv6r +otg== X-Gm-Message-State: AIkVDXLn7m8HVNcKShiS8wUobWydm/+o5qAkjsV5ZKBS3r3VUPB7r6QONmtXPOaFKZdtZ6VfiWFhFKlcUVaatw== X-Received: by 10.176.65.101 with SMTP id j92mr1527108uad.57.1484439253604; Sat, 14 Jan 2017 16:14:13 -0800 (PST) MIME-Version: 1.0 Sender: carlos.rovira@gmail.com Received: by 10.103.12.3 with HTTP; Sat, 14 Jan 2017 16:13:53 -0800 (PST) In-Reply-To: References: <2f3e9113cea34d44bffab6559733ec48@git.apache.org> From: Carlos Rovira Date: Sun, 15 Jan 2017 01:13:53 +0100 X-Google-Sender-Auth: 0FZHOpWlhEju2LMgX1x4tV5oNmU Message-ID: Subject: Re: git commit: [flex-asjs] [refs/heads/develop] - MDL Table component and example initial implementation To: "dev@flex.apache.org" Cc: commits@flex.apache.org Content-Type: multipart/alternative; boundary=94eb2c122f9e66e011054616f2d0 archived-at: Sun, 15 Jan 2017 00:14:29 -0000 --94eb2c122f9e66e011054616f2d0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable So we have now the Table component finished :) This code: outputs this: https://getmdl.io/components/index.html#tables-section I'll try some enhancements like to have a "dataField" in column like in DataGrid so we can filter columns or reorder. As well there's a support in MDL for column ascending and descending, but although the visuales are available through the flexjs table component, don't know yet how it works (I'll try to check some examples out there and see if we can introduce a click event or something like that) as well It would be great to make the basic TableRowItemRenderer output all row info, so the basic table with the basic IR could be used in a very basic way :) 2017-01-14 0:45 GMT+01:00 Carlos Rovira : > Yeah! :) > > 2017-01-13 20:43 GMT+01:00 Piotr Zarzycki : > >> Love this commit :) >> >> On Fri, Jan 13, 2017, 20:34 wrote: >> >> > Repository: flex-asjs >> > Updated Branches: >> > refs/heads/develop 2e52060f3 -> b0b41aefe >> > >> > >> > MDL Table component and example initial implementation >> > >> > >> > Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo >> > Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b0b4 >> 1aef >> > Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b0b41aef >> > Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b0b41aef >> > >> > Branch: refs/heads/develop >> > Commit: b0b41aefe2a419d310c010299430ba56bf87d974 >> > Parents: 2e52060 >> > Author: Carlos Rovira >> > Authored: Fri Jan 13 20:34:17 2017 +0100 >> > Committer: Carlos Rovira >> > Committed: Fri Jan 13 20:34:17 2017 +0100 >> > >> > ---------------------------------------------------------------------- >> > .../src/main/flex/MainNavigation.mxml | 1 + >> > .../flexjs/MDLExample/src/main/flex/Tables.mxml | 41 ++++++ >> > .../src/main/flex/models/MainNavigationModel.as | 1 + >> > .../src/main/flex/models/TablesModel.as | 41 ++++++ >> > .../MDLExample/src/main/flex/vos/MaterialVO.as | 35 +++++ >> > .../main/flex/org/apache/flex/mdl/Navigation.as | 2 +- >> > .../src/main/flex/org/apache/flex/mdl/Table.as | 30 ++-- >> > .../flex/mdl/itemRenderers/TableItemRenderer.as | 145 >> +++++++++++++++++++ >> > .../src/main/resources/defaults.css | 10 ++ >> > .../src/main/resources/mdl-manifest.xml | 2 + >> > 10 files changed, 293 insertions(+), 15 deletions(-) >> > ---------------------------------------------------------------------- >> > >> > >> > >> > http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0b41a >> ef/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml >> > ---------------------------------------------------------------------- >> > diff --git a/examples/flexjs/MDLExample/src/main/flex/MainNavigation.m= x >> ml >> > b/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml >> > index f056f18..a2414b8 100644 >> > --- a/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml >> > +++ b/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml >> > @@ -74,6 +74,7 @@ limitations under the License. >> > >> > >> > >> > + >> > >> > >> > >> > >> > >> > http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0b41a >> ef/examples/flexjs/MDLExample/src/main/flex/Tables.mxml >> > ---------------------------------------------------------------------- >> > diff --git a/examples/flexjs/MDLExample/src/main/flex/Tables.mxml >> > b/examples/flexjs/MDLExample/src/main/flex/Tables.mxml >> > new file mode 100644 >> > index 0000000..a5591d7 >> > --- /dev/null >> > +++ b/examples/flexjs/MDLExample/src/main/flex/Tables.mxml >> > @@ -0,0 +1,41 @@ >> > + >> > + >> > +> > + xmlns:js=3D"library://ns.apache.org/flexjs/basic" >> > + xmlns:mdl=3D"library://ns.apache.org/flexjs/mdl" >> > + xmlns=3D"http://www.w3.org/1999/xhtml" >> > + xmlns:models=3D"models.*"> >> > + >> > + >> > + >> > + >> > + >> > + >> > + >> > + >> > + > > + sourceID=3D"model" >> > + sourcePropertyName=3D"materials" >> > + destinationPropertyName=3D"dataProvider" /> >> > + >> > + >> > + >> > + >> > + >> > \ No newline at end of file >> > >> > >> > http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0b41a >> ef/examples/flexjs/MDLExample/src/main/flex/models/MainNavigationModel.a= s >> > ---------------------------------------------------------------------- >> > diff --git >> > a/examples/flexjs/MDLExample/src/main/flex/models/MainNaviga >> tionModel.as >> > b/examples/flexjs/MDLExample/src/main/flex/models/MainNaviga >> tionModel.as >> > index 5330ae4..12fbbf3 100644 >> > --- >> > a/examples/flexjs/MDLExample/src/main/flex/models/MainNaviga >> tionModel.as >> > +++ >> > b/examples/flexjs/MDLExample/src/main/flex/models/MainNaviga >> tionModel.as >> > @@ -63,6 +63,7 @@ package models >> > new NavigationLinkVO("Snackbar", "snackbar_panel"), >> > new NavigationLinkVO("Toggles", "toggles_panel"), >> > new NavigationLinkVO("Lists", "lists_panel"), >> > + new NavigationLinkVO("Tables", "tables_panel"), >> > new NavigationLinkVO("Loading", "loading_panel"), >> > new NavigationLinkVO("Menu", "menus_panel"), >> > new NavigationLinkVO("Badges", "badges_panel"), >> > >> > >> > http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0b41a >> ef/examples/flexjs/MDLExample/src/main/flex/models/TablesModel.as >> > ---------------------------------------------------------------------- >> > diff --git >> > a/examples/flexjs/MDLExample/src/main/flex/models/TablesModel.as >> > b/examples/flexjs/MDLExample/src/main/flex/models/TablesModel.as >> > new file mode 100644 >> > index 0000000..19e355e >> > --- /dev/null >> > +++ b/examples/flexjs/MDLExample/src/main/flex/models/TablesModel.as >> > @@ -0,0 +1,41 @@ >> > >> > +/////////////////////////////////////////////////////////// >> ///////////////////// >> > +// >> > +// Licensed to the Apache Software Foundation (ASF) under one or mor= e >> > +// contributor license agreements. See the NOTICE file distributed >> with >> > +// this work for additional information regarding copyright ownershi= p. >> > +// The ASF licenses this file to You under the Apache License, Versi= on >> > 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, softwa= re >> > +// 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 a= nd >> > +// limitations under the License. >> > +// >> > >> > +/////////////////////////////////////////////////////////// >> ///////////////////// >> > +package models >> > +{ >> > + import org.apache.flex.events.EventDispatcher; >> > + import vos.*; >> > + >> > + public class TablesModel extends EventDispatcher >> > + { >> > + /** >> > + * Used in the Tables example. >> > + */ >> > + private var _materials:Array =3D [ >> > + new MaterialVO("Acrylic (Transparent)", "25", >> > "$2.90"), >> > + new MaterialVO("Plywood (Birch)", "50", >> "$1.25"), >> > + new MaterialVO("Laminate (Gold on Blue)", "10"= , >> > "$2.35") >> > + ]; >> > + >> > + public function get materials():Array >> > + { >> > + return _materials; >> > + } >> > + >> > + } >> > +} >> > >> > >> > http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0b41a >> ef/examples/flexjs/MDLExample/src/main/flex/vos/MaterialVO.as >> > ---------------------------------------------------------------------- >> > diff --git a/examples/flexjs/MDLExample/src/main/flex/vos/MaterialVO.a= s >> > b/examples/flexjs/MDLExample/src/main/flex/vos/MaterialVO.as >> > new file mode 100644 >> > index 0000000..b7dc69e >> > --- /dev/null >> > +++ b/examples/flexjs/MDLExample/src/main/flex/vos/MaterialVO.as >> > @@ -0,0 +1,35 @@ >> > >> > +/////////////////////////////////////////////////////////// >> ///////////////////// >> > +// >> > +// Licensed to the Apache Software Foundation (ASF) under one or mor= e >> > +// contributor license agreements. See the NOTICE file distributed >> with >> > +// this work for additional information regarding copyright ownershi= p. >> > +// The ASF licenses this file to You under the Apache License, Versi= on >> > 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, softwa= re >> > +// 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 a= nd >> > +// limitations under the License. >> > +// >> > >> > +/////////////////////////////////////////////////////////// >> ///////////////////// >> > +package vos >> > +{ >> > + [Bindable] >> > + public class MaterialVO >> > + { >> > + public function MaterialVO(materialName:String =3D nul= l, >> > quantity:String =3D null, unitPrice:String =3D null) >> > + { >> > + this.materialName =3D materialName; >> > + this.quantity =3D quantity; >> > + this.unitPrice =3D unitPrice; >> > + } >> > + >> > + public var materialName:String =3D ""; >> > + public var quantity:String =3D ""; >> > + public var unitPrice:String =3D ""; >> > + } >> > +} >> > \ No newline at end of file >> > >> > >> > http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0b41a >> ef/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/Navigation.as >> > ---------------------------------------------------------------------- >> > diff --git >> > a/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/Navigation.as >> > b/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/Navigation.as >> > index a638d1e..708983d 100644 >> > --- >> > a/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/Navigation.as >> > +++ >> > b/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/Navigation.as >> > @@ -64,7 +64,7 @@ package org.apache.flex.mdl >> > positioner =3D element; >> > element.flexjs_wrapper =3D this; >> > >> > - return positioner; >> > + return element; >> > } >> > } >> > } >> > >> > >> > http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0b41a >> ef/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/Table.as >> > ---------------------------------------------------------------------- >> > diff --git >> > a/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/Table.as >> > b/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/Table.as >> > index 0ac0377..b23b834 100644 >> > --- >> > a/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/Table.as >> > +++ >> > b/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/Table.as >> > @@ -18,7 +18,7 @@ >> > >> > //////////////////////////////////////////////////////////// >> //////////////////// >> > package org.apache.flex.mdl >> > { >> > - import org.apache.flex.core.ContainerBase; >> > + import org.apache.flex.mdl.List; >> > >> > COMPILE::JS >> > { >> > @@ -41,7 +41,7 @@ package org.apache.flex.mdl >> > * @playerversion AIR 2.6 >> > * @productversion FlexJS 0.0 >> > */ >> > - public class Table extends ContainerBase >> > + public class Table extends List >> > { >> > /** >> > * constructor. >> > @@ -67,14 +67,8 @@ package org.apache.flex.mdl >> > typeNames =3D "mdl-data-table mdl-js-data-tabl= e"; >> > >> > element =3D document.createElement('table') as >> > WrappedHTMLElement; >> > - element.className =3D typeNames; >> > >> > positioner =3D element; >> > - >> > - // absolute positioned children need a non-null >> > - // position value in the parent. It might >> > - // get set to 'absolute' if the container is >> > - // also absolutely positioned >> > element.flexjs_wrapper =3D this; >> > >> > return element; >> > @@ -96,15 +90,20 @@ package org.apache.flex.mdl >> > } >> > public function set shadow(value:Number):void >> > { >> > - if(value =3D=3D 0 || value =3D=3D 2 || value = =3D=3D 3 || >> value >> > =3D=3D 4 || value =3D=3D 6 || value =3D=3D 8 || value =3D=3D 16) >> > + COMPILE::JS >> > { >> > - _shadow =3D value; >> > + element.classList.remove("mdl-shadow--= " >> + >> > _shadow + "dp"); >> > + >> > + if(value =3D=3D 2 || value =3D=3D 3 ||= value =3D=3D >> 4 >> > || value =3D=3D 6 || value =3D=3D 8 || value =3D=3D 16) >> > + { >> > + _shadow =3D value; >> > >> > - className +=3D (_shadow !=3D 0 ? " >> > mdl-shadow--" + _shadow + "dp" : ""); >> > - } >> > + >> > element.classList.add("mdl-shadow--" + _shadow + "dp"); >> > + } >> > + } >> > } >> > >> > - protected var _selectable:Boolean; >> > + protected var _selectable:Boolean =3D false; >> > /** >> > * A boolean flag to activate >> > "mdl-data-table--selectable" effect selector. >> > * Applies all/individual selectable behavior >> (checkboxes) >> > @@ -123,7 +122,10 @@ package org.apache.flex.mdl >> > { >> > _selectable =3D value; >> > >> > - >> > element.classList.toggle("mdl-data-table--selectable", _selectable); >> > + COMPILE::JS >> > + { >> > + >> > element.classList.toggle("mdl-data-table--selectable", _selectable); >> > + } >> > } >> > } >> > } >> > >> > >> > http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0b41a >> ef/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/itemRenderers/TableItemRenderer.as >> > ---------------------------------------------------------------------- >> > diff --git >> > a/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/itemRenderers/TableItemRenderer.as >> > b/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/itemRenderers/TableItemRenderer.as >> > new file mode 100644 >> > index 0000000..c5ae510 >> > --- /dev/null >> > +++ >> > b/frameworks/projects/MaterialDesignLite/src/main/flex/org/ >> apache/flex/mdl/itemRenderers/TableItemRenderer.as >> > @@ -0,0 +1,145 @@ >> > >> > +/////////////////////////////////////////////////////////// >> ///////////////////// >> > +// >> > +// Licensed to the Apache Software Foundation (ASF) under one or mor= e >> > +// contributor license agreements. See the NOTICE file distributed >> with >> > +// this work for additional information regarding copyright ownershi= p. >> > +// The ASF licenses this file to You under the Apache License, Versi= on >> > 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, softwa= re >> > +// 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 a= nd >> > +// limitations under the License. >> > +// >> > >> > +/////////////////////////////////////////////////////////// >> ///////////////////// >> > +package org.apache.flex.mdl.itemRenderers >> > +{ >> > + COMPILE::JS >> > + { >> > + import org.apache.flex.core.WrappedHTMLElement; >> > + } >> > + >> > + import org.apache.flex.html.supportClasses.MXMLItemRenderer; >> > + >> > + /** >> > + * The TableItemRenderer defines the basic Item Renderer for = a >> > MDL Table Component. >> > + * >> > + * @langversion 3.0 >> > + * @playerversion Flash 10.2 >> > + * @playerversion AIR 2.6 >> > + * @productversion FlexJS 0.0 >> > + */ >> > + public class TableItemRenderer extends MXMLItemRenderer >> > + { >> > + /** >> > + * constructor. >> > + * >> > + * @langversion 3.0 >> > + * @playerversion Flash 10.2 >> > + * @playerversion AIR 2.6 >> > + * @productversion FlexJS 0.0 >> > + */ >> > + public function TableItemRenderer() >> > + { >> > + super(); >> > + >> > + className =3D ""; //set to empty string avoid 'undefined' >> > output when no class selector is assigned by user; >> > + } >> > + >> > + private var _text:String =3D ""; >> > + >> > + /** >> > + * The text of the heading >> > + * >> > + * @langversion 3.0 >> > + * @playerversion Flash 10.2 >> > + * @playerversion AIR 2.6 >> > + * @productversion FlexJS 0.0 >> > + */ >> > + public function get text():String >> > + { >> > + return _text; >> > + } >> > + >> > + public function set text(value:String):void >> > + { >> > + _text =3D value; >> > + } >> > + >> > + COMPILE::JS >> > + private var textNode:Text; >> > + >> > + /** >> > + * Sets the data value and uses the String version of >> the >> > data for display. >> > + * >> > + * @param Object data The object being displayed by t= he >> > itemRenderer instance. >> > + * >> > + * @langversion 3.0 >> > + * @playerversion Flash 10.2 >> > + * @playerversion AIR 2.6 >> > + * @productversion FlexJS 0.0 >> > + */ >> > + override public function set data(value:Object):void >> > + { >> > + super.data =3D value; >> > + >> > + var text:String; >> > + if (labelField || dataField) { >> > + text =3D String(value[labelField]); >> > + } else { >> > + text =3D String(value); >> > + } >> > + >> > + COMPILE::JS >> > + { >> > + if(textNode !=3D null) >> > + { >> > + textNode.nodeValue =3D text; >> > + } >> > + } >> > + } >> > + >> > + /** >> > + * @flexjsignorecoercion org.apache.flex.core.WrappedHT >> MLElement >> > + */ >> > + COMPILE::JS >> > + override protected function createElement():WrappedHTMLElemen= t >> > + { >> > + element =3D document.createElement('td') as >> WrappedHTMLElement; >> > + >> > + if(MXMLDescriptor =3D=3D null) >> > + { >> > + textNode =3D document.createTextNode('= ') >> as >> > Text; >> > + element.appendChild(textNode); >> > + } >> > + >> > + positioner =3D element; >> > + element.flexjs_wrapper =3D this; >> > + >> > + return element; >> > + } >> > + >> > + private var _nonNumeric:Boolean; >> > + /** >> > + * Activate "mdl-data-table__cell--non-numeric" class >> selector, >> > for use in table td item. >> > + * Optional >> > + */ >> > + public function get nonNumeric():Boolean >> > + { >> > + return _nonNumeric; >> > + } >> > + public function set nonNumeric(value:Boolean):void >> > + { >> > + _nonNumeric =3D value; >> > + >> > + COMPILE::JS >> > + { >> > + >> > element.classList.toggle("mdl-data-table__cell--non-numeric", >> _nonNumeric); >> > + } >> > + } >> > + } >> > +} >> > >> > >> > http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0b41a >> ef/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.cs= s >> > ---------------------------------------------------------------------- >> > diff --git >> > a/frameworks/projects/MaterialDesignLite/src/main/resources/ >> defaults.css >> > b/frameworks/projects/MaterialDesignLite/src/main/resources/ >> defaults.css >> > index 9f2dbd6..566875e 100644 >> > --- >> > a/frameworks/projects/MaterialDesignLite/src/main/resources/ >> defaults.css >> > +++ >> > b/frameworks/projects/MaterialDesignLite/src/main/resources/ >> defaults.css >> > @@ -56,6 +56,16 @@ List >> > IItemRenderer: >> > ClassReference("org.apache.flex.mdl.itemRenderers.ListItemRenderer"); >> > } >> > >> > +Table >> > +{ >> > + IBeadView: ClassReference("org.apache.fle >> x.mdl.beads.views.ListView"); >> > + IBeadModel: >> > ClassReference("org.apache.flex.html.beads.models.ArraySelec >> tionModel"); >> > + IBeadLayout: ClassReference(null); >> > /*"org.apache.flex.html.beads.layouts.VerticalLayout"*/ >> > + IDataProviderItemRendererMapper: >> > ClassReference("org.apache.flex.html.beads.DataItemRendererF >> actoryForArrayData"); >> > + IItemRendererClassFactory: >> > ClassReference("org.apache.flex.core.ItemRendererClassFactory"); >> > + IItemRenderer: >> > ClassReference("org.apache.flex.mdl.itemRenderers.TableItemRenderer"); >> > +} >> > + >> > Navigation >> > { >> > IBeadView: ClassReference("org.apache.fle >> x.mdl.beads.views.ListView"); >> > >> > >> > http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b0b41a >> ef/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 1b8b2a0..b4d2c9a 100644 >> > --- >> > a/frameworks/projects/MaterialDesignLite/src/main/resources/ >> mdl-manifest.xml >> > +++ >> > b/frameworks/projects/MaterialDesignLite/src/main/resources/ >> mdl-manifest.xml >> > @@ -56,6 +56,8 @@ >> > > > class=3D"org.apache.flex.mdl.beads.ListItemSubTitle"/> >> > > > class=3D"org.apache.flex.mdl.beads.ListItemSecondaryInfo"/> >> > > > class=3D"org.apache.flex.mdl.beads.ListItemTextBody"/> >> > + >> > + > > class=3D"org.apache.flex.mdl.itemRenderers.TableItemRenderer"/> >> > > > class=3D"org.apache.flex.mdl.NavigationLayout"/> >> > > outTitle"/> >> > > igation"/> >> > >> > >> > > > > -- > > Carlos Rovira > Director General > M: +34 607 22 60 05 <607%2022%2060%2005> > http://www.codeoscopic.com > http://www.avant2.es > > Este mensaje se dirige exclusivamente a su destinatario y puede contener > informaci=C3=B3n privilegiada o confidencial. Si ha recibido este mensaje= por > error, le rogamos que nos lo comunique inmediatamente por esta misma v=C3= =ADa y > proceda a su destrucci=C3=B3n. > > De la vigente Ley Org=C3=A1nica de Protecci=C3=B3n de Datos (15/1999), le > comunicamos que sus datos forman parte de un fichero cuyo responsable es > CODEOSCOPIC S.A. La finalidad de dicho tratamiento es facilitar la > prestaci=C3=B3n del servicio o informaci=C3=B3n solicitados, teniendo ust= ed derecho > de acceso, rectificaci=C3=B3n, cancelaci=C3=B3n y oposici=C3=B3n de sus d= atos dirigi=C3=A9ndose > a nuestras oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la > documentaci=C3=B3n necesaria. > > --=20 Carlos Rovira Director General M: +34 607 22 60 05 http://www.codeoscopic.com http://www.avant2.es Este mensaje se dirige exclusivamente a su destinatario y puede contener informaci=C3=B3n privilegiada o confidencial. Si ha recibido este mensaje p= or error, le rogamos que nos lo comunique inmediatamente por esta misma v=C3= =ADa y proceda a su destrucci=C3=B3n. De la vigente Ley Org=C3=A1nica de Protecci=C3=B3n de Datos (15/1999), le c= omunicamos que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC S.A. La finalidad de dicho tratamiento es facilitar la prestaci=C3=B3n del servicio o informaci=C3=B3n solicitados, teniendo usted derecho de acceso, rectificaci=C3=B3n, cancelaci=C3=B3n y oposici=C3=B3n de sus datos dirigi= =C3=A9ndose a nuestras oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentaci=C3=B3= n necesaria. --94eb2c122f9e66e011054616f2d0--