mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
FIxed settings dialog closing.
Invalid elements prevent application, but not cancelling.
This commit is contained in:
@@ -953,12 +953,11 @@ function showAboutDialog(evt) {
|
||||
document.getElementById('about').showModal();
|
||||
}
|
||||
function closeSettingsDialog(evt) {
|
||||
if (!areSettingsValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var dialog = evt.target.parentElement;
|
||||
if (evt.target.classList.contains('accept')) {
|
||||
if (!areSettingsValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Update the JS variable values. */
|
||||
var settings = {
|
||||
enableDebugLogging: document.getElementById('enableDebugLogging').checked,
|
||||
@@ -1001,6 +1000,7 @@ function closeSettingsDialog(evt) {
|
||||
/* Re-apply the existing settings to the settings dialog elements. */
|
||||
loot.updateSettingsUI();
|
||||
}
|
||||
evt.target.parentElement.close();
|
||||
}
|
||||
|
||||
function showSettingsDialog(evt) {
|
||||
|
||||
@@ -182,7 +182,7 @@ along with LOOT. If not, see <http://www.gnu.org/licenses/>.
|
||||
<paper-button affirmative autofocus>OK</paper-button>
|
||||
</loot-dialog>
|
||||
|
||||
<loot-dialog id="settings" heading="Settings" >
|
||||
<loot-dialog id="settings" heading="Settings" closeSelector="">
|
||||
<div center horizontal layout>
|
||||
<div>Default Game</div>
|
||||
<loot-dropdown-menu id="defaultGameSelect">
|
||||
|
||||
Reference in New Issue
Block a user