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

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

Issue 11153017: Improve Synchronizer functionality (Closed)
Patch Set: Created July 17, 2013, 12:32 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 | chrome/content/ui/sendReport.js » ('j') | lib/downloader.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 TitleEditor.start(node); 103 TitleEditor.start(node);
104 }, 104 },
105 105
106 /** 106 /**
107 * Triggers re-download of a filter subscription. 107 * Triggers re-download of a filter subscription.
108 */ 108 */
109 updateFilters: function(/**Node*/ node) 109 updateFilters: function(/**Node*/ node)
110 { 110 {
111 let data = Templater.getDataForNode(node || this.selectedItem); 111 let data = Templater.getDataForNode(node || this.selectedItem);
112 if (data && data.subscription instanceof DownloadableSubscription) 112 if (data && data.subscription instanceof DownloadableSubscription)
113 Synchronizer.execute(data.subscription, true, true); 113 Synchronizer.execute(data.subscription, true);
114 }, 114 },
115 115
116 /** 116 /**
117 * Triggers re-download of all filter subscriptions. 117 * Triggers re-download of all filter subscriptions.
118 */ 118 */
119 updateAllFilters: function() 119 updateAllFilters: function()
120 { 120 {
121 for (let i = 0; i < FilterStorage.subscriptions.length; i++) 121 for (let i = 0; i < FilterStorage.subscriptions.length; i++)
122 { 122 {
123 let subscription = FilterStorage.subscriptions[i]; 123 let subscription = FilterStorage.subscriptions[i];
124 if (subscription instanceof DownloadableSubscription) 124 if (subscription instanceof DownloadableSubscription)
125 Synchronizer.execute(subscription, true, true); 125 Synchronizer.execute(subscription, true);
126 } 126 }
127 }, 127 },
128 128
129 /** 129 /**
130 * Sets Subscription.disabled field to a new value. 130 * Sets Subscription.disabled field to a new value.
131 */ 131 */
132 setDisabled: function(/**Element*/ node, /**Boolean*/ value) 132 setDisabled: function(/**Element*/ node, /**Boolean*/ value)
133 { 133 {
134 let data = Templater.getDataForNode(node || this.selectedItem); 134 let data = Templater.getDataForNode(node || this.selectedItem);
135 if (data) 135 if (data)
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 return; 597 return;
598 598
599 if (event.keyCode == event.DOM_VK_RETURN || event.keyCode == event.DOM_VK_EN TER) 599 if (event.keyCode == event.DOM_VK_RETURN || event.keyCode == event.DOM_VK_EN TER)
600 { 600 {
601 // This shouldn't accept our dialog, only the panel 601 // This shouldn't accept our dialog, only the panel
602 event.preventDefault(); 602 event.preventDefault();
603 E("selectSubscriptionAccept").doCommand(); 603 E("selectSubscriptionAccept").doCommand();
604 } 604 }
605 } 605 }
606 }; 606 };
OLDNEW
« no previous file with comments | « no previous file | chrome/content/ui/sendReport.js » ('j') | lib/downloader.js » ('J')

Powered by Google App Engine
This is Rietveld