maintain type selectors when setting class selectors
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/c6aa3477 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/c6aa3477 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/c6aa3477 Branch: refs/heads/develop Commit: c6aa347787ed2f0d949e671089681f198267881b Parents: 0e5eab0 Author: Alex Harui <[email protected]> Authored: Wed Dec 17 17:55:22 2014 -0800 Committer: Alex Harui <[email protected]> Committed: Wed Dec 17 17:55:22 2014 -0800 ---------------------------------------------------------------------- frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js | 9 ++++++++- frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c6aa3477/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js index c5c9204..5035b8c 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js @@ -675,6 +675,13 @@ org.apache.flex.core.UIBase.prototype.set_id = function(value) { * @expose * @type {string} */ +org.apache.flex.core.UIBase.prototype.typeNames = ''; + + +/** + * @expose + * @type {string} + */ org.apache.flex.core.UIBase.prototype.className = ''; @@ -694,7 +701,7 @@ org.apache.flex.core.UIBase.prototype.get_className = function() { org.apache.flex.core.UIBase.prototype.set_className = function(value) { if (this.className !== value) { - this.element.className = value; + this.element.className = this.typeNames ? value + " " + this.typeNames : value; this.className = value; this.dispatchEvent('classNameChanged'); } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c6aa3477/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js index 50f1607..446845b 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js @@ -116,6 +116,7 @@ org.apache.flex.html.Panel.prototype.createElement = this.element = document.createElement('div'); this.element.className = 'Panel'; + this.typeNames = "Panel"; this.contentArea = document.createElement('div'); this.contentArea.flexjs_wrapper = this;
