mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:58:27 +02:00
disable the save button if no settings are changed
This commit is contained in:
parent
bbf111a9a0
commit
cccacf4e6a
1 changed files with 8 additions and 0 deletions
|
@ -64,7 +64,15 @@ $(document).ready(function(){
|
||||||
// this input was changed, add the changed data attribute to it
|
// this input was changed, add the changed data attribute to it
|
||||||
$(this).attr('data-changed', true)
|
$(this).attr('data-changed', true)
|
||||||
|
|
||||||
|
$('.save-button').removeAttr('disabled')
|
||||||
|
|
||||||
badgeSidebarForDifferences($(this))
|
badgeSidebarForDifferences($(this))
|
||||||
|
|
||||||
|
if ($('span.badge:not(:empty)').length == 0) {
|
||||||
|
// if all badges are empty we have no changed values
|
||||||
|
// so we can disable the save button again
|
||||||
|
$('.save-button').attr('disabled', true)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#advanced-toggle-button').click(function(){
|
$('#advanced-toggle-button').click(function(){
|
||||||
|
|
Loading…
Reference in a new issue