Add default value when renaming texture in skin library
This commit is contained in:
parent
b0f29c5036
commit
93364ef723
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* @Author: printempw
|
* @Author: printempw
|
||||||
* @Date: 2016-07-19 10:46:38
|
* @Date: 2016-07-19 10:46:38
|
||||||
* @Last Modified by: printempw
|
* @Last Modified by: g-plane
|
||||||
* @Last Modified time: 2017-01-22 15:57:57
|
* @Last Modified time: 2017-04-25 21:56:19
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
@ -244,10 +244,11 @@ function upload() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeTextureName(tid) {
|
function changeTextureName(tid, oldName) {
|
||||||
swal({
|
swal({
|
||||||
text: trans('skinlib.setNewTextureName'),
|
text: trans('skinlib.setNewTextureName'),
|
||||||
input: 'text',
|
input: 'text',
|
||||||
|
inputValue: oldName,
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
inputValidator: (value) => {
|
inputValidator: (value) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
<td id="name">{{ $texture->name }}
|
<td id="name">{{ $texture->name }}
|
||||||
@if (!is_null($user) && ($texture->uploader == $user->uid || $user->isAdmin()))
|
@if (!is_null($user) && ($texture->uploader == $user->uid || $user->isAdmin()))
|
||||||
<small>
|
<small>
|
||||||
<a href="javascript:changeTextureName({{ $texture->tid }});">{{ trans('skinlib.show.edit-name') }}</a>
|
<a href="javascript:changeTextureName({{ $texture->tid }}, '{{ $texture->name }}');">{{ trans('skinlib.show.edit-name') }}</a>
|
||||||
</small>
|
</small>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user