Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/content/ui/filters.js

Issue 8559070: Integrated URL Fixer into Adblock Plus (Closed)
Patch Set: Second batch of changes Created Nov. 9, 2012, 2:33 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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 /** 7 /**
8 * Initialization function, called when the window is loaded. 8 * Initialization function, called when the window is loaded.
9 */ 9 */
10 function init() 10 function init()
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 * Updates filter list when selected subscription changes. 76 * Updates filter list when selected subscription changes.
77 */ 77 */
78 function updateSelectedSubscription() 78 function updateSelectedSubscription()
79 { 79 {
80 let panel = E("tabs").selectedPanel; 80 let panel = E("tabs").selectedPanel;
81 if (!panel) 81 if (!panel)
82 return; 82 return;
83 83
84 let list = panel.getElementsByTagName("richlistbox")[0]; 84 let list = panel.getElementsByTagName("richlistbox")[0];
85 if (!list) 85 if (!list)
86 {
87 E("filtersContainer").hidden = true;
86 return; 88 return;
89 }
90
91 E("filtersContainer").hidden = false;
87 92
88 let data = Templater.getDataForNode(list.selectedItem); 93 let data = Templater.getDataForNode(list.selectedItem);
89 FilterView.subscription = (data ? data.subscription : null); 94 FilterView.subscription = (data ? data.subscription : null);
90 FilterActions.updateCommands(); 95 FilterActions.updateCommands();
91 } 96 }
92 97
93 /** 98 /**
94 * Template processing functions. 99 * Template processing functions.
95 * @class 100 * @class
96 */ 101 */
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 * data object. 206 * data object.
202 */ 207 */
203 getNodeForData: function(/**Node*/ parent, /**String*/ property, /**Object*/ d ata) /**Node*/ 208 getNodeForData: function(/**Node*/ parent, /**String*/ property, /**Object*/ d ata) /**Node*/
204 { 209 {
205 for (let child = parent.firstChild; child; child = child.nextSibling) 210 for (let child = parent.firstChild; child; child = child.nextSibling)
206 if ("_data" in child && property in child._data && child._data[property] = = data) 211 if ("_data" in child && property in child._data && child._data[property] = = data)
207 return child; 212 return child;
208 return null; 213 return null;
209 } 214 }
210 }; 215 };
OLDNEW
« no previous file with comments | « chrome/content/ui/fennecSettings.xul ('k') | chrome/content/ui/filters.xul » ('j') | lib/main.js » ('J')

Powered by Google App Engine
This is Rietveld