Dialog now using the dot notation

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

Branch: refs/heads/feature/mdl
Commit: f1977a7783166b66f4fcb2cce666465a83e5a12e
Parents: 4c3734f
Author: Carlos Rovira <[email protected]>
Authored: Sat Jan 21 00:02:28 2017 +0100
Committer: Carlos Rovira <[email protected]>
Committed: Sat Jan 21 00:02:28 2017 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml |  2 +-
 .../src/main/flex/org/apache/flex/mdl/Dialog.as       | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f1977a77/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 c0fd6f3..494286b 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Dialogs.mxml
@@ -38,7 +38,7 @@ limitations under the License.
 
     <mdl:Grid>
         
-        <mdl:Button id="showdialog" text="Show Dialog" raised="true" 
click="showModal()"/>
+        <mdl:Button text="Show Dialog" raised="true" click="showModal()"/>
 
     </mdl:Grid>
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f1977a77/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 33d986a..78d11bd 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
@@ -58,18 +58,18 @@ package org.apache.flex.mdl
                }
 
                COMPILE::JS
-               private var dialog:HTMLElement; //HTMLDialogElement
+               private var dialog:HTMLDialogElement;
 
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-                * @flexjsignorecoercion HTMLElement
+                * @flexjsignorecoercion HTMLDialogElement
          */
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
                        typeNames = "mdl-dialog";
             
-            dialog = document.createElement('dialog') as HTMLElement;
+            dialog = document.createElement('dialog') as HTMLDialogElement;
                        element = dialog as WrappedHTMLElement;
 
                        positioner = element;
@@ -110,12 +110,12 @@ package org.apache.flex.mdl
                                                
Application.topLevelApplication.addElement(this);
                                        }
 
-                                       if (!dialog["showModal"]) { 
//!dialog.showModal
+                                       if (!dialog["showModal"]) {
                                                
dialogPolyfill.registerDialog(dialog);
                                        }
                                }
                                
-                               dialog["showModal"](); //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();
                        }
                }
        }

Reply via email to