You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ca...@apache.org on 2016/11/02 18:33:26 UTC

[26/50] [abbrv] git commit: [flex-asjs] [refs/heads/feature/mdl] - Some text input and example changes

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/00e74e5b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/00e74e5b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/00e74e5b

Branch: refs/heads/feature/mdl
Commit: 00e74e5ba9e2dbd092dabf899960843cd5ac3f8e
Parents: d8218f3
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 16:16:59 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Nov 2 19:22:52 2016 +0100

----------------------------------------------------------------------
 .../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/00e74e5b/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/00e74e5b/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);