mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
merge interface tweaks
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -4,16 +4,19 @@
|
||||
Page <input type="number" ng-model="page" />
|
||||
Min. count <input type="number" ng-model="minCount" />
|
||||
<input type="button" class="btn" ng-click="refreshData()" value="Refresh" />
|
||||
<input type="button" class="btn" ng-click="autoMerge()" value="Auto merge selected" />
|
||||
<table class="table table-condensed table-hover" ui-if="counts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>url</th>
|
||||
<th>count</h>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="count in counts" ng-click="focus(count)" class="pointer">
|
||||
<td>{{count.normalizedUrlHash}}</td>
|
||||
<td><input type="checkbox" ng-model="count.autoMerge" /> </td>
|
||||
<td>{{count.feeds[0].url}}</td>
|
||||
<td>{{count.feeds.length}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user