| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }; |
| OLD | NEW |