| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 E("contextBlock").setAttribute("disabled", "filter" in item && item.filter &&
!item.filter.disabled); | 422 E("contextBlock").setAttribute("disabled", "filter" in item && item.filter &&
!item.filter.disabled); |
| 423 E("contextEditFilter").setAttribute("disabled", !("filter" in item && item.fil
ter)); | 423 E("contextEditFilter").setAttribute("disabled", !("filter" in item && item.fil
ter)); |
| 424 E("contextOpen").setAttribute("disabled", "tooltip" in item || item.type == "E
LEMHIDE"); | 424 E("contextOpen").setAttribute("disabled", "tooltip" in item || item.type == "E
LEMHIDE"); |
| 425 E("contextFlash").setAttribute("disabled", "tooltip" in item || !(item.type in
visual) || (item.filter && !item.filter.disabled && !(item.filter instanceof Wh
itelistFilter))); | 425 E("contextFlash").setAttribute("disabled", "tooltip" in item || !(item.type in
visual) || (item.filter && !item.filter.disabled && !(item.filter instanceof Wh
itelistFilter))); |
| 426 E("contextCopyFilter").setAttribute("disabled", !allItems.some(function(item)
{return "filter" in item && item.filter})); | 426 E("contextCopyFilter").setAttribute("disabled", !allItems.some(function(item)
{return "filter" in item && item.filter})); |
| 427 | 427 |
| 428 return true; | 428 return true; |
| 429 } | 429 } |
| 430 | 430 |
| 431 /** | 431 /** |
| 432 * Resets context menu data once the context menu is closed. | |
| 433 */ | |
| 434 function clearContextMenu(/**Event*/ event) | |
| 435 { | |
| 436 if (event.eventPhase != event.AT_TARGET) | |
| 437 return; | |
| 438 | |
| 439 { | |
| 440 let menuItem = E("contextDisableOnSite"); | |
| 441 menuItem.item = item; | |
| 442 menuItem.filter = filter; | |
| 443 menuItem.domain = domain; | |
| 444 } | |
| 445 } | |
| 446 | |
| 447 /** | |
| 448 * Processed mouse clicks on the item list. | 432 * Processed mouse clicks on the item list. |
| 449 * @param {Event} event | 433 * @param {Event} event |
| 450 */ | 434 */ |
| 451 function handleClick(event) | 435 function handleClick(event) |
| 452 { | 436 { |
| 453 let item = treeView.getItemAt(event.clientX, event.clientY); | 437 let item = treeView.getItemAt(event.clientX, event.clientY); |
| 454 if (event.button == 0 && treeView.getColumnAt(event.clientX, event.clientY) ==
"state") | 438 if (event.button == 0 && treeView.getColumnAt(event.clientX, event.clientY) ==
"state") |
| 455 { | 439 { |
| 456 if (item.filter) | 440 if (item.filter) |
| 457 enableFilter(item.filter, item.filter.disabled); | 441 enableFilter(item.filter, item.filter.disabled); |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 return {tooltip: this.itemsDummyTooltip}; | 1254 return {tooltip: this.itemsDummyTooltip}; |
| 1271 }, | 1255 }, |
| 1272 | 1256 |
| 1273 invalidateItem: function(item) | 1257 invalidateItem: function(item) |
| 1274 { | 1258 { |
| 1275 let row = this.data.indexOf(item); | 1259 let row = this.data.indexOf(item); |
| 1276 if (row >= 0) | 1260 if (row >= 0) |
| 1277 this.boxObject.invalidateRow(row); | 1261 this.boxObject.invalidateRow(row); |
| 1278 } | 1262 } |
| 1279 } | 1263 } |
| OLD | NEW |