Bug 392890 - "Provide a text label for the Search edit in Download Manager" [p=dao@mozilla.com (Dão Gottwald) r=Mardak a=blocking-firefox3+]
This commit is contained in:
Родитель
61e8f8cf6e
Коммит
cf514ad9e9
|
@ -1000,7 +1000,6 @@ function buildDownloadList()
|
|||
// Clear out values before using them
|
||||
clearTimeout(gBuilder);
|
||||
gStmt.reset();
|
||||
gSearchTerms = "";
|
||||
|
||||
// Clear the list before adding items by replacing with a shallow copy
|
||||
let (empty = gDownloadsView.cloneNode(false)) {
|
||||
|
@ -1008,9 +1007,7 @@ function buildDownloadList()
|
|||
gDownloadsView = empty;
|
||||
}
|
||||
|
||||
// If the search box isn't empty, trim the search terms
|
||||
if (!gSearchBox.hasAttribute("empty"))
|
||||
gSearchTerms = gSearchBox.value.replace(/^\s+|\s+$/, "");
|
||||
gSearchTerms = gSearchBox.value.replace(/^\s+|\s+$/g, "");
|
||||
|
||||
let like = "%" + gStmt.escapeStringForLIKE(gSearchTerms, "/") + "%";
|
||||
|
||||
|
@ -1155,20 +1152,6 @@ function stripeifyList(aItem)
|
|||
}
|
||||
}
|
||||
|
||||
function onSearchboxBlur() {
|
||||
if (gSearchBox.value == "") {
|
||||
gSearchBox.setAttribute("empty", "true");
|
||||
gSearchBox.value = gSearchBox.getAttribute("defaultValue");
|
||||
}
|
||||
}
|
||||
|
||||
function onSearchboxFocus() {
|
||||
if (gSearchBox.hasAttribute("empty")) {
|
||||
gSearchBox.value = "";
|
||||
gSearchBox.removeAttribute("empty");
|
||||
}
|
||||
}
|
||||
|
||||
// we should be using real URLs all the time, but until
|
||||
// bug 239948 is fully fixed, this will do...
|
||||
//
|
||||
|
|
|
@ -173,14 +173,7 @@
|
|||
|
||||
<hbox id="search">
|
||||
<textbox type="timed" timeout="500" id="searchbox"
|
||||
oncommand="buildDownloadList();" empty="true"
|
||||
value="&searchBox.label;" defaultValue="&searchBox.label;"
|
||||
onblur="onSearchboxBlur();" onfocus="onSearchboxFocus();"/>
|
||||
<spacer flex="1"/>
|
||||
<!-- TODO get advanced search working (Bug 390491)
|
||||
<button label="Advanced Search"/>
|
||||
-->
|
||||
<resizer id="windowResizer" dir="bottomright"/>
|
||||
oncommand="buildDownloadList();" emptytext="&searchBox.label;"/>
|
||||
</hbox>
|
||||
|
||||
</window>
|
||||
|
|
|
@ -101,7 +101,3 @@ menuitem:not([type]) {
|
|||
min-height: 32px;
|
||||
min-width: 32px;
|
||||
}
|
||||
|
||||
#searchbox[empty] {
|
||||
color: GrayText;
|
||||
}
|
||||
|
|
|
@ -82,10 +82,6 @@ richlistitem[type="download"] button {
|
|||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
#search > spacer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#searchbox {
|
||||
-moz-appearance: none;
|
||||
border: 3px solid;
|
||||
|
@ -99,7 +95,3 @@ richlistitem[type="download"] button {
|
|||
padding: 0 8px;
|
||||
-moz-padding-start: 16px;
|
||||
}
|
||||
|
||||
#searchbox[empty] {
|
||||
color: -moz-Field;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,3 @@ richlistitem[type="download"] .dateTime {
|
|||
min-height: 32px;
|
||||
min-width: 32px;
|
||||
}
|
||||
|
||||
#searchbox[empty] {
|
||||
color: GrayText;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче