Closed
Bug 52188
Opened 24 years ago
Closed 24 years ago
Disable/enable Open/Save/Select when appropriate
Categories
(Core :: XUL, defect, P3)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jag+mozbugs, Assigned: jag+mozbugs)
References
Details
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Currently you can click on Open/Save/Select in the xp filepicker when it
shouldn't do anything, for example when nothing is selected and nothing's in the
textfield.
Working on a patch.
Assignee | ||
Comment 2•24 years ago
|
||
Comment 5•24 years ago
|
||
+function doEnabling() {
+ var enable = false;
+
+ // Maybe add check if textInput.value would resolve to an existing
+ // file or directory in .modeOpen. Too costly I think.
+ if (textInput.value!="") {
+ enable = true;
+ }
How about
// Maybe add check if textInput.value would resolve to an existing
// file or directory in .modeOpen. Too costly I think.
var enable = (textInput.value != "");
Faster, shorter, etc.
+
+ if (enable) {
+ if (okButton.getAttribute("disabled")) {
+ okButton.removeAttribute("disabled");
+ }
+ } else {
+ if (!okButton.getAttribute("disabled")) {
+ okButton.setAttribute("disabled","true");
+ }
+ }
+}
Is there an XXX symlink comment a la the one in bug 51118's patch that should go
near the isFile() test in this bug's patch (later, not quoted above)?
/be
Assignee | ||
Comment 7•24 years ago
|
||
Comment 8•24 years ago
|
||
r=pavlov
Comment 9•24 years ago
|
||
Assignee | ||
Comment 10•24 years ago
|
||
Fix checked in on trunk, marking fixed.
You need to log in
before you can comment on or make changes to this bug.
Description
•