summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components/preferences/permissions.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-26 07:12:25 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-26 07:12:25 +0200
commit49ba38d216ec1a1f73d0368e4942bfd6bed9e52e (patch)
tree6a146b303464735d077ed13cc6d8d972b994017a /application/palemoon/components/preferences/permissions.js
parentcbbc05dd10a0c7e9a4d306d3cc4c49f7910a51e3 (diff)
downloadUXP-49ba38d216ec1a1f73d0368e4942bfd6bed9e52e.tar
UXP-49ba38d216ec1a1f73d0368e4942bfd6bed9e52e.tar.gz
UXP-49ba38d216ec1a1f73d0368e4942bfd6bed9e52e.tar.lz
UXP-49ba38d216ec1a1f73d0368e4942bfd6bed9e52e.tar.xz
UXP-49ba38d216ec1a1f73d0368e4942bfd6bed9e52e.zip
Bug 1039540 - Disable the sorting of rows of sub-dialogs when right clicking (+ style clean up)
Diffstat (limited to 'application/palemoon/components/preferences/permissions.js')
-rw-r--r--application/palemoon/components/preferences/permissions.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/application/palemoon/components/preferences/permissions.js b/application/palemoon/components/preferences/permissions.js
index 195d47a2f..0bae7fc8d 100644
--- a/application/palemoon/components/preferences/permissions.js
+++ b/application/palemoon/components/preferences/permissions.js
@@ -233,8 +233,20 @@ var gPermissionManager = {
var urlLabel = document.getElementById("urlLabel");
urlLabel.hidden = !urlFieldVisible;
- var os = Components.classes["@mozilla.org/observer-service;1"]
- .getService(Components.interfaces.nsIObserverService);
+ let treecols = document.getElementsByTagName("treecols")[0];
+ treecols.addEventListener("click", event => {
+ if (event.target.nodeName != "treecol" || event.button != 0) {
+ return;
+ }
+
+ let sortField = event.target.getAttribute("data-field-name");
+ if (!sortField) {
+ return;
+ }
+
+ gPermissionManager.onPermissionSort(sortField);
+ });
+
Services.obs.notifyObservers(null, NOTIFICATION_FLUSH_PERMISSIONS, this._type);
Services.obs.addObserver(this, "perm-changed", false);