mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-15 06:09:58 +08:00
remove DOM after deleting texture at user manage page
This commit is contained in:
parent
68762bdc64
commit
791195c44d
@ -3,7 +3,7 @@
|
|||||||
* @Author: printempw
|
* @Author: printempw
|
||||||
* @Date: 2016-02-04 13:53:55
|
* @Date: 2016-02-04 13:53:55
|
||||||
* @Last Modified by: printempw
|
* @Last Modified by: printempw
|
||||||
* @Last Modified time: 2016-04-03 07:55:53
|
* @Last Modified time: 2016-04-03 08:26:15
|
||||||
*/
|
*/
|
||||||
require "../libraries/session.inc.php";
|
require "../libraries/session.inc.php";
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ if (isset($_GET['action'])) {
|
|||||||
}
|
}
|
||||||
if ($_POST[$type] == "true" && $user->getTexture($type) != "") {
|
if ($_POST[$type] == "true" && $user->getTexture($type) != "") {
|
||||||
Utils::remove("./textures/".$user->getTexture($type));
|
Utils::remove("./textures/".$user->getTexture($type));
|
||||||
$user->db->update($user->uname, 'hash_'.$type, '');
|
$user->db->update('hash_'.$type, '', ['where' => "username='$user->uname'"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$json['errno'] = 0;
|
$json['errno'] = 0;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: printempw
|
* @Author: printempw
|
||||||
* @Date: 2016-02-04 16:48:42
|
* @Date: 2016-02-04 16:48:42
|
||||||
* @Last Modified by: printempw
|
* @Last Modified by: printempw
|
||||||
* @Last Modified time: 2016-03-19 10:08:43
|
* @Last Modified time: 2016-04-03 08:23:49
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -82,6 +82,10 @@ function deleteTexture(uname) {
|
|||||||
success: function(json) {
|
success: function(json) {
|
||||||
if (json.errno == 0) {
|
if (json.errno == 0) {
|
||||||
showAlert(json.msg);
|
showAlert(json.msg);
|
||||||
|
// remove DOM
|
||||||
|
if (steve) $('[src="../skin/' + uname + '-steve.png"]').remove();
|
||||||
|
if (alex) $('[src="../skin/' + uname + '-alex.png"]').remove();
|
||||||
|
if (cape) $('[src="../cape/' + uname + '.png"]').remove();
|
||||||
} else {
|
} else {
|
||||||
showAlert(json.msg);
|
showAlert(json.msg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user