| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 }; |
| OLD | NEW |