launcher: trigger all inputs check when one change, check all at init
This commit is contained in:
parent
787d703fc3
commit
924e668e48
1 changed files with 6 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ $(document).ready(()=>{
|
|||
|
||||
input.appendTo(item)
|
||||
|
||||
input.on('change',function(e){
|
||||
input.on('change',function(e,stop){
|
||||
var v = $(this).val()
|
||||
if (option.type == 'boolean') {
|
||||
v = v == 'true' ? true : ''
|
||||
|
|
@ -78,6 +78,8 @@ $(document).ready(()=>{
|
|||
wrapper.find('.error-msg').remove()
|
||||
argv[i] = v
|
||||
}
|
||||
|
||||
if (!stop) $('input').not(input).trigger('change',true)
|
||||
})
|
||||
|
||||
cancel = $(`<div class="btn clear"><i class="fa fa-remove fa-fw"></i></div>`)
|
||||
|
|
@ -137,6 +139,9 @@ $(document).ready(()=>{
|
|||
|
||||
form.appendTo('#launcher')
|
||||
|
||||
$('input').trigger('change')
|
||||
|
||||
|
||||
$('#loading').remove()
|
||||
setTimeout(()=>{
|
||||
form.addClass('loaded')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue