flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [18/19] git commit: [flex-asjs] [refs/heads/feature/mdl] - Some text input and example changes
Date Mon, 24 Oct 2016 16:01:17 GMT
Some text input and example 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/8a760c86
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8a760c86
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8a760c86

Branch: refs/heads/feature/mdl
Commit: 8a760c86698261703b9ffa50dd24a31d6b0100ff
Parents: 570716b
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Mon Oct 17 16:16:59 2016 +0200
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Mon Oct 24 18:00:38 2016 +0200

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    | 57 ++++++++++----------
 .../main/flex/org/apache/flex/mdl/TextInput.as  |  9 ++--
 2 files changed, 34 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a760c86/examples/flexjs/MDLExample/src/main/flex/App.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/App.mxml b/examples/flexjs/MDLExample/src/main/flex/App.mxml
index 937d8d2..242df22 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -30,39 +30,42 @@ limitations under the License.
     <js:initialView>
         <js:View>
             
-            <!-- Buttons https://getmdl.io/components/index.html#buttons-section -->
-            <js:Container>
-                <js:beads>
-                    <js:HorizontalLayout />
-                </js:beads>
-                            
-                <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
-                    <i class="material-icons">add</i>
-                </js:TextButton>
+            <js:Form action="http://www.google.com"> 
 
-                <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect
mdl-button--colored">
-                    <i class="material-icons">add</i>
-                </js:TextButton>
+                <!-- Buttons https://getmdl.io/components/index.html#buttons-section -->
+                <js:Container>
+                    <js:beads>
+                        <js:HorizontalLayout />
+                    </js:beads>
+                           
+                    <js:TextButton className="mdl-button mdl-js-button mdl-button--fab
mdl-button--colored">
+                        <i class="material-icons">add</i>
+                    </js:TextButton>
 
-                <!-- Raised button -->
-                <js:TextButton className="mdl-button mdl-js-button mdl-button--raised"
text="BUTTON"/>
-                <!-- Raised button with ripple -->
-                <js:TextButton className="mdl-button mdl-js-button mdl-button--raised
mdl-js-ripple-effect" text="BUTTON"/>
-                <!-- Raised disabled button ... it seems we don't have "disabled" implemented
yet-->
-                <js:TextButton className="mdl-button mdl-js-button mdl-button--raised"
text="BUTTON"/>
+                    <js:TextButton className="mdl-button mdl-js-button mdl-button--fab
mdl-js-ripple-effect mdl-button--colored">
+                        <i class="material-icons">mood</i>
+                    </js:TextButton>
 
-                <mdl:Button/>
+                    <!-- Raised button -->
+                    <js:TextButton className="mdl-button mdl-js-button mdl-button--raised"
text="BUTTON"/>
+                    <!-- Raised button with ripple -->
+                    <js:TextButton className="mdl-button mdl-js-button mdl-button--raised
mdl-js-ripple-effect" text="BUTTON"/>
+                    <!-- Raised disabled button ... it seems we don't have "disabled"
implemented yet-->
+                    <js:TextButton className="mdl-button mdl-js-button mdl-button--raised"
text="BUTTON"/>
 
-                <mdl:TextInput/>
+                    <mdl:Button>
+                        <i class="material-icons">add</i>
+                    </mdl:Button>
 
-            </js:Container>
-
-            <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section
-->
-            <js:Form action="http://www.google.com">
-                <js:Container className="mdl-textfield mdl-js-textfield">
-                    <js:TextInput className="mdl-textfield__input" id="sample1"/>
-                    <js:Label className="mdl-textfield__label" text="Text..."/>
+                    <mdl:Button text="BUTTON"/>                 
                 </js:Container>
+
+                <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section
-->
+                <mdl:TextInput id="mdlti" text="Something..." change="mdlchk.text = mdlti.text"/>
+
+                <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section
-->
+                <mdl:CheckBox id="mdlchk" text="Hello" selected="true"/>
+                
             </js:Form>
             
         </js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a760c86/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
index dace484..4617678 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
@@ -59,8 +59,7 @@ package org.apache.flex.mdl
             var input:HTMLInputElement;
             var label:HTMLLabelElement;
             var textNode:Text;
-            //element = document.createElement('input') as WrappedHTMLElement;
-
+            
             div = document.createElement('div') as HTMLDivElement;
             div.className = "mdl-textfield mdl-js-textfield";
 
@@ -71,15 +70,15 @@ package org.apache.flex.mdl
             label = document.createElement('label') as HTMLLabelElement;
             label.className = "mdl-textfield__label";
             
-            textNode = document.createTextNode('Text...') as Text;
+            textNode = document.createTextNode('') as Text;
             label.appendChild(textNode);
-            //element.className = 'TextInput';
-            //typeNames = 'TextInput';
             
             div.appendChild(input);
             div.appendChild(label);
 
             element = div as WrappedHTMLElement;
+            //element.className = 'TextInput';
+            typeNames = 'TextInput';
 
             //attach input handler to dispatch flexjs change event when user write in textinput
             //goog.events.listen(element, 'change', killChangeHandler);


Mime
View raw message