| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This Source Code is subject to the terms of the Mozilla Public License | 2 * This Source Code is subject to the terms of the Mozilla Public License |
| 3 * version 2.0 (the "License"). You can obtain a copy of the License at | 3 * version 2.0 (the "License"). You can obtain a copy of the License at |
| 4 * http://mozilla.org/MPL/2.0/. | 4 * http://mozilla.org/MPL/2.0/. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 let {Prefs} = require("prefs"); | 7 let {Prefs} = require("prefs"); |
| 8 | 8 |
| 9 let domainData; | 9 let domainData; |
| 10 let nodeData; | 10 let nodeData; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 else { | 103 else { |
| 104 obj.__defineGetter__(key, function() { | 104 obj.__defineGetter__(key, function() { |
| 105 return orig[key]; | 105 return orig[key]; |
| 106 }); | 106 }); |
| 107 obj.__defineSetter__(key, function(value) { | 107 obj.__defineSetter__(key, function(value) { |
| 108 orig[key] = value; | 108 orig[key] = value; |
| 109 }); | 109 }); |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 | 112 |
| 113 var atomService = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomService
); | 113 function TreeView_getRowProperties(row) { |
| 114 var selectedAtom = atomService.getAtom("selected-false"); | 114 let properties = "selected-" + this.selection.isSelected(row); |
| 115 var anchorAtom = atomService.getAtom("anchor"); | |
| 116 | |
| 117 function TreeView_getRowProperties(row, properties) { | |
| 118 if (!this.selection.isSelected(row)) | |
| 119 properties.AppendElement(selectedAtom); | |
| 120 | 115 |
| 121 var item = this.getItemAtIndex(row); | 116 var item = this.getItemAtIndex(row); |
| 122 if (item && (item.nodeData.expression != "*" || item.nodeData == nodeData)) | 117 if (item && (item.nodeData.expression != "*" || item.nodeData == nodeData)) |
| 123 properties.AppendElement(anchorAtom); | 118 properties += " anchor"; |
| 119 |
| 120 return properties; |
| 124 } | 121 } |
| 125 | 122 |
| 126 function TreeView_getCellProperties(row, col, properties) { | 123 function TreeView_getCellProperties(row, col) { |
| 127 this.getRowProperties(row, properties); | 124 this.getRowProperties(row); |
| 128 } | 125 } |
| 129 | 126 |
| 130 /********************* | 127 /********************* |
| 131 * General functions * | 128 * General functions * |
| 132 *********************/ | 129 *********************/ |
| 133 | 130 |
| 134 function init() { | 131 function init() { |
| 135 var element = window.arguments[0]; | 132 var element = window.arguments[0]; |
| 136 doc = element.ownerDocument; | 133 doc = element.ownerDocument; |
| 137 var wnd = doc.defaultView; | 134 var wnd = doc.defaultView; |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 | 632 |
| 636 fillAttributes(item.nodeData); | 633 fillAttributes(item.nodeData); |
| 637 } | 634 } |
| 638 | 635 |
| 639 function addExpression() | 636 function addExpression() |
| 640 { | 637 { |
| 641 AdblockPlus.addPatterns([document.getElementById("expression").value]); | 638 AdblockPlus.addPatterns([document.getElementById("expression").value]); |
| 642 | 639 |
| 643 togglePreview(false); | 640 togglePreview(false); |
| 644 } | 641 } |
| OLD | NEW |