[XForms] Fix permission manager problem. Bug 339284, r=me+smaug, patch by doronr
git-svn-id: svn://10.0.0.236/trunk@198560 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
f82b3d860b
commit
6cf3a1fe8d
@ -140,13 +140,15 @@ var gPermissionManager = {
|
||||
for (var i = 0; i < this._permissions.length; ++i) {
|
||||
// check if the host and the permission matches
|
||||
if (this._permissions[i].rawHost == host) {
|
||||
if (this._permissions[i].perm == permission) {
|
||||
exists = true;
|
||||
}
|
||||
|
||||
// update the array entry
|
||||
var capabilityString = this._getCapabilityString(permission);
|
||||
this._permissions[i].capability = capabilityString;
|
||||
this._permissions[i].perm = permission;
|
||||
|
||||
if (this._permissions[i].perm == permission) {
|
||||
exists = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -327,6 +329,9 @@ var gPermissionManager = {
|
||||
}
|
||||
document.getElementById("removePermission").disabled = !this._permissions.length;
|
||||
document.getElementById("removeAllPermissions").disabled = !this._permissions.length;
|
||||
|
||||
if (!this._view.rowCount)
|
||||
this.clear();
|
||||
},
|
||||
|
||||
onAllPermissionsDeleted: function ()
|
||||
@ -341,6 +346,7 @@ var gPermissionManager = {
|
||||
}
|
||||
document.getElementById("removePermission").disabled = true;
|
||||
document.getElementById("removeAllPermissions").disabled = true;
|
||||
this.clear();
|
||||
},
|
||||
|
||||
onPermissionKeyPress: function (aEvent)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user