when uploads torrent file, now can reset seleted tags by clearAllCondition

This commit is contained in:
OldHawk
2017-04-06 16:42:08 +08:00
parent a03f1b6c28
commit 4b76d37774
3 changed files with 17 additions and 2 deletions

View File

@@ -78,8 +78,14 @@
vm.getMoviePageInfo = function (p) {
vm.currPageNumber = p;
//if searchKey or searchTags has value, the skip=0
var skip = vm.topNumber;
if (vm.searchKey.trim().length > 0 || vm.searchTags.length > 0) {
skip = 0;
}
TorrentsService.query({
skip: (p - 1) * vm.pageNumber + 0, //vm.topNumber,
skip: (p - 1) * vm.pageNumber + skip,
limit: p * vm.pageNumber,
keys: vm.searchKey,
torrent_status: 'reviewed',

View File

@@ -197,5 +197,9 @@
$state.reload('torrents.uploads');
document.body.scrollTop = document.documentElement.scrollTop = 0;
};
vm.clearAllCondition = function () {
vm.tags = [];
};
}
}());

View File

@@ -41,7 +41,7 @@
</div>
</div>
<div ng-show="vm.successfully == true" class="row" style="margin-top: 40px;">
<div class="row" style="margin-top: 40px;">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="ENTER_TMDB_ID"></legend>
<div class="col-lg-3 col-md-4 col-sm-5 col-xs-6">
@@ -210,6 +210,11 @@
</label>
</dd>
</div>
<div class="margin-top-10">
<dt class="h-line"></dt>
<dd class="h-line"><span class="label label-tag text-uppercase"
ng-click="vm.clearAllCondition();">{{ 'CLEAR_ALL_CONDITION' | translate}}</span></dd>
</div>
</dl>
</div>
</div>