diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-26 07:12:25 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-26 07:12:25 +0200 |
commit | 49ba38d216ec1a1f73d0368e4942bfd6bed9e52e (patch) | |
tree | 6a146b303464735d077ed13cc6d8d972b994017a /application/palemoon | |
parent | cbbc05dd10a0c7e9a4d306d3cc4c49f7910a51e3 (diff) | |
download | UXP-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')
-rw-r--r-- | application/palemoon/components/preferences/permissions.js | 16 | ||||
-rw-r--r-- | application/palemoon/components/preferences/permissions.xul | 4 |
2 files changed, 16 insertions, 4 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); diff --git a/application/palemoon/components/preferences/permissions.xul b/application/palemoon/components/preferences/permissions.xul index 8f24c8946..ebd7242fb 100644 --- a/application/palemoon/components/preferences/permissions.xul +++ b/application/palemoon/components/preferences/permissions.xul @@ -54,10 +54,10 @@ onselect="gPermissionManager.onPermissionSelected();"> <treecols> <treecol id="siteCol" label="&treehead.sitename.label;" flex="3" - onclick="gPermissionManager.onPermissionSort('rawHost');" persist="width"/> + data-field-name="rawHost" persist="width"/> <splitter class="tree-splitter"/> <treecol id="statusCol" label="&treehead.status.label;" flex="1" - onclick="gPermissionManager.onPermissionSort('capability');" persist="width"/> + data-field-name="capability" persist="width"/> </treecols> <treechildren/> </tree> |