diff --git a/src/main/webapp/js/controllers.js b/src/main/webapp/js/controllers.js index a6898765..88f964dd 100644 --- a/src/main/webapp/js/controllers.js +++ b/src/main/webapp/js/controllers.js @@ -1222,8 +1222,24 @@ module.controller('ManageDuplicateFeedsCtrl', [ }); }; + $scope.autoMerge = function() { + for (var i = 0; i < $scope.counts.length; i++) { + var count = $scope.counts[i]; + if (count.autoMerge) { + AdminCleanupService.mergeFeeds({ + intoFeedId: count.feeds[0].id, + feedIds: _.pluck(count.feeds, 'id') + }, function() { + alert('done!'); + }); + } + } + }; + $scope.focus = function(count) { $scope.current = count; + $scope.mergeData.intoFeedId = count.feeds[0].id; + $scope.mergeData.feedIds = _.pluck(count.feeds, 'id'); }; $scope.merge = function() { diff --git a/src/main/webapp/templates/admin.duplicate_feeds.html b/src/main/webapp/templates/admin.duplicate_feeds.html index c19213bc..72555ab3 100644 --- a/src/main/webapp/templates/admin.duplicate_feeds.html +++ b/src/main/webapp/templates/admin.duplicate_feeds.html @@ -4,16 +4,19 @@ Page Min. count + + - + +
url count
{{count.normalizedUrlHash}} {{count.feeds[0].url}} {{count.feeds.length}}