mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-06 12:11:02 +01:00
fix(home): optimization torrents sale status showed issues
This commit is contained in:
@@ -195,7 +195,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.isSaling, 'label-success': item.isSaling}">
|
||||
{{item.torrent_sale_status}} {{item.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.isSaling, 'label-success': item.isSaling}">
|
||||
{{item.torrent_sale_status}} {{item.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -272,20 +272,6 @@
|
||||
vm.torrentBuildPager();
|
||||
};
|
||||
|
||||
/**
|
||||
* getSaleTypeDesc
|
||||
*/
|
||||
vm.getSaleTypeDesc = function (item) {
|
||||
var desc = '';
|
||||
|
||||
angular.forEach(vm.torrentSalesType.value, function (st) {
|
||||
if (st.name === item.torrent_sale_status) {
|
||||
desc = st.desc;
|
||||
}
|
||||
});
|
||||
return desc;
|
||||
};
|
||||
|
||||
/**
|
||||
* onMoreTagsClicked
|
||||
*/
|
||||
|
||||
@@ -868,20 +868,6 @@
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* getSaleTypeDesc
|
||||
*/
|
||||
vm.getSaleTypeDesc = function () {
|
||||
var desc = '';
|
||||
|
||||
angular.forEach(vm.torrentSalesType.value, function (st) {
|
||||
if (st.name === vm.torrentLocalInfo.torrent_sale_status) {
|
||||
desc = st.desc;
|
||||
}
|
||||
});
|
||||
return desc;
|
||||
};
|
||||
|
||||
/**
|
||||
* deleteTorrent
|
||||
*/
|
||||
|
||||
@@ -319,20 +319,6 @@
|
||||
vm.torrentBuildPager();
|
||||
};
|
||||
|
||||
/**
|
||||
* getSaleTypeDesc
|
||||
*/
|
||||
vm.getSaleTypeDesc = function (item) {
|
||||
var desc = '';
|
||||
|
||||
angular.forEach(vm.torrentSalesType.value, function (st) {
|
||||
if (st.name === item.torrent_sale_status) {
|
||||
desc = st.desc;
|
||||
}
|
||||
});
|
||||
return desc;
|
||||
};
|
||||
|
||||
/**
|
||||
* onMoreTagsClicked
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
function TorrentGetInfoServices(MeanTorrentConfig, $state) {
|
||||
var voteTitleConfig = MeanTorrentConfig.meanTorrentConfig.voteTitle;
|
||||
var tmdbConfig = MeanTorrentConfig.meanTorrentConfig.tmdbConfig;
|
||||
var torrentSalesType = MeanTorrentConfig.meanTorrentConfig.torrentSalesType;
|
||||
|
||||
var service = {
|
||||
getTorrentTitle: getTorrentTitle,
|
||||
@@ -26,7 +27,8 @@
|
||||
getTorrentLanguage: getTorrentLanguage,
|
||||
getTorrentOverview: getTorrentOverview,
|
||||
|
||||
openTorrentDetailInfo: openTorrentDetailInfo
|
||||
openTorrentDetailInfo: openTorrentDetailInfo,
|
||||
getTorrentSaleTypeDesc: getTorrentSaleTypeDesc
|
||||
};
|
||||
|
||||
return service;
|
||||
@@ -258,5 +260,20 @@
|
||||
function openTorrentDetailInfo(id) {
|
||||
$state.go('torrents.view', {torrentId: id});
|
||||
}
|
||||
|
||||
/**
|
||||
* getTorrentSaleTypeDesc
|
||||
*/
|
||||
function getTorrentSaleTypeDesc(item) {
|
||||
var desc = '';
|
||||
|
||||
angular.forEach(torrentSalesType.value, function (st) {
|
||||
if (st.name === item.torrent_sale_status) {
|
||||
desc = st.desc;
|
||||
}
|
||||
});
|
||||
return desc;
|
||||
}
|
||||
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.isSaling, 'label-success': item.isSaling}">
|
||||
{{item.torrent_sale_status}} {{item.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.isSaling, 'label-success': item.isSaling}">
|
||||
{{item.torrent_sale_status}} {{item.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -587,7 +587,7 @@
|
||||
<dt class="h-line">{{ 'VIDEO_SALE_INFO' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="label label-sale"
|
||||
title="{{vm.getSaleTypeDesc();}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{vm.torrentLocalInfo.isSaling ? (vm.torrentLocalInfo.torrent_sale_expires | date: 'MM-dd HH:mm') : 'NO'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(torrentLocalInfo);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{vm.torrentLocalInfo.isSaling ? (vm.torrentLocalInfo.torrent_sale_expires | date: 'MM-dd HH:mm') : 'NO'}}"
|
||||
ng-class="{'label-default': !vm.torrentLocalInfo.isSaling, 'label-success': vm.torrentLocalInfo.isSaling}">
|
||||
{{vm.torrentLocalInfo.torrent_sale_status}} {{vm.torrentLocalInfo.isSaling ? (vm.torrentLocalInfo.torrent_sale_expires | unlife) : ''}}
|
||||
</span>
|
||||
@@ -847,7 +847,7 @@
|
||||
</span>
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.isSaling, 'label-success': item.isSaling}">
|
||||
{{item.torrent_sale_status}} {{item.torrent_sale_expires | unlife}}
|
||||
@@ -1008,7 +1008,7 @@
|
||||
<div class="margin-top-20" ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<dt class="h-line">{{ 'ADMIN_SALE_TYPE_SET' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<mark>{{vm.getSaleTypeDesc();}}</mark>
|
||||
<mark>{{vm.TGI.getTorrentSaleTypeDesc(vm.torrentLocalInfo);}}</mark>
|
||||
</dd>
|
||||
|
||||
<div class="padding-top-10 margin-left-50">
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.torrent.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item.torrent);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.torrent.isSaling, 'label-success': item.torrent.isSaling}">
|
||||
{{item.torrent.torrent_sale_status}} {{item.torrent.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.torrent.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item.torrent);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.torrent.isSaling, 'label-success': item.torrent.isSaling}">
|
||||
{{item.torrent.torrent_sale_status}} {{item.torrent.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.isSaling, 'label-success': item.isSaling}">
|
||||
{{item.torrent_sale_status}} {{item.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.torrent.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item.torrent);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.torrent.isSaling, 'label-success': item.torrent.isSaling}">
|
||||
{{item.torrent.torrent_sale_status}} {{item.torrent.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.torrent.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item.torrent);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.torrent.isSaling, 'label-success': item.torrent.isSaling}">
|
||||
{{item.torrent.torrent_sale_status}} {{item.torrent.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.torrent.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item.torrent);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.torrent.isSaling, 'label-success': item.torrent.isSaling}">
|
||||
{{item.torrent.torrent_sale_status}} {{item.torrent.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.isSaling, 'label-success': item.isSaling}">
|
||||
{{item.torrent_sale_status}} {{item.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.torrent.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item.torrent);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.torrent.isSaling, 'label-success': item.torrent.isSaling}">
|
||||
{{item.torrent.torrent_sale_status}} {{item.torrent.torrent_sale_expires | unlife}}
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent_recommended.toUpperCase() | translate}}
|
||||
</span>
|
||||
<span class="label label-sale" ng-if="item.isSaling"
|
||||
title="{{vm.getSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
|
||||
ng-click="$event.stopPropagation();"
|
||||
ng-class="{'label-default': !item.isSaling, 'label-success': item.isSaling}">
|
||||
{{item.torrent_sale_status}} {{item.torrent_sale_expires | unlife}}
|
||||
|
||||
Reference in New Issue
Block a user