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 /** | 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 { | 86 { |
87 E("filtersContainer").hidden = true; | 87 E("filtersContainer").hidden = true; |
| 88 E("filtersSplitter").hidden = true; |
88 return; | 89 return; |
89 } | 90 } |
90 | 91 |
91 E("filtersContainer").hidden = false; | 92 E("filtersContainer").hidden = false; |
| 93 E("filtersSplitter").hidden = false; |
92 | 94 |
93 let data = Templater.getDataForNode(list.selectedItem); | 95 let data = Templater.getDataForNode(list.selectedItem); |
94 FilterView.subscription = (data ? data.subscription : null); | 96 FilterView.subscription = (data ? data.subscription : null); |
95 FilterActions.updateCommands(); | 97 FilterActions.updateCommands(); |
96 } | 98 } |
97 | 99 |
98 /** | 100 /** |
99 * Template processing functions. | 101 * Template processing functions. |
100 * @class | 102 * @class |
101 */ | 103 */ |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 * data object. | 208 * data object. |
207 */ | 209 */ |
208 getNodeForData: function(/**Node*/ parent, /**String*/ property, /**Object*/ d
ata) /**Node*/ | 210 getNodeForData: function(/**Node*/ parent, /**String*/ property, /**Object*/ d
ata) /**Node*/ |
209 { | 211 { |
210 for (let child = parent.firstChild; child; child = child.nextSibling) | 212 for (let child = parent.firstChild; child; child = child.nextSibling) |
211 if ("_data" in child && property in child._data && child._data[property] =
= data) | 213 if ("_data" in child && property in child._data && child._data[property] =
= data) |
212 return child; | 214 return child; |
213 return null; | 215 return null; |
214 } | 216 } |
215 }; | 217 }; |
OLD | NEW |