flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject svn commit: r1437149 - in /flex/asjs/branches/develop/frameworks/js/VanillaSDK: mx/core/UIComponent.js spark/components/Button.js spark/components/Group.js spark/components/Label.js
Date Tue, 22 Jan 2013 20:34:21 GMT
Author: erikdebruin
Date: Tue Jan 22 20:34:21 2013
New Revision: 1437149

URL: http://svn.apache.org/viewvc?rev=1437149&view=rev
Log:
- minor changes - needed to test Publisher app and workflow

Modified:
    flex/asjs/branches/develop/frameworks/js/VanillaSDK/mx/core/UIComponent.js
    flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Button.js
    flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Group.js
    flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Label.js

Modified: flex/asjs/branches/develop/frameworks/js/VanillaSDK/mx/core/UIComponent.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/VanillaSDK/mx/core/UIComponent.js?rev=1437149&r1=1437148&r2=1437149&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/VanillaSDK/mx/core/UIComponent.js (original)
+++ flex/asjs/branches/develop/frameworks/js/VanillaSDK/mx/core/UIComponent.js Tue Jan 22
20:34:21 2013
@@ -4,16 +4,12 @@ goog.provide('mx.core.UIComponent');
  * @constructor
  */
 mx.core.UIComponent = function() {
-	this.element = goog.dom.createDom('div');
-	goog.dom.appendChild(document.body, this.element);
 }
 
 /**
- * @type {mx.core.UIComponent}
+ * @type {Object}
  */
-mx.core.UIComponent.prototype.addChild = function(child) {
-	goog.dom.appendChild(this.element, child);
-}
+mx.core.UIComponent.prototype.element;
 
 /**
  * @type {number}
@@ -25,7 +21,7 @@ Object.defineProperty(
 	{
 	get:
 		function() {
-			return this.element.style.offsetLeft;
+			return this.element.offsetLeft;
 		}, 
 	set:
 		function(value) {
@@ -44,7 +40,7 @@ Object.defineProperty(
 	{
 	get:
 		function() {
-			return this.element.style.offsetTop;
+			return this.element.offsetTop;
 		}, 
 	set:
 		function(value) {

Modified: flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Button.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Button.js?rev=1437149&r1=1437148&r2=1437149&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Button.js (original)
+++ flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Button.js Tue Jan
22 20:34:21 2013
@@ -8,15 +8,36 @@ goog.require("mx.core.UIComponent");
 
 /**
  * @constructor
+ * @extends {mx.core.UIComponent}
  */
 spark.components.Button = function() {
 	goog.base(this);
 	
-	this.element = goog.dom.createDom('button', {'id':'button'}, 'Click here');
-	this.addChild(this.element);
+	this.element = goog.dom.createDom('button', {'id':'button'});
 }
 goog.inherits(spark.components.Button, mx.core.UIComponent);
 
 spark.components.Button.prototype.addEventListener = function(type, handler) {
 	goog.events.listen(this.element, goog.events.EventType.CLICK, handler, false, this);
-};
\ No newline at end of file
+};
+
+/**
+ * @type {string}
+ */
+spark.components.Button.prototype.label;
+
+Object.defineProperty(
+	spark.components.Button.prototype, 
+	'label', 
+	{get:function() {
+		return this.element.innerHTML;
+	}, configurable:true}
+);
+
+Object.defineProperty(
+	spark.components.Button.prototype, 
+	'label', 
+	{set:function(value) {
+		this.element.innerHTML = value;
+	}, configurable:true}
+);

Modified: flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Group.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Group.js?rev=1437149&r1=1437148&r2=1437149&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Group.js (original)
+++ flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Group.js Tue Jan
22 20:34:21 2013
@@ -1,11 +1,18 @@
 goog.provide('spark.components.Group');
 
+goog.require("goog.dom");
+
 /**
  * @constructor
  */
 spark.components.Group = function() {
 }
 
+/**
+ * @param {Object} object
+ */
 spark.components.Group.prototype.addElement = function(object) {
-	console.log(object);
+	object.element.style.position = "absolute";
+	
+	goog.dom.appendChild(document.body, object.element);
 };
\ No newline at end of file

Modified: flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Label.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Label.js?rev=1437149&r1=1437148&r2=1437149&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Label.js (original)
+++ flex/asjs/branches/develop/frameworks/js/VanillaSDK/spark/components/Label.js Tue Jan
22 20:34:21 2013
@@ -4,12 +4,12 @@ goog.require("mx.core.UIComponent");
 
 /**
  * @constructor
+ * @extends {mx.core.UIComponent}
  */
 spark.components.Label = function() {
 	goog.base(this);
 	
 	this.element = goog.dom.createDom('div', null, 'Boo!');
-	this.addChild(this.element);
 }
 goog.inherits(spark.components.Label, mx.core.UIComponent);
 



Mime
View raw message