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

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

Issue 8836030: Show/hide filtersSplitter if changing from/to typo correction tab in settings (Closed)
Patch Set: Created Nov. 13, 2012, 4:13 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld