From afe866b139e6f0a2137b691fbf241f7e053b0072 Mon Sep 17 00:00:00 2001 From: OldHawk Date: Wed, 6 Jun 2018 22:31:27 +0800 Subject: [PATCH] fix(torrents): cancel update torrent media info --- modules/core/client/app/trans-string-en.js | 1 + modules/core/client/app/trans-string-zh-tw.js | 1 + modules/core/client/app/trans-string-zh.js | 1 + .../client/controllers/torrent-info.client.controller.js | 8 ++++++++ .../torrents/client/views/view-torrent.client.view.html | 6 ++++++ 5 files changed, 17 insertions(+) diff --git a/modules/core/client/app/trans-string-en.js b/modules/core/client/app/trans-string-en.js index 117b3b2c..49098dac 100644 --- a/modules/core/client/app/trans-string-en.js +++ b/modules/core/client/app/trans-string-en.js @@ -399,6 +399,7 @@ VIEW_FORMATTED_MEDIA_INFO: 'View formatted media info', EDIT_THIS_MEDIA_INFO: 'Edit media info', SAVE_THIS_MEDIA_INFO: 'Save media info', + CANCEL_THIS_MEDIA_INFO: 'Cancel', EDIT_TORRENT_NFO_SUCCESSFULLY: 'Torrent media info edited successfully', EDIT_TORRENT_NFO_FAILED: 'Torrent media info edited failed', IMG_PAGE_INFO: 'Current: {{index}} / {{total}}', diff --git a/modules/core/client/app/trans-string-zh-tw.js b/modules/core/client/app/trans-string-zh-tw.js index 9ba8a8a7..eb76a427 100644 --- a/modules/core/client/app/trans-string-zh-tw.js +++ b/modules/core/client/app/trans-string-zh-tw.js @@ -399,6 +399,7 @@ VIEW_FORMATTED_MEDIA_INFO: '查看格式化的媒體信息', EDIT_THIS_MEDIA_INFO: '編輯媒體信息', SAVE_THIS_MEDIA_INFO: '保存媒體信息', + CANCEL_THIS_MEDIA_INFO: '取消', EDIT_TORRENT_NFO_SUCCESSFULLY: '種子媒體信息編輯成功', EDIT_TORRENT_NFO_FAILED: '種子媒體信息編輯失敗', IMG_PAGE_INFO: '當前頁: {{index}} / {{total}}', diff --git a/modules/core/client/app/trans-string-zh.js b/modules/core/client/app/trans-string-zh.js index 25356302..da38ca66 100644 --- a/modules/core/client/app/trans-string-zh.js +++ b/modules/core/client/app/trans-string-zh.js @@ -399,6 +399,7 @@ VIEW_FORMATTED_MEDIA_INFO: '查看格式化的媒体信息', EDIT_THIS_MEDIA_INFO: '编辑媒体信息', SAVE_THIS_MEDIA_INFO: '保存媒体信息', + CANCEL_THIS_MEDIA_INFO: '取消', EDIT_TORRENT_NFO_SUCCESSFULLY: '种子媒体信息编辑成功', EDIT_TORRENT_NFO_FAILED: '种子媒体信息编辑失败', IMG_PAGE_INFO: '当前页: {{index}} / {{total}}', diff --git a/modules/torrents/client/controllers/torrent-info.client.controller.js b/modules/torrents/client/controllers/torrent-info.client.controller.js index d65e1d66..2278842d 100644 --- a/modules/torrents/client/controllers/torrent-info.client.controller.js +++ b/modules/torrents/client/controllers/torrent-info.client.controller.js @@ -1780,6 +1780,14 @@ }); }; + /** + * CancelTorrentNfo + * @constructor + */ + vm.CancelTorrentNfo = function(){ + vm.mediaInfoEditMode = false; + }; + /** * doEditMediaInfo */ diff --git a/modules/torrents/client/views/view-torrent.client.view.html b/modules/torrents/client/views/view-torrent.client.view.html index cce04f55..2b8ae927 100644 --- a/modules/torrents/client/views/view-torrent.client.view.html +++ b/modules/torrents/client/views/view-torrent.client.view.html @@ -884,6 +884,12 @@ ng-click="vm.updateTorrentNfo()"> {{'SAVE_THIS_MEDIA_INFO' | translate}} +