home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
AIMP2
/
aimp_2.61.583.exe
/
$TEMP
/
YandexPackSetup.msi
/
filD64B4FF876FBE1C1DC8D6CEE733B6F4D
< prev
next >
Wrap
Text File
|
2010-07-12
|
1KB
|
41 lines
XB.UI.Behaviour.Style = XB.UI.Behaviour.extend({
name: "style",
nodeName: "html:span",
create: function() {
this.namespaceURI = XB.UI.consts.STR_HTML_NS;
var parentNode = this.comment.parentNode;
if (parentNode.localName == "menuitem")
this.mode = "menuitem";
this.base();
this.on(this.node, "DOMSubtreeModified", this.onModified, false, this);
},
append: function() {
if (this.mode == "menuitem") {
} else
this.base();
},
onAttribute: function(attrChangeEvent) {
var cssProperty = this._attrMap[attrChangeEvent.name];
if (cssProperty)
this.node.style[cssProperty] = attrChangeEvent.value;
},
_attrMap: {
__proto__: null,
"color": "color",
"font-weight": "fontWeight"
},
onModified: function() {
if (this.mode == "menuitem") {
var parentNode = this.comment.parentNode;
parentNode.setAttribute("label", this.node.textContent);
}
}
});