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

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

Issue 4884233277407232: Issue 2257 - Replaced non-standard function expressions with ES6 arrow functions (Closed)
Patch Set: Rebased Created May 6, 2015, 10:46 a.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 | « chrome/content/ui/filters-search.js ('k') | chrome/content/ui/filters-subscriptionview.js » ('j') | 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 file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 /** 43 /**
44 * Finds the subscription for a particular filter, selects it and selects the 44 * Finds the subscription for a particular filter, selects it and selects the
45 * filter. 45 * filter.
46 */ 46 */
47 selectFilter: function(/**Filter*/ filter) 47 selectFilter: function(/**Filter*/ filter)
48 { 48 {
49 let node = null; 49 let node = null;
50 let tabIndex = -1; 50 let tabIndex = -1;
51 let subscriptions = filter.subscriptions.slice(); 51 let subscriptions = filter.subscriptions.slice();
52 subscriptions.sort(function(s1, s2) s1.disabled - s2.disabled); 52 subscriptions.sort((s1, s2) => s1.disabled - s2.disabled);
53 for (let i = 0; i < subscriptions.length; i++) 53 for (let i = 0; i < subscriptions.length; i++)
54 { 54 {
55 let subscription = subscriptions[i]; 55 let subscription = subscriptions[i];
56 let list = E(subscription instanceof SpecialSubscription ? "groups" : "sub scriptions"); 56 let list = E(subscription instanceof SpecialSubscription ? "groups" : "sub scriptions");
57 tabIndex = (subscription instanceof SpecialSubscription ? 1 : 0); 57 tabIndex = (subscription instanceof SpecialSubscription ? 1 : 0);
58 node = Templater.getNodeForData(list, "subscription", subscription); 58 node = Templater.getNodeForData(list, "subscription", subscription);
59 if (node) 59 if (node)
60 break; 60 break;
61 } 61 }
62 if (node) 62 if (node)
(...skipping 534 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 | « chrome/content/ui/filters-search.js ('k') | chrome/content/ui/filters-subscriptionview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld