%xformsDTD; ]> return { __proto__: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'control'), set value(val) { this.firstChild.data = val ? val : ""; } }; return this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "control"); return { __proto__: this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "control"), set value(val) { // We have to use a timeout since set value can be hit during the // output's constructor. There are always potential problems // changing the DOM during the constructor. For example, if we // don't use a timeout then setting the img's @src won't work on // FF 1.5 or FF 2. So we'll wait a tick before changing it here. setTimeout(function(img, val) {img.src = val;}, 0, this, val); } }; return { __proto__: this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "control"), set value(val) { // We have to use a timeout since set value can be hit during the // output's constructor. There are always potential problems // changing the DOM during the constructor. For example, if we // don't use a timeout then setting the img's @src won't work on // FF 1.5 or FF 2. So we'll wait a tick before changing it here. setTimeout(function(img, val) {img.src = "data:[image/*][;base64]," + val;}, 0, this, val); } }; return { _implicitContent: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'implicitcontent'), _explicitContent: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'explicitcontent'), __proto__: this, set value(val) { if (val != null) { this._implicitContent.hidden = false; this._explicitContent.hidden = true; this._implicitContent.textContent = val; } else { this._implicitContent.hidden = true; this._explicitContent.hidden = false; this._implicitContent.textContent = ''; } }, get textValue() { if (!this._implicitContent.hidden) return this._implicitContent.textContent; return this.textContent; }, get nodeValue() { var fragment = this.ownerDocument.createDocumentFragment(); var container = null; if (!this._implicitContent.hidden) container = this._implicitContent; else container = this; for (var node = container.firstChild; node; node = node.nextSibling) { fragment.appendChild(node.cloneNode(true)); } var rep = new XMLSerializer().serializeToString(fragment); return fragment; } }; if (event.originalTarget == this.control) { this.dispatchDOMUIEvent("DOMFocusIn"); } if (event.originalTarget == this.control) { this.dispatchDOMUIEvent("DOMFocusOut"); } return this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'control'); // XXX: we need to fire 'DOMActivate' event to get xforms:submit to // work, since xul:button do not do it (see a bug 323005 // https://bugzilla.mozilla.org/show_bug.cgi?id=323005). this.dispatchDOMUIEvent("DOMActivate"); return { __proto__: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'control'), set disabled(val) { this.isDisabled = val; }, isDisabled: false } if (!this.control.isDisabled) this.dispatchDOMUIEvent("DOMActivate"); if (!this._deck) { this._deck = this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "deck"); } return this._deck; null return { _contentSwitcher: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'contentswitcher'), _implicitContent: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'implicitcontent'), setValue: function setValue(aUseInlineValue, aValue) { if (aUseInlineValue) { this._contentSwitcher.selectedIndex = 1; } else { this._implicitContent.textContent = aValue; this._contentSwitcher.selectedIndex = 0; } } }; // Since the method gets coordinates relative document but tooltip can // be shown relative screen then we should do the following magic. // We use passed coordinates to save the logic of xtf part of // message. Also we substract 21 from y coordinate to revoke tooltip // logic. var boxObject = this.ownerDocument.getBoxObjectFor(this.parentNode); var deltaX = aPosX - boxObject.x; var deltaY = aPosY - boxObject.y; aPosX = boxObject.screenX + deltaX; aPosY = boxObject.screenY + deltaY - 21; this.popup.showPopup(this.ownerDocument.documentElement, aPosX, aPosY, "tooltip", null, null); this.popup.hidePopup(); if (!this._popup) { this._popup = this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "popup"); } return this._popup; return { get value() { return this._textControl.value; }, set value(val) { this._textControl.value = val; }, set readonly(val) { if (val) { this._browseButton.setAttribute('disabled', 'disabled'); this._clearButton.setAttribute('disabled', 'disabled'); } else { this._browseButton.removeAttribute('disabled'); this._clearButton.removeAttribute('disabled'); } }, focus: function() { this._browseButton.focus(); }, _browseButton: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'browse_button'), _clearButton: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'clear_button'), _textControl: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'text_control'), }; switch (event.originalTarget.getAttribute("anonid")) { case "browse_button": this.uploadElement.pickFile(); this.dispatchDOMUIEvent('DOMActivate'); break; case "clear_button": this.uploadElement.clearFile(); this.dispatchDOMUIEvent('DOMActivate'); break; }