flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Dialog placeholder
Date Sun, 15 Jan 2017 22:08:13 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop f29c2a480 -> 2c59149d2


Dialog placeholder


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/2c59149d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2c59149d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2c59149d

Branch: refs/heads/develop
Commit: 2c59149d25d9a141910a91826853bfe5cb766c62
Parents: f29c2a4
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Sun Jan 15 23:08:07 2017 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Sun Jan 15 23:08:07 2017 +0100

----------------------------------------------------------------------
 .../MDLExample/src/main/flex/Dialogs.mxml       | 10 ++-
 .../src/main/flex/org/apache/flex/mdl/Dialog.as | 83 ++++++++++++++++++++
 .../src/main/resources/mdl-manifest.xml         |  1 +
 3 files changed, 93 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2c59149d/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml b/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml
index 287d7a5..1fda92d 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml
@@ -22,7 +22,15 @@ limitations under the License.
 
     <mdl:Grid>
         
+        <mdl:Button id="showdialog" text="Show Dialog" raised="true">
+            <mdl:beads>
+                <mdl:Tooltip text="Dialog is still under development"/>
+            </mdl:beads>
+        </mdl:Button>
+
+        <!--<mdl:Dialog>
+
+        </mdl:Dialog>-->
 
-        
     </mdl:Grid>
 </mdl:TabBarPanel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2c59149d/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Dialog.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Dialog.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Dialog.as
new file mode 100644
index 0000000..59b9a25
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Dialog.as
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.mdl
+{
+	import org.apache.flex.core.IChild;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The Dialog class
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class Dialog extends ContainerBase
+	{
+		/**
+		 *  constructor.
+         *  
+         *  <inject_html>
+         *  <script src="https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.5/dialog-polyfill.min.js"></script>
+         *  <script src="https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.5/dialog-polyfill.min.css"></script>
+         *  </inject_html>
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function Dialog()
+		{
+			super();
+
+			className = ""; //set to empty string avoid 'undefined' output when no class selector
is assigned by user;
+		}
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+			typeNames = "mdl-dialog";
+            
+            element = document.createElement('dialog') as WrappedHTMLElement;
+
+			//document.body.appendChild(element);
+            
+			positioner = 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 = this;
+
+            return element;
+        }
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2c59149d/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 c068148..ee7abd9 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -62,6 +62,7 @@
     <component id="TableRowItemRenderer" class="org.apache.flex.mdl.itemRenderers.TableRowItemRenderer"/>
     <component id="TableCell" class="org.apache.flex.mdl.TableCell"/>
     <component id="TableView" class="org.apache.flex.mdl.beads.views.TableView"/>
+    <component id="Dialog" class="org.apache.flex.mdl.Dialog"/>
     <component id="NavigationLayout" class="org.apache.flex.mdl.NavigationLayout"/>
     <component id="LayoutTitle" class="org.apache.flex.mdl.LayoutTitle"/>
     <component id="Navigation" class="org.apache.flex.mdl.Navigation"/>


Mime
View raw message