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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 this.init(); | 636 this.init(); |
637 this.boxObject = boxObject; | 637 this.boxObject = boxObject; |
638 | 638 |
639 if (this.boxObject) | 639 if (this.boxObject) |
640 { | 640 { |
641 this.noGroupDummy = {index: 0, filter: {text: this.boxObject.treeBody.getA
ttribute("noGroupText"), dummy: true}}; | 641 this.noGroupDummy = {index: 0, filter: {text: this.boxObject.treeBody.getA
ttribute("noGroupText"), dummy: true}}; |
642 this.noFiltersDummy = {index: 0, filter: {text: this.boxObject.treeBody.ge
tAttribute("noFiltersText"), dummy: true}}; | 642 this.noFiltersDummy = {index: 0, filter: {text: this.boxObject.treeBody.ge
tAttribute("noFiltersText"), dummy: true}}; |
643 this.editDummy = {filter: {text: ""}}; | 643 this.editDummy = {filter: {text: ""}}; |
644 | 644 |
645 let atomService = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomS
ervice); | 645 let atomService = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomS
ervice); |
646 let stringAtoms = ["col-filter", "col-enabled", "col-hitcount", "col-lasth
it", "type-comment", "type-filterlist", "type-whitelist", "type-elemhide", "type
-elemhideexception", "type-invalid"]; | 646 let stringAtoms = ["col-filter", "col-enabled", "col-hitcount", "col-lasth
it", "type-invalid", "type-comment", "type-blocking", "type-whitelist", "type-el
emhide", "type-elemhideexception", "type-cssproperty"]; |
647 let boolAtoms = ["selected", "dummy", "slow", "disabled"]; | 647 let boolAtoms = ["selected", "dummy", "slow", "disabled"]; |
648 | 648 |
649 this.atoms = {}; | 649 this.atoms = {}; |
650 for (let atom of stringAtoms) | 650 for (let atom of stringAtoms) |
651 this.atoms[atom] = atomService.getAtom(atom); | 651 this.atoms[atom] = atomService.getAtom(atom); |
652 for (let atom of boolAtoms) | 652 for (let atom of boolAtoms) |
653 { | 653 { |
654 this.atoms[atom + "-true"] = atomService.getAtom(atom + "-true"); | 654 this.atoms[atom + "-true"] = atomService.getAtom(atom + "-true"); |
655 this.atoms[atom + "-false"] = atomService.getAtom(atom + "-false"); | 655 this.atoms[atom + "-false"] = atomService.getAtom(atom + "-false"); |
656 } | 656 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 if (row < 0 || row >= this.data.length) | 721 if (row < 0 || row >= this.data.length) |
722 return ""; | 722 return ""; |
723 | 723 |
724 let list = []; | 724 let list = []; |
725 let filter = this.data[row].filter; | 725 let filter = this.data[row].filter; |
726 list.push("selected-" + this.selection.isSelected(row)); | 726 list.push("selected-" + this.selection.isSelected(row)); |
727 list.push("slow-" + (filter instanceof RegExpFilter && defaultMatcher.isSlow
Filter(filter))); | 727 list.push("slow-" + (filter instanceof RegExpFilter && defaultMatcher.isSlow
Filter(filter))); |
728 if (filter instanceof ActiveFilter) | 728 if (filter instanceof ActiveFilter) |
729 list.push("disabled-" + filter.disabled); | 729 list.push("disabled-" + filter.disabled); |
730 list.push("dummy-" + ("dummy" in filter)); | 730 list.push("dummy-" + ("dummy" in filter)); |
731 | 731 list.push("type-" + filter.type); |
732 if (filter instanceof CommentFilter) | |
733 list.push("type-comment"); | |
734 else if (filter instanceof BlockingFilter) | |
735 list.push("type-filterlist"); | |
736 else if (filter instanceof WhitelistFilter) | |
737 list.push("type-whitelist"); | |
738 else if (filter instanceof ElemHideFilter) | |
739 list.push("type-elemhide"); | |
740 else if (filter instanceof ElemHideException) | |
741 list.push("type-elemhideexception"); | |
742 else if (filter instanceof InvalidFilter) | |
743 list.push("type-invalid"); | |
744 | 732 |
745 return this.generateProperties(list, properties); | 733 return this.generateProperties(list, properties); |
746 }, | 734 }, |
747 | 735 |
748 getCellProperties: function(row, col, properties) | 736 getCellProperties: function(row, col, properties) |
749 { | 737 { |
750 return this.getRowProperties(row, properties) + " " + this.getColumnProperti
es(col, properties); | 738 return this.getRowProperties(row, properties) + " " + this.getColumnProperti
es(col, properties); |
751 }, | 739 }, |
752 | 740 |
753 cycleHeader: function(col) | 741 cycleHeader: function(col) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 getProgressMode: () => null, | 828 getProgressMode: () => null, |
841 getImageSrc: () => null, | 829 getImageSrc: () => null, |
842 isSeparator: () => false, | 830 isSeparator: () => false, |
843 performAction: () => {}, | 831 performAction: () => {}, |
844 performActionOnRow: () => {}, | 832 performActionOnRow: () => {}, |
845 performActionOnCell: () => {}, | 833 performActionOnCell: () => {}, |
846 getCellValue: () => null, | 834 getCellValue: () => null, |
847 setCellValue: () => {}, | 835 setCellValue: () => {}, |
848 selectionChanged: () => {} | 836 selectionChanged: () => {} |
849 }; | 837 }; |
OLD | NEW |