diff --git a/modules/core/client/app/trans-string-cn.js b/modules/core/client/app/trans-string-cn.js index 4cfd9111..43c4481a 100644 --- a/modules/core/client/app/trans-string-cn.js +++ b/modules/core/client/app/trans-string-cn.js @@ -71,8 +71,8 @@ TABLE_FIELDS: { INFO: '种子信息', SIZE: '大小', - SEEDS_LEECHERS_FINISHED: '做种/下载/完成', - PUBLISHER: 'Publisher', + SEEDS_LEECHERS_FINISHED: '上/下/完', + PUBLISHER: '发布者', LIFETIME: '存活时间', VOTES: '评分' }, diff --git a/modules/core/client/less/mt.less b/modules/core/client/less/mt.less index ca558d38..92ca5b1b 100644 --- a/modules/core/client/less/mt.less +++ b/modules/core/client/less/mt.less @@ -137,6 +137,18 @@ } } +.list-user-info { + .torrent-up { + color: #33CC00; + } + .torrent-down { + color: #FF3300; + } + .torrent-finished { + color: #0366d6; + } +} + .btn-tag { width: 100px; &, @@ -226,4 +238,7 @@ cursor: pointer; color: #f00; } + &:active { + color: #0366d6; + } } diff --git a/modules/torrents/client/controllers/torrents.client.controller.js b/modules/torrents/client/controllers/torrents.client.controller.js index 73a3f723..8dd44af8 100644 --- a/modules/torrents/client/controllers/torrents.client.controller.js +++ b/modules/torrents/client/controllers/torrents.client.controller.js @@ -5,10 +5,10 @@ .module('torrents') .controller('TorrentsController', TorrentsController); - TorrentsController.$inject = ['$scope', '$state', '$translate', 'Authentication', 'Notification', 'TorrentsService', 'TMDBConfig', + TorrentsController.$inject = ['$scope', '$state', '$translate', '$timeout', 'Authentication', 'Notification', 'TorrentsService', 'TMDBConfig', 'ResourcesTagsConfig']; - function TorrentsController($scope, $state, $translate, Authentication, Notification, TorrentsService, TMDBConfig, ResourcesTagsConfig) { + function TorrentsController($scope, $state, $translate, $timeout, Authentication, Notification, TorrentsService, TMDBConfig, ResourcesTagsConfig) { var vm = this; vm.user = Authentication.user; vm.tmdbConfig = TMDBConfig.tmdbConfig; @@ -25,6 +25,9 @@ $state.go('authentication.signin'); } + /** + * getMovieTopInfo + */ vm.getMovieTopInfo = function () { TorrentsService.query({ limit: vm.topNumber @@ -37,6 +40,11 @@ }); }; + /** + * onRadioTagClicked + * @param event + * @param n: tag name + */ vm.onRadioTagClicked = function (event, n) { var e = angular.element(event.currentTarget); @@ -57,6 +65,11 @@ vm.getMoviePageInfo(1); }; + /** + * onCheckboxTagClicked + * @param event + * @param n: tag name + */ vm.onCheckboxTagClicked = function (event, n) { var e = angular.element(event.currentTarget); @@ -68,13 +81,20 @@ vm.getMoviePageInfo(1); }; + /** + * onKeysKeyDown + * @param evt + */ vm.onKeysKeyDown = function (evt) { if (evt.keyCode === 13) { vm.getMoviePageInfo(1); } }; - + /** + * getMoviePageInfo + * @param p: page number + */ vm.getMoviePageInfo = function (p) { vm.currPageNumber = p; @@ -85,7 +105,7 @@ } TorrentsService.query({ - skip: (p - 1) * vm.pageNumber + skip, + skip: (p - 1) * vm.pageNumber + 0, limit: p * vm.pageNumber, keys: vm.searchKey, torrent_status: 'reviewed', @@ -102,6 +122,11 @@ }); }; + /** + * getTagTitle + * @param tag: tag name + * @returns {*} + */ vm.getTagTitle = function (tag) { var tmp = tag; var find = false; @@ -126,6 +151,9 @@ return tmp; }; + /** + * clearAllCondition + */ vm.clearAllCondition = function () { vm.searchKey = ''; vm.searchTags = []; @@ -133,5 +161,15 @@ vm.getMoviePageInfo(1); }; + + /** + * onTagClicked + * @param tag: tag name + */ + vm.onTagClicked = function (tag) { + $timeout(function () { + angular.element('#tag_' + tag).trigger('click'); + }, 100); + }; } }()); diff --git a/modules/torrents/client/controllers/uploads.client.controller.js b/modules/torrents/client/controllers/uploads.client.controller.js index 16ec5cc5..fcd8d4f6 100644 --- a/modules/torrents/client/controllers/uploads.client.controller.js +++ b/modules/torrents/client/controllers/uploads.client.controller.js @@ -31,7 +31,10 @@ $state.go('authentication.signin'); } - //******************** begin upload torrent file ********************* + /** + * upload + * @param dataUrl + */ vm.upload = function (dataUrl) { //console.log(dataUrl); @@ -61,6 +64,10 @@ }); }; + /** + * onSuccessItem + * @param response + */ function onSuccessItem(response) { vm.fileSelected = false; vm.successfully = true; @@ -72,6 +79,10 @@ }); } + /** + * onErrorItem + * @param response + */ function onErrorItem(response) { vm.fileSelected = false; vm.successfully = false; @@ -83,17 +94,28 @@ }); } - //************** begin get tmdb info *********************************** + /** + * onTMDBIDKeyDown + * @param evt + */ vm.onTMDBIDKeyDown = function (evt) { if (evt.keyCode === 13) { vm.getInfo(vm.tmdb_id); } }; + /** + * onTextClick + * @param $event + */ vm.onTextClick = function ($event) { $event.target.select(); }; + /** + * getInfo + * @param tmdbid + */ vm.getInfo = function (tmdbid) { console.log(tmdbid); if (tmdbid === null || tmdbid === undefined) { @@ -127,6 +149,9 @@ }); }; + /** + * create + */ vm.create = function () { var d = new Date(vm.movieinfo.release_date); var l = 0; @@ -193,11 +218,17 @@ } }; + /** + * cancel + */ vm.cancel = function () { $state.reload('torrents.uploads'); document.body.scrollTop = document.documentElement.scrollTop = 0; }; + /** + * clearAllCondition + */ vm.clearAllCondition = function () { vm.tags = []; }; diff --git a/modules/torrents/client/views/movie-list.client.view.html b/modules/torrents/client/views/movie-list.client.view.html index 8074c240..159ddc83 100644 --- a/modules/torrents/client/views/movie-list.client.view.html +++ b/modules/torrents/client/views/movie-list.client.view.html @@ -8,11 +8,11 @@
@@ -53,7 +53,7 @@
{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}:
-
@@ -132,12 +134,21 @@ {{item.createdat | life}} {{item.torrent_size | bytes:2}} - -

{{item.torrent_seeds}}

+ +

+ + {{item.torrent_seeds}} +

-

{{item.torrent_leechers}}

+

+ + {{item.torrent_leechers}} +

-

{{item.torrent_finished}}

+

+ + {{item.torrent_finished}} +

{{item.user.displayName}} diff --git a/modules/torrents/client/views/uploads-torrents.client.view.html b/modules/torrents/client/views/uploads-torrents.client.view.html index 6739ae4e..c114a711 100644 --- a/modules/torrents/client/views/uploads-torrents.client.view.html +++ b/modules/torrents/client/views/uploads-torrents.client.view.html @@ -41,7 +41,7 @@ -
+