diff --git a/modules/about/client/controllers/about.client.controller.js b/modules/about/client/controllers/about.client.controller.js index 40434be7..7e369c1b 100644 --- a/modules/about/client/controllers/about.client.controller.js +++ b/modules/about/client/controllers/about.client.controller.js @@ -70,6 +70,8 @@ */ vm.orderByVote = function () { vm.sortSLF = undefined; + vm.sortSize = undefined; + vm.sortLife = undefined; if (vm.sortVote === undefined) { vm.sortVote = '-'; @@ -82,11 +84,51 @@ vm.buildPager(); }; + /** + * orderBySize + */ + vm.orderBySize = function () { + vm.sortSLF = undefined; + vm.sortVote = undefined; + vm.sortLife = undefined; + + if (vm.sortSize === undefined) { + vm.sortSize = '-'; + vm.sort = {'torrent_size': -1}; + } else if (vm.sortSize === '-') { + vm.sortSize = undefined; + vm.sort = undefined; + } + + vm.buildPager(); + }; + + /** + * orderByLife + */ + vm.orderByLife = function () { + vm.sortSLF = undefined; + vm.sortVote = undefined; + vm.sortSize = undefined; + + if (vm.sortLife === undefined) { + vm.sortLife = '-'; + vm.sort = {'createdat': 1}; + } else if (vm.sortLife === '-') { + vm.sortLife = undefined; + vm.sort = undefined; + } + + vm.buildPager(); + }; + /** * orderBySLF */ vm.orderBySLF = function () { vm.sortVote = undefined; + vm.sortSize = undefined; + vm.sortLife = undefined; if (vm.sortSLF === undefined) { vm.sortSLF = '-S'; diff --git a/modules/about/client/views/maker-view.client.view.html b/modules/about/client/views/maker-view.client.view.html index 95734800..154da1be 100644 --- a/modules/about/client/views/maker-view.client.view.html +++ b/modules/about/client/views/maker-view.client.view.html @@ -133,8 +133,18 @@ uib-tooltip="{{ 'TABLE_FIELDS.TITLE_VOTES' | translate}}">{{ 'TABLE_FIELDS.VOTES' | translate}} - {{ 'TABLE_FIELDS.LIFETIME' | translate}} - {{ 'TABLE_FIELDS.SIZE' | translate}} + + {{ 'TABLE_FIELDS.LIFETIME' | translate}} + + + + {{ 'TABLE_FIELDS.SIZE' | translate}} + + {{ 'TABLE_FIELDS.VOTES' | translate}} - {{ 'TABLE_FIELDS.LIFETIME' | translate}} - {{ 'TABLE_FIELDS.SIZE' | translate}} + + {{ 'TABLE_FIELDS.LIFETIME' | translate}} + + + + {{ 'TABLE_FIELDS.SIZE' | translate}} + + {{ 'TABLE_FIELDS.VOTES' | translate}} - {{ 'TABLE_FIELDS.LIFETIME' | translate}} - {{ 'TABLE_FIELDS.SIZE' | translate}} + + {{ 'TABLE_FIELDS.LIFETIME' | translate}} + + + + {{ 'TABLE_FIELDS.SIZE' | translate}} + +