Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 76B59E0E6 for ; Tue, 22 Jan 2013 20:34:42 +0000 (UTC) Received: (qmail 37122 invoked by uid 500); 22 Jan 2013 20:34:42 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 37042 invoked by uid 500); 22 Jan 2013 20:34:42 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 37033 invoked by uid 99); 22 Jan 2013 20:34:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2013 20:34:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2013 20:34:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C4C59238896F; Tue, 22 Jan 2013 20:34:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@flex.apache.org From: erikdebruin@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130122203421.C4C59238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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);