flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [21/50] [abbrv] git commit: [flex-asjs] [refs/heads/dual] - replicate b22fcdbafb21ec56588f2d04567703eb1d6a1bab to Basic
Date Thu, 09 Feb 2017 05:45:13 GMT
replicate b22fcdbafb21ec56588f2d04567703eb1d6a1bab to Basic


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

Branch: refs/heads/dual
Commit: e1ef3397cb7c0fd557cee45c6a681765b84284b1
Parents: 79bba0d
Author: Alex Harui <aharui@apache.org>
Authored: Mon Feb 6 12:42:47 2017 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Feb 6 12:42:47 2017 -0800

----------------------------------------------------------------------
 .../Basic/src/main/flex/BasicClasses.as         |  1 +
 .../src/main/flex/org/apache/flex/html/Alert.as | 38 ++++++++++++++++++--
 .../org/apache/flex/html/beads/AlertView.as     |  9 ++---
 3 files changed, 41 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e1ef3397/frameworks/projects/Basic/src/main/flex/BasicClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/BasicClasses.as b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
index 87997cc..fca4ee2 100644
--- a/frameworks/projects/Basic/src/main/flex/BasicClasses.as
+++ b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
@@ -33,6 +33,7 @@ internal class BasicClasses
 	import org.apache.flex.html.accessories.PasswordInputBead; PasswordInputBead;
 	import org.apache.flex.html.accessories.TextPromptBead; TextPromptBead;
     import org.apache.flex.html.beads.AlertView; AlertView;
+    import org.apache.flex.html.beads.models.AlertModel; AlertModel;
 	COMPILE::SWF
 	{
 		import org.apache.flex.html.beads.BackgroundImageBead; BackgroundImageBead;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e1ef3397/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/Alert.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/Alert.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/Alert.as
index b7f50dc..6975efb 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/Alert.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/Alert.as
@@ -127,14 +127,34 @@ package org.apache.flex.html
             titleBar = new TitleBar();
             addElement(titleBar);
             titleBar.element.id = 'titleBar';
+            titleBar.percentWidth = 100;
+            titleBar.height = 24;
+            titleBar.element.style.top = "0px";
+            titleBar.element.style.right = "0px";
+            titleBar.element.style.left = "0px";
+            titleBar.element.style.marginBottom = "6px";
+
             
             label = new Label();
             addElement(label);
+            label.element.style.display = "block";
+            label.element.style.padding = "6px";
+            label.element.style.left = "0px";
+            label.element.style.right = "0px";
+            label.element.style.whiteSpace = "normal";
+
             label.element.id = 'message';
             
             // add a place for the buttons
             buttonArea = new Container();
+            buttonArea.percentWidth = 100;
+            buttonArea.height = 28;
             addElement(buttonArea);
+            buttonArea.element.style.marginTop = "6px";
+            buttonArea.element.style.marginBottom = "6px";
+            buttonArea.element.style.padding = "2px";
+            buttonArea.element.style.left = "0px";
+            buttonArea.element.style.right = "0px";
             buttonArea.element.id = 'buttonArea';
             
             return element;
@@ -168,10 +188,10 @@ package org.apache.flex.html
             
             COMPILE::JS
             {
-                alert.positioner.style.position = 'relative';
-                alert.positioner.style.width = '200px';
                 alert.positioner.style.margin = 'auto';
-                alert.positioner.style.top = '100px';
+                alert.positioner.style.left = "50%";
+                alert.positioner.style.top = "50%";
+
             }
 		}
 		
@@ -206,6 +226,10 @@ package org.apache.flex.html
 		public function set title(value:String):void
 		{
 			IAlertModel(model).title = value;
+            COMPILE::JS {
+                titleBar.title = value;
+            }
+
 		}
 		
 		/**
@@ -223,6 +247,10 @@ package org.apache.flex.html
 		public function set message(value:String):void
 		{
 			IAlertModel(model).message = value;
+            COMPILE::JS {
+                label.text = value;
+            }
+
 		}
 		
 		/**
@@ -248,24 +276,28 @@ package org.apache.flex.html
                     var ok:TextButton = new TextButton();
                     buttonArea.addElement(ok);
                     ok.text = 'OK';
+                    ok.element.style.margin = "4px";
                     goog.events.listen(ok.element, 'click', dismissAlert);
                 }
                 if (flags & Alert.CANCEL) {
                     var cancel:TextButton = new TextButton();
                     buttonArea.addElement(cancel);
                     cancel.text = 'Cancel';
+                    cancel.element.style.margin = "4px";
                     goog.events.listen(cancel.element, 'click', dismissAlert);
                 }
                 if (flags & Alert.YES) {
                     var yes:TextButton = new TextButton();
                     buttonArea.addElement(yes);
                     yes.text = 'YES';
+                    yes.element.style.margin = "4px";
                     goog.events.listen(yes.element, 'click', dismissAlert);
                 }
                 if (flags & Alert.NO) {
                     var nob:TextButton = new TextButton();
                     buttonArea.addElement(nob);
                     nob.text = 'NO';
+                    nob.element.style.margin = "4px";
                     goog.events.listen(nob.element, 'click', dismissAlert);
                 }
                 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e1ef3397/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AlertView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AlertView.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AlertView.as
index 5788d47..ddd73cf 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AlertView.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AlertView.as
@@ -28,6 +28,7 @@ package org.apache.flex.html.beads
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
+    import org.apache.flex.events.MouseEvent;
 	import org.apache.flex.events.IEventDispatcher;
     import org.apache.flex.geom.Rectangle;
 	import org.apache.flex.html.Alert;
@@ -182,7 +183,7 @@ package org.apache.flex.html.beads
 		/**
 		 * @private
 		 */
-		private function handleOK(event:Event):void
+		private function handleOK(event:MouseEvent):void
 		{
 			// create some custom event where the detail value
 			// is the OK button flag. Do same for other event handlers
@@ -192,7 +193,7 @@ package org.apache.flex.html.beads
 		/**
 		 * @private
 		 */
-		private function handleCancel(event:Event):void
+		private function handleCancel(event:MouseEvent):void
 		{
 			dispatchCloseEvent(Alert.CANCEL);
 		}
@@ -200,7 +201,7 @@ package org.apache.flex.html.beads
 		/**
 		 * @private
 		 */
-		private function handleYes(event:Event):void
+		private function handleYes(event:MouseEvent):void
 		{
 			dispatchCloseEvent(Alert.YES);
 		}
@@ -208,7 +209,7 @@ package org.apache.flex.html.beads
 		/**
 		 * @private
 		 */
-		private function handleNo(event:Event):void
+		private function handleNo(event:MouseEvent):void
 		{
 			dispatchCloseEvent(Alert.NO);
 		}


Mime
View raw message