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/17 10:00:55 UTC
[1/2] git commit: [flex-asjs] [refs/heads/feature/mdl] - Introducing
js:Form
Repository: flex-asjs
Updated Branches:
refs/heads/feature/mdl b68d7862e -> 6ba5f87a3
Introducing js:Form
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/0d23be0a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/0d23be0a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/0d23be0a
Branch: refs/heads/feature/mdl
Commit: 0d23be0a90d259763f4da8eed25f3c5ba216b325
Parents: b68d786
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 11:54:29 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Mon Oct 17 11:54:29 2016 +0200
----------------------------------------------------------------------
examples/flexjs/MDLExample/src/main/flex/App.mxml | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0d23be0a/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 37e9e6a..b94a0d7 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -56,11 +56,12 @@ limitations under the License.
</js:Container>
<!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
- <js:Container className="mdl-textfield mdl-js-textfield">
- <js:TextInput className="mdl-textfield__input" id="sample1"/>
- <js:Label className="mdl-textfield__label" text="Text..."/>
- </js:Container>
-
+ <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..."/>
+ </js:Container>
+ </js:Form>
</js:View>
</js:initialView>
[2/2] git commit: [flex-asjs] [refs/heads/feature/mdl] - First
implementation of js:Form. Is nesting tags,
but action attribute is not working
Posted by ca...@apache.org.
First implementation of js:Form. Is nesting tags, but action attribute is not working
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6ba5f87a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6ba5f87a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6ba5f87a
Branch: refs/heads/feature/mdl
Commit: 6ba5f87a3a68daa94bcac4e189911e2fcf097a9e
Parents: 0d23be0
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 11:57:20 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Mon Oct 17 11:59:14 2016 +0200
----------------------------------------------------------------------
.../src/main/flex/org/apache/flex/html/Form.as | 99 ++++++++++++++++++++
.../HTML/src/main/resources/basic-manifest.xml | 1 +
.../HTML/src/main/resources/defaults.css | 4 +
3 files changed, 104 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6ba5f87a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Form.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Form.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Form.as
new file mode 100644
index 0000000..d7b0459
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Form.as
@@ -0,0 +1,99 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 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, software
+// 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 and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html
+{
+ import org.apache.flex.core.ContainerBase;
+
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ [DefaultProperty("mxmlContent")]
+
+ /**
+ * The Form class is a simple form.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class Form extends ContainerBase
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function Form()
+ {
+ super();
+ }
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {HTMLFormElement
+ element = document.createElement('form') as WrappedHTMLElement;
+
+ positioner = element;
+
+ positioner.style.position = 'relative';
+ element.flexjs_wrapper = this;
+ return element;
+ }
+
+
+ private var _action:String = "#";
+
+ [Bindable("actionChange")]
+ /**
+ * The action to be performed when the form is submitted
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get action():String
+ {
+ return _action;
+ }
+
+ /**
+ * @private
+ */
+ public function set action(value:String):void
+ {
+ _action = value;
+
+ COMPILE::JS
+ {
+ this.element.setAttribute('action', action);
+ this.dispatchEvent('actionChange');
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6ba5f87a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
index f56d4d8..6737a40 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -40,6 +40,7 @@
<component id="RadioButton" class="org.apache.flex.html.RadioButton"/>
<component id="ComboBox" class="org.apache.flex.html.ComboBox"/>
<component id="Container" class="org.apache.flex.html.Container"/>
+ <component id="Form" class="org.apache.flex.html.Form"/>
<component id="HContainer" class="org.apache.flex.html.HContainer"/>
<component id="VContainer" class="org.apache.flex.html.VContainer"/>
<component id="Panel" class="org.apache.flex.html.Panel"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6ba5f87a/frameworks/projects/HTML/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/defaults.css b/frameworks/projects/HTML/src/main/resources/defaults.css
index 28f2077..40ed0b5 100644
--- a/frameworks/projects/HTML/src/main/resources/defaults.css
+++ b/frameworks/projects/HTML/src/main/resources/defaults.css
@@ -174,6 +174,10 @@ RangeStepper {
IBeadController: ClassReference("org.apache.flex.html.beads.controllers.RangeStepperMouseController");
}
+Form {
+
+}
+
HContainer
{
IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");