Bug 483370 - Buttons on Security tab are broken when windows are already open. r=mconnor

This commit is contained in:
Dão Gottwald 2009-03-17 14:08:07 +01:00
parent b864773394
commit f82c781d1a
2 changed files with 18 additions and 10 deletions

View File

@ -79,11 +79,10 @@ var gCookiesWindow = {
this._tree.view.selection.select(0);
if (aInitialLoad) {
if ("arguments" in window && window.arguments[0] &&
window.arguments[0].filterString) {
document.getElementById("filter").value = window.arguments[0].filterString;
this.filter();
}
if ("arguments" in window &&
window.arguments[0] &&
window.arguments[0].filterString)
this.setFilter(window.arguments[0].filterString);
}
else {
if (document.getElementById("filter").value != "")
@ -887,6 +886,11 @@ var gCookiesWindow = {
document.getElementById("cookiesIntro").value = gCookiesWindow._bundle.getString("cookiesFiltered");
},
setFilter: function (aFilterString) {
document.getElementById("filter").value = aFilterString;
this.filter();
},
focusFilterBox: function () {
var filter = document.getElementById("filter");
filter.focus();

View File

@ -53,15 +53,19 @@ function SignonsStartup() {
LoadSignons();
// filter the table if requested by caller
if (window.arguments && window.arguments[0] &&
window.arguments[0].filterString) {
document.getElementById("filter").value = window.arguments[0].filterString;
_filterPasswords();
}
if (window.arguments &&
window.arguments[0] &&
window.arguments[0].filterString)
setFilter(window.arguments[0].filterString);
FocusFilterBox();
}
function setFilter(aFilterString) {
document.getElementById("filter").value = aFilterString;
_filterPasswords();
}
var signonsTreeView = {
_filterSet : [],
_lastSelectedRanges : [],