diff --git a/modules/torrents/client/controllers/torrent-info.client.controller.js b/modules/torrents/client/controllers/torrent-info.client.controller.js index 5734832b..abddd1f6 100644 --- a/modules/torrents/client/controllers/torrent-info.client.controller.js +++ b/modules/torrents/client/controllers/torrent-info.client.controller.js @@ -124,77 +124,85 @@ $('.backdrop').css('backgroundImage', 'url(' + vm.tmdbConfig.backdrop_img_base_url + res.resource_detail_info.backdrop_path + ')'); } + vm.initTabLists(); vm.commentBuildPager(); - - vm.torrentTabs.push( - { - title: $translate.instant('TAB_VIDEO_INFO'), - templateUrl: 'videoInfo.html', - ng_show: true, - badges: [] - }, - { - title: $translate.instant('TAB_USER_SUBTITLE'), - templateUrl: 'subtitleInfo.html', - ng_show: true, - badges: [ - { - value: vm.torrentLocalInfo._subtitles.length, - class: 'badge_info' - } - ] - }, - { - title: $translate.instant('TAB_USER_INFO'), - templateUrl: 'userInfo.html', - ng_show: true, - badges: [ - { - value: '↑ ' + vm.torrentLocalInfo.torrent_seeds + ' ↓ ' + vm.torrentLocalInfo.torrent_leechers + ' √ ' + vm.torrentLocalInfo.torrent_finished, - class: 'badge_info' - } - ] - }, - { - title: $translate.instant('TAB_THUMBS_LIST'), - templateUrl: 'thumbsInfo.html', - ng_show: true, - badges: [ - { - value: vm.torrentLocalInfo._thumbs.length, - class: 'badge_info' - } - ] - }, - { - title: $translate.instant('TAB_OTHER_TORRENTS'), - templateUrl: 'otherTorrents.html', - ng_show: vm.torrentLocalInfo._other_torrents.length > 0, - badges: [ - { - value: vm.torrentLocalInfo._other_torrents.length, - class: 'badge_info' - } - ] - }, - { - title: $translate.instant('TAB_MY_PANEL'), - templateUrl: 'myPanel.html', - ng_show: vm.torrentLocalInfo.isCurrentUserOwner, - badges: [] - }, - { - title: $translate.instant('TAB_ADMIN_PANEL'), - templateUrl: 'adminPanel.html', - ng_show: vm.user ? vm.user.isOper : false, - badges: [] - } - ); }); console.log(vm.torrentLocalInfo); }; + /** + * initTabLists + */ + vm.initTabLists = function () { + vm.torrentTabs = []; + + vm.torrentTabs.push( + { + title: $translate.instant('TAB_VIDEO_INFO'), + templateUrl: 'videoInfo.html', + ng_show: true, + badges: [] + }, + { + title: $translate.instant('TAB_USER_SUBTITLE'), + templateUrl: 'subtitleInfo.html', + ng_show: true, + badges: [ + { + value: vm.torrentLocalInfo._subtitles.length, + class: 'badge_info' + } + ] + }, + { + title: $translate.instant('TAB_USER_INFO'), + templateUrl: 'userInfo.html', + ng_show: true, + badges: [ + { + value: '↑ ' + vm.torrentLocalInfo.torrent_seeds + ' ↓ ' + vm.torrentLocalInfo.torrent_leechers + ' √ ' + vm.torrentLocalInfo.torrent_finished, + class: 'badge_info' + } + ] + }, + { + title: $translate.instant('TAB_THUMBS_LIST'), + templateUrl: 'thumbsInfo.html', + ng_show: true, + badges: [ + { + value: vm.torrentLocalInfo._thumbs.length, + class: 'badge_info' + } + ] + }, + { + title: $translate.instant('TAB_OTHER_TORRENTS'), + templateUrl: 'otherTorrents.html', + ng_show: vm.torrentLocalInfo._other_torrents.length > 0, + badges: [ + { + value: vm.torrentLocalInfo._other_torrents.length, + class: 'badge_info' + } + ] + }, + { + title: $translate.instant('TAB_MY_PANEL'), + templateUrl: 'myPanel.html', + ng_show: vm.torrentLocalInfo.isCurrentUserOwner, + badges: [] + }, + { + title: $translate.instant('TAB_ADMIN_PANEL'), + templateUrl: 'adminPanel.html', + ng_show: vm.user ? vm.user.isOper : false, + badges: [] + } + ); + }; + /** * getResourceInfo */ diff --git a/modules/torrents/client/views/view-torrent.client.view.html b/modules/torrents/client/views/view-torrent.client.view.html index 9ecde611..d71535d9 100644 --- a/modules/torrents/client/views/view-torrent.client.view.html +++ b/modules/torrents/client/views/view-torrent.client.view.html @@ -619,7 +619,7 @@