launcher: trigger all inputs check when one change, check all at init

This commit is contained in:
jean-emmanuel 2016-12-03 11:53:22 +01:00
parent 787d703fc3
commit 924e668e48

View file

@ -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')