From 8a8a4e57ee9049b60167570f15fe73113939f867 Mon Sep 17 00:00:00 2001 From: gplane Date: Wed, 26 Apr 2017 17:43:34 +0800 Subject: [PATCH] Show message when closet is empty after deleting textures. --- resources/assets/src/scripts/user.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/assets/src/scripts/user.js b/resources/assets/src/scripts/user.js index bd4d9eeb..fad8379d 100644 --- a/resources/assets/src/scripts/user.js +++ b/resources/assets/src/scripts/user.js @@ -2,7 +2,7 @@ * @Author: printempw * @Date: 2016-07-16 10:02:24 * @Last Modified by: g-plane - * @Last Modified time: 2017-04-26 17:32:38 + * @Last Modified time: 2017-04-26 17:42:50 */ 'use strict'; @@ -204,6 +204,14 @@ function removeFromCloset(tid) { }); $('div[tid='+tid+']').remove(); + + ['skin', 'cape'].forEach(type => { + let container = $(`#${type}-category`); + if ($.trim(container.html()) == '') { + container.html(`
+ ${trans('user.emptyClosetMsg', { url: url('skinlib?filter=' + type) })}
`); + } + }) } else { toastr.warning(json.msg); }