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

Side by Side Diff: chrome/content/ui/filters-filterview.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-filteractions.js ('k') | chrome/content/ui/filters-search.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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 }, 495 },
496 496
497 /** 497 /**
498 * Updates value of data property on sorting or filter subscription changes. 498 * Updates value of data property on sorting or filter subscription changes.
499 */ 499 */
500 updateData: function() 500 updateData: function()
501 { 501 {
502 let oldCount = this.rowCount; 502 let oldCount = this.rowCount;
503 if (this._subscription && this._subscription.filters.length) 503 if (this._subscription && this._subscription.filters.length)
504 { 504 {
505 this.data = this._subscription.filters.map(function(f, i) ({index: i, filt er: f})); 505 this.data = this._subscription.filters.map((f, i) => ({index: i, filter: f }));
506 if (this.sortProc) 506 if (this.sortProc)
507 { 507 {
508 // Hide comments in the list, they should be sorted like the filter foll owing them 508 // Hide comments in the list, they should be sorted like the filter foll owing them
509 let followingFilter = null; 509 let followingFilter = null;
510 for (let i = this.data.length - 1; i >= 0; i--) 510 for (let i = this.data.length - 1; i >= 0; i--)
511 { 511 {
512 if (this.data[i].filter instanceof CommentFilter) 512 if (this.data[i].filter instanceof CommentFilter)
513 { 513 {
514 this.data[i].origFilter = this.data[i].filter; 514 this.data[i].origFilter = this.data[i].filter;
515 this.data[i].filter = followingFilter; 515 this.data[i].filter = followingFilter;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 cycleCell: function(row, col) 823 cycleCell: function(row, col)
824 { 824 {
825 if (row < 0 || row >= this.data.length || col.id != "col-enabled") 825 if (row < 0 || row >= this.data.length || col.id != "col-enabled")
826 return; 826 return;
827 827
828 let filter = this.data[row].filter; 828 let filter = this.data[row].filter;
829 if (filter instanceof ActiveFilter) 829 if (filter instanceof ActiveFilter)
830 filter.disabled = !filter.disabled; 830 filter.disabled = !filter.disabled;
831 }, 831 },
832 832
833 isContainer: function(row) false, 833 isContainer: row => false,
834 isContainerOpen: function(row) false, 834 isContainerOpen: row => false,
835 isContainerEmpty: function(row) true, 835 isContainerEmpty: row => true,
836 getLevel: function(row) 0, 836 getLevel: row => 0,
837 getParentIndex: function(row) -1, 837 getParentIndex: row => -1,
838 hasNextSibling: function(row, afterRow) false, 838 hasNextSibling: (row, afterRow) => false,
839 toggleOpenState: function(row) {}, 839 toggleOpenState: row => {},
840 getProgressMode: function() null, 840 getProgressMode: () => null,
841 getImageSrc: function() null, 841 getImageSrc: () => null,
842 isSeparator: function() false, 842 isSeparator: () => false,
843 performAction: function() {}, 843 performAction: () => {},
844 performActionOnRow: function() {}, 844 performActionOnRow: () => {},
845 performActionOnCell: function() {}, 845 performActionOnCell: () => {},
846 getCellValue: function() null, 846 getCellValue: () => null,
847 setCellValue: function() {}, 847 setCellValue: () => {},
848 selectionChanged: function() {}, 848 selectionChanged: () => {}
849 }; 849 };
OLDNEW
« no previous file with comments | « chrome/content/ui/filters-filteractions.js ('k') | chrome/content/ui/filters-search.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld