You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2015/01/16 00:40:48 UTC
git commit: [flex-asjs] [refs/heads/develop] - The jQuery CheckBox is
just the html CheckBox, at least for now.
Repository: flex-asjs
Updated Branches:
refs/heads/develop 2bd7d1e8c -> cbc4974ff
The jQuery CheckBox is just the html CheckBox, at least for now.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/cbc4974f
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/cbc4974f
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/cbc4974f
Branch: refs/heads/develop
Commit: cbc4974ff100c89bddfeb2e0c5c81415416ef55f
Parents: 2bd7d1e
Author: Peter Ent <pe...@apache.org>
Authored: Thu Jan 15 15:02:15 2015 -0500
Committer: Peter Ent <pe...@apache.org>
Committed: Thu Jan 15 15:02:15 2015 -0500
----------------------------------------------------------------------
.../src/org/apache/flex/jquery/CheckBox.js | 35 +++++++++++---------
1 file changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cbc4974f/frameworks/js/FlexJS/src/org/apache/flex/jquery/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/CheckBox.js
index be4e7ab..2bbc068 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/jquery/CheckBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/CheckBox.js
@@ -24,36 +24,39 @@ goog.require('org.apache.flex.core.UIBase');
*/
org.apache.flex.jquery.CheckBox = function() {
org.apache.flex.jquery.CheckBox.base(this, 'constructor');
-
};
goog.inherits(org.apache.flex.jquery.CheckBox,
org.apache.flex.core.UIBase);
/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.jquery.CheckBox.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'CheckBox',
+ qName: 'org.apache.flex.jquery.CheckBox'}] };
+
+
+/**
* @override
*/
org.apache.flex.jquery.CheckBox.prototype.createElement =
function() {
- var cb, d, lb;
+ var cb;
+
+ this.element = document.createElement('label');
- d = document.createElement('div');
cb = document.createElement('input');
cb.type = 'checkbox';
- cb.id = 'checkbox1';
-
- lb = document.createElement('label');
- lb.htmlFor = 'checkbox1';
-
- d.appendChild(cb);
- d.appendChild(lb);
-
- this.element = d;
-
- $(cb).button();
+ this.element.appendChild(cb);
+ this.element.appendChild(document.createTextNode(''));
this.positioner = this.element;
+ cb.flexjs_wrapper = this;
this.element.flexjs_wrapper = this;
+
return this.element;
};
@@ -63,7 +66,7 @@ org.apache.flex.jquery.CheckBox.prototype.createElement =
* @return {string} The text getter.
*/
org.apache.flex.jquery.CheckBox.prototype.get_text = function() {
- return this.element.childNodes.item(1).value;
+ return this.element.childNodes.item(1).nodeValue;
};
@@ -73,7 +76,7 @@ org.apache.flex.jquery.CheckBox.prototype.get_text = function() {
*/
org.apache.flex.jquery.CheckBox.prototype.set_text =
function(value) {
- this.element.childNodes.item(1).appendChild(document.createTextNode(value));
+ this.element.childNodes.item(1).nodeValue = value;
};