diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-06-24 12:20:08 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-06-24 12:20:08 +0200 |
commit | 640f9ed3a5165b87644aa40342c62bc17f3ec4d7 (patch) | |
tree | ec48ff410680033a5a047b3dd9e1ed5f589e8947 | |
parent | 1f50e1c476a287692847d7d8f94a903517b727a7 (diff) | |
download | UXP-640f9ed3a5165b87644aa40342c62bc17f3ec4d7.tar UXP-640f9ed3a5165b87644aa40342c62bc17f3ec4d7.tar.gz UXP-640f9ed3a5165b87644aa40342c62bc17f3ec4d7.tar.lz UXP-640f9ed3a5165b87644aa40342c62bc17f3ec4d7.tar.xz UXP-640f9ed3a5165b87644aa40342c62bc17f3ec4d7.zip |
Preferences - Show Cookies - "Remove Selected" button should not be active if there are no items
-rw-r--r-- | application/basilisk/components/preferences/cookies.js | 4 | ||||
-rw-r--r-- | application/palemoon/components/preferences/cookies.js | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/application/basilisk/components/preferences/cookies.js b/application/basilisk/components/preferences/cookies.js index 921eee4c0..3529a4159 100644 --- a/application/basilisk/components/preferences/cookies.js +++ b/application/basilisk/components/preferences/cookies.js @@ -565,6 +565,8 @@ var gCookiesWindow = { onCookieSelected: function () { var item; var seln = this._tree.view.selection; + var hasRows = this._tree.view.rowCount > 0; + var hasSelection = seln.count > 0; if (!this._view._filtered) item = this._view._getItemAtIndex(seln.currentIndex); else @@ -592,7 +594,7 @@ var gCookiesWindow = { removeSelectedCookies.label = PluralForm.get(selectedCookieCount, buttonLabel) .replace("#1", selectedCookieCount); - removeSelectedCookies.disabled = !(seln.count > 0); + removeSelectedCookies.disabled = !hasRows || !hasSelection; }, performDeletion: function gCookiesWindow_performDeletion(deleteItems) { diff --git a/application/palemoon/components/preferences/cookies.js b/application/palemoon/components/preferences/cookies.js index 4ef30d48e..74ec3d1d2 100644 --- a/application/palemoon/components/preferences/cookies.js +++ b/application/palemoon/components/preferences/cookies.js @@ -540,6 +540,8 @@ var gCookiesWindow = { onCookieSelected: function () { var properties, item; var seln = this._tree.view.selection; + var hasRows = this._tree.view.rowCount > 0; + var hasSelection = seln.count > 0; if (!this._view._filtered) item = this._view._getItemAtIndex(seln.currentIndex); else @@ -570,7 +572,7 @@ var gCookiesWindow = { removeSelectedCookies.label = PluralForm.get(selectedCookieCount, buttonLabel) .replace("#1", selectedCookieCount); - removeSelectedCookies.disabled = !(seln.count > 0); + removeSelectedCookies.disabled = !hasRows || !hasSelection; }, performDeletion: function gCookiesWindow_performDeletion(deleteItems) { |