fix(torrents): fixed torrents upload step index issue

This commit is contained in:
OldHawk
2018-05-29 23:41:48 +08:00
parent 407606f11d
commit 890a5b299f
5 changed files with 84 additions and 35 deletions

View File

@@ -533,11 +533,11 @@
TORRENT_DOWNLOADING_FILENAME: 'Downloading file name: ',
UPLOAD_ACCESS_TOOLTIP: '{{site}} only accepts resource resources group to upload torrents, you can <a href="/about/maker">list and join them</a>!',
SELECT_RESOURCE_TYPE: '2. Please select the resource type',
SELECT_TORRENT_FILE: '1. Please select the torrent file',
SELECT_RESOURCE_TYPE: '&bull; Please select the resource type',
SELECT_TORRENT_FILE: '&bull; Please select the torrent file',
SELECT_FILE: 'Select file',
DO_UPLOAD: 'Upload',
ENTER_TMDB_ID: '3 Please enter theMovieDB id',
ENTER_TMDB_ID: '&bull; Please enter theMovieDB id',
LOAD_TMDB_INFO: 'Load info',
SEARCH_FROM_TMDB: 'Search From TMDB',
TMDB_ID: 'TMDB ID',
@@ -554,37 +554,38 @@
TMDB_ID_OK: 'TMDB ID is ok! Get info successfully',
TMDB_ID_ERROR: 'TMDB ID is error! Get info failed',
TMDB_ID_REQUIRED: 'Please enter TMDB ID',
TMDB_RESOURCE_INFO: '4. The resource info from TMDB',
TMDB_RESOURCE_INFO: '&bull; The resource info from TMDB',
TMDB_IS_LOADING: 'Loading the resource info, please wait...',
SELECT_SE: '4.1. Please select number of seasons and input number of episodes',
SELECT_TAGS: '5. Please select any tags for the resources',
ENTER_VIDEO_NFO: '6. Please enter video and audio NFO',
SELECT_MAKER_GROUP: '7. Please select resources group upload from and anonymous option',
SELECT_SE: '&bull; Please select number of seasons and input number of episodes',
SELECT_TAGS: '&bull; Please select any tags for the resources',
ENTER_VIDEO_NFO: '&bull; Please enter video and audio NFO',
SELECT_MAKER_GROUP: '&bull; Please select resources group upload from and anonymous option',
MAKER_NULL: 'NULL',
UPLOADER_ANONYMOUS: 'Anonymous Upload (The user wont see me as an uploader)',
ANONYMOUS: 'Anonymous',
TORRENTS_SUBMIT_UPLOAD: '8. Agree the rules and submit your resources',
TORRENTS_SUBMIT_UPLOAD: '&bull; Agree the rules and submit your resources',
SUBMIT_BUTTON: 'OK, SUBMIT NOW',
CANCEL_BUTTON: 'NO, CANCEL IT',
AGREE_RULES: 'I agree and already read all the rules, <a href="/about/manual/userRules">read here</a>',
DOWNLOAD_TORRENT: 'Download Torrent',
NO_TAGS_LIST: 'No resources tags can be selected',
ENTER_MUSIC_TITLE: '3. Please enter the artist name and music/album title',
ENTER_MUSIC_TITLE: '&bull; Please enter the artist name and music/album title',
MUSIC_ARTIST: 'artist name',
MUSIC_TITLE: 'music/album sub title',
MUSIC_SUB_TITLE: 'music/album short desc',
SELECT_MUSIC_IMAGE: '3.1 Please select music/album cover image',
SELECT_MUSIC_IMAGE: '&bull; Please select music/album cover image',
COVER_UPLOAD_SUCCESSFULLY: 'Successfully upload cover image',
COVER_UPLOAD_FAILED: 'Failed to upload cover image',
ENTER_MUSIC_DETAIL_INFO: '4. Please enter the music/album detail info',
ENTER_MUSIC_DETAIL_INFO: '&bull; Please enter the music/album detail info',
ERROR_ONLY_IMAGE: 'Only image files support(gif, png, bmp, jpg, jpeg)',
FILE_TYPE_ERROR: 'File type that is not accepted',
ENTER_RESOURCE_TITLE: '4.1 Please enter the resource main title and sub title',
ENTER_RESOURCE_TITLE: '&bull; Please enter the resource main title and sub title',
RESOURCE_TITLE: 'resource main title',
RESOURCE_SUB_TITLE: 'resource sub title',
SELECT_RESOURCE_IMAGE: '3.1 Please select resource cover image',
ENTER_RESOURCE_DETAIL_INFO: '4. Please enter the resource detail info',
SELECT_RESOURCE_IMAGE: '&bull; Please select resource cover image',
ENTER_RESOURCE_DETAIL_INFO: '&bull; Please enter the resource detail info',
//ranking view
PAGE_HEADER_RANKING_UPLOAD: 'Uploaded Ranking',

