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/10/18 22:51:55 UTC
[12/17] 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/b0e7dc27
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b0e7dc27
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b0e7dc27
Branch: refs/heads/feature/mdl
Commit: b0e7dc27994333a287527cf3946a1f475ad65689
Parents: 04b2f4b
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 16:16:59 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 19 00:51:15 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/b0e7dc27/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/b0e7dc27/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);