From c6850f41bb9c148f26ab995f16ced93fdad21f55 Mon Sep 17 00:00:00 2001 From: printempw Date: Sat, 21 Jan 2017 11:17:45 +0800 Subject: [PATCH] add some detection for bad ass --- resources/assets/src/scripts/admin.js | 34 +++++++++++++++------------ 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/resources/assets/src/scripts/admin.js b/resources/assets/src/scripts/admin.js index c962923e..d7367ba9 100644 --- a/resources/assets/src/scripts/admin.js +++ b/resources/assets/src/scripts/admin.js @@ -2,7 +2,7 @@ * @Author: printempw * @Date: 2016-07-22 14:02:44 * @Last Modified by: printempw - * @Last Modified time: 2017-01-08 16:07:24 + * @Last Modified time: 2017-01-21 10:58:50 */ 'use strict'; @@ -208,21 +208,25 @@ $('body').on('change', '#preference', function() { }); function changeTexture(pid) { - var dom = '
'+ - ''+ - ''+ - '
'+ - '
'+ - ''+ - ''+ - '
'; + let dom = ` +
+ + +
+
+ + +
`; - var player_name = $('#'+pid).find('#player-name').text(); - showModal(dom, trans('admin.changePlayerTexture', {'player': player_name}), 'default', 'ajaxChangeTexture('+pid+')'); + let playerName = $('#'+pid).find('#player-name').text(); + + showModal(dom, trans('admin.changePlayerTexture', {'player': playerName}), 'default', { + callback: `ajaxChangeTexture(${pid})` + }); return; }