mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-27 02:43:07 +00:00
[XForms] Fix upload not being readonly when it should. Bug 326062, r=doronr+me, patch by surkov@dc.baikal.ru
This commit is contained in:
parent
68d6a13715
commit
11af52c7be
@ -352,14 +352,8 @@ upload {
|
||||
-moz-binding: url('chrome://xforms/content/xforms.xml#xformswidget-upload-disabled');
|
||||
}
|
||||
|
||||
upload[mozType|type="http://www.w3.org/2001/XMLSchema#anyURI"] {
|
||||
-moz-binding: url('chrome://xforms/content/xforms.xml#xformswidget-upload');
|
||||
}
|
||||
|
||||
upload[mozType|type="http://www.w3.org/2001/XMLSchema#base64Binary"] {
|
||||
-moz-binding: url('chrome://xforms/content/xforms.xml#xformswidget-upload');
|
||||
}
|
||||
|
||||
upload[mozType|type="http://www.w3.org/2001/XMLSchema#anyURI"],
|
||||
upload[mozType|type="http://www.w3.org/2001/XMLSchema#base64Binary"],
|
||||
upload[mozType|type="http://www.w3.org/2001/XMLSchema#hexBinary"] {
|
||||
-moz-binding: url('chrome://xforms/content/xforms.xml#xformswidget-upload');
|
||||
}
|
||||
|
@ -1266,7 +1266,7 @@
|
||||
<children includes="label"/>
|
||||
<html:input anonid="upload_text_control"
|
||||
class="xf-value"
|
||||
readonly="true"/>
|
||||
readonly="readonly"/>
|
||||
<html:button anonid="upload_browse_button"
|
||||
type="button"
|
||||
onclick="this.parentNode.uploadElem.pickFile();"
|
||||
@ -1281,6 +1281,18 @@
|
||||
</content>
|
||||
|
||||
<implementation implements="nsIXFormsUIWidget, nsIXFormsUploadUIElement">
|
||||
<method name="refresh">
|
||||
if (this.accessors.isReadonly()) {
|
||||
this._browseButton.setAttribute("disabled", "disabled");
|
||||
this._clearButton.setAttribute("disabled", "disabled");
|
||||
} else {
|
||||
this._browseButton.removeAttribute("disabled");
|
||||
this._clearButton.removeAttribute("disabled");
|
||||
}
|
||||
|
||||
return true;
|
||||
</method>
|
||||
|
||||
<destructor>
|
||||
this._uploadElem = null;
|
||||
this._textControl = null;
|
||||
@ -1356,17 +1368,16 @@
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:input readonly="true"
|
||||
<html:input readonly="readonly"
|
||||
class="xf-value"
|
||||
xbl:inherits="accesskey"/>
|
||||
<html:button type="button"
|
||||
disabled="true"
|
||||
disabled="disabled"
|
||||
xbl:inherits="accesskey"> &xforms.upload.browsetext; </html:button>
|
||||
<html:button type="button"
|
||||
disabled="true"
|
||||
disabled="disabled"
|
||||
xbl:inherits="accesskey"> &xforms.upload.cleartext; </html:button>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
</bindings>
|
||||
|
Loading…
Reference in New Issue
Block a user