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 2017/01/20 00:01:22 UTC

flex-asjs git commit: Fix MDL dialog to work cross browsers tested on Chrome, Safari, Firefox, and hope others… This is a ugly and dirty solution, and hope temporary. But I surrender with externs for now since I can’t get it work

Repository: flex-asjs
Updated Branches:
  refs/heads/develop b01454039 -> 0549dab0d


Fix MDL dialog to work cross browsers tested on Chrome, Safari, Firefox, and hope others\u2026 This is a ugly and dirty solution, and hope temporary. But I surrender with externs for now since I can\u2019t get it work


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

Branch: refs/heads/develop
Commit: 0549dab0d7f884047b1daf389577a5ed3dc7ef0d
Parents: b014540
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Jan 20 01:01:15 2017 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Jan 20 01:01:15 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/Dialog.as | 22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0549dab0/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
index 3aa427c..9d3d225 100644
--- 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
@@ -41,8 +41,8 @@ package org.apache.flex.mdl
 		 *  constructor.
          *  
          *  <inject_html>
-         *  <link rel="stylesheet" href="http://cdn.bootcss.com/dialog-polyfill/0.4.5/dialog-polyfill.min.css">
-         *  <link rel="stylesheet" href="http://cdn.bootcss.com/dialog-polyfill/0.4.5/dialog-polyfill.min.js">
+         *  <link rel="stylesheet" type="text/css" href="http://cdn.css.net/libs/dialog-polyfill/0.4.5/dialog-polyfill.min.css">
+         *  <script src="http://cdn.css.net/libs/dialog-polyfill/0.4.5/dialog-polyfill.min.js"></script>
          *  </inject_html>
 		 *
 		 *  @langversion 3.0
@@ -58,7 +58,7 @@ package org.apache.flex.mdl
 		}
 
 		COMPILE::JS
-		private var dialog:HTMLDialogElement;
+		private var dialog:HTMLElement;
 
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
@@ -69,7 +69,7 @@ package org.apache.flex.mdl
         {
 			typeNames = "mdl-dialog";
             
-            dialog = document.createElement('dialog') as HTMLDialogElement;
+            dialog = document.createElement('dialog') as HTMLElement;
 			element = dialog as WrappedHTMLElement;
 
 			positioner = element;
@@ -109,13 +109,13 @@ package org.apache.flex.mdl
 					{
 						Application.topLevelApplication.addElement(this);
 					}
+
+					if (!dialog["showModal"]) { //!dialog.showModal
+						window["dialogPolyfill"].registerDialog(dialog);//dialogPolyfill.registerDialog(dialog);
+					}
 				}
 				
-				if (! dialog.showModal) {
-					//dialogPolyfill.registerDialog(dialog);
-				}
-
-				dialog.showModal();
+				dialog["showModal"]();
 			}
 		}
 		
@@ -126,7 +126,7 @@ package org.apache.flex.mdl
 		{
 			COMPILE::JS
 			{
-				dialog.show();
+				dialog["show"]();//dialog.show();
 			}
 		}
 
@@ -137,7 +137,7 @@ package org.apache.flex.mdl
 		{
 			COMPILE::JS
 			{
-				dialog.close();
+				dialog["close"]();//dialog.close();
 			}
 		}
 	}