View File

@@ -568,6 +568,7 @@
CANCEL_BUTTON: '算了,以後再說',
AGREE_RULES: '我已閱讀並同意站內所有協議條款,<a href="/about/manual/userRules">協議條款</a>',
DOWNLOAD_TORRENT: '下載種子',
NO_TAGS_LIST: '沒有配置的資源標籤可供選擇',
ENTER_MUSIC_TITLE: '3. 請輸入藝人名稱和音樂/專輯標題',
MUSIC_ARTIST: '藝人名稱',

View File

@@ -568,6 +568,7 @@
CANCEL_BUTTON: '算了,以后再说',
AGREE_RULES: '我已阅读并同意站内所有协议条款,<a href="/about/manual/userRules">协议条款</a>',
DOWNLOAD_TORRENT: '下载种子',
NO_TAGS_LIST: '没有配置的资源标签可供选择',
ENTER_MUSIC_TITLE: '3. 请输入艺人名称和音乐/专辑标题',
MUSIC_ARTIST: '艺人名称',

View File

@@ -396,6 +396,40 @@
return inc;
};
/**
* tagsFilter
* @param item
* @returns {boolean}
*/
vm.tagsFilter = function (item) {
var res = false;
if (item.cats.includes(vm.selectedType)) {
res = true;
}
return res;
};
/**
* getTagsFilterCount
* @returns {int}
*/
vm.getTagsFilterCount = function () {
var res = 0;
angular.forEach(vm.resourcesTags.radio, function (t) {
if (t.cats.includes(vm.selectedType))
res++;
});
angular.forEach(vm.resourcesTags.checkbox, function (t) {
if (t.cats.includes(vm.selectedType))
res++;
});
return res;
};
/**
* getMovieInfo
* @param tmdbid

View File

@@ -309,11 +309,14 @@
</div>
</div>
<div class="row margin-bottom-40" ng-show="vm.showResourcesTag">
<div class="row margin-bottom-30" ng-show="vm.showResourcesTag">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="SELECT_TAGS"></legend>
<dl class="dl-horizontal">
<div ng-repeat="item in vm.resourcesTags.radio | filter:vm.selectedType">
<div ng-if="vm.getTagsFilterCount()<=0">
<span>&emsp;{{'NO_TAGS_LIST' | translate}}</span>
</div>
<dl class="dl-horizontal" ng-if="vm.getTagsFilterCount()>0">
<div ng-repeat="item in vm.resourcesTags.radio | filter:vm.tagsFilter">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
<label class="radio-inline" ng-repeat="sitem in item.value">
@@ -326,7 +329,7 @@
<div style="margin-top: 30px;"></div>
<div ng-repeat="item in vm.resourcesTags.checkbox | filter:vm.selectedType">
<div ng-repeat="item in vm.resourcesTags.checkbox | filter:vm.tagsFilter">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
<label class="checkbox-inline" ng-repeat="sitem in item.value">
@@ -336,7 +339,7 @@
</label>
</dd>
</div>
<div class="margin-top-10">
<div class="margin-top-5">
<dt class="h-line"></dt>
<dd class="h-line">
<span class="label label-tag text-uppercase" ng-click="vm.clearAllCondition();">
@@ -530,11 +533,14 @@
</div>
</div>
<div class="row margin-bottom-40" ng-show="vm.showResourcesTag">
<div class="row margin-bottom-30" ng-show="vm.showResourcesTag">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="SELECT_TAGS"></legend>
<dl class="dl-horizontal">
<div ng-repeat="item in vm.resourcesTags.radio | filter:vm.selectedType">
<div ng-if="vm.getTagsFilterCount()<=0">
<span>&emsp;{{'NO_TAGS_LIST' | translate}}</span>
</div>
<dl class="dl-horizontal" ng-if="vm.getTagsFilterCount()>0">
<div ng-repeat="item in vm.resourcesTags.radio | filter:vm.tagsFilter">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
<label class="radio-inline" ng-repeat="sitem in item.value">
@@ -547,7 +553,7 @@
<div style="margin-top: 30px;"></div>
<div ng-repeat="item in vm.resourcesTags.checkbox | filter:vm.selectedType">
<div ng-repeat="item in vm.resourcesTags.checkbox | filter:vm.tagsFilter">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
<label class="checkbox-inline" ng-repeat="sitem in item.value">
@@ -557,7 +563,7 @@
</label>
</dd>
</div>
<div class="margin-top-10">
<div class="margin-top-5">
<dt class="h-line"></dt>
<dd class="h-line">
<span class="label label-tag text-uppercase" ng-click="vm.clearAllCondition();">
@@ -649,11 +655,14 @@
</div>
</div>
<div class="row margin-bottom-40" ng-show="vm.customTorrent.detail">
<div class="row margin-bottom-30" ng-show="vm.customTorrent.detail">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="SELECT_TAGS"></legend>
<dl class="dl-horizontal">
<div ng-repeat="item in vm.resourcesTags.radio | filter:vm.selectedType">
<div ng-if="vm.getTagsFilterCount()<=0">
<span>&emsp;{{'NO_TAGS_LIST' | translate}}</span>
</div>
<dl class="dl-horizontal" ng-if="vm.getTagsFilterCount()>0">
<div ng-repeat="item in vm.resourcesTags.radio | filter:vm.tagsFilter">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
<label class="radio-inline" ng-repeat="sitem in item.value">
@@ -666,7 +675,7 @@
<div style="margin-top: 30px;"></div>
<div ng-repeat="item in vm.resourcesTags.checkbox | filter:vm.selectedType">
<div ng-repeat="item in vm.resourcesTags.checkbox | filter:vm.tagsFilter">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
<label class="checkbox-inline" ng-repeat="sitem in item.value">
@@ -676,7 +685,7 @@
</label>
</dd>
</div>
<div class="margin-top-10">
<div class="margin-top-5">
<dt class="h-line"></dt>
<dd class="h-line">
<span class="label label-tag text-uppercase" ng-click="vm.clearAllCondition();">
@@ -764,11 +773,14 @@
</div>
</div>
<div class="row margin-bottom-40" ng-show="vm.customTorrent.detail">
<div class="row margin-bottom-30" ng-show="vm.customTorrent.detail">
<div class="col-md-12 col-sm-12 col-xs-12">
<legend class="small-legend" translate="SELECT_TAGS"></legend>
<dl class="dl-horizontal">
<div ng-repeat="item in vm.resourcesTags.radio | filter:vm.selectedType">
<div ng-if="vm.getTagsFilterCount()<=0">
<span>&emsp;{{'NO_TAGS_LIST' | translate}}</span>
</div>
<dl class="dl-horizontal" ng-if="vm.getTagsFilterCount()>0">
<div ng-repeat="item in vm.resourcesTags.radio | filter:vm.tagsFilter">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
<label class="radio-inline" ng-repeat="sitem in item.value">
@@ -781,7 +793,7 @@
<div style="margin-top: 30px;"></div>
<div ng-repeat="item in vm.resourcesTags.checkbox | filter:vm.selectedType">
<div ng-repeat="item in vm.resourcesTags.checkbox | filter:vm.tagsFilter">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
<label class="checkbox-inline" ng-repeat="sitem in item.value">
@@ -791,7 +803,7 @@
</label>
</dd>
</div>
<div class="margin-top-10">
<div class="margin-top-5">
<dt class="h-line"></dt>
<dd class="h-line">
<span class="label label-tag text-uppercase" ng-click="vm.clearAllCondition();">