FIxed settings dialog closing.

Invalid elements prevent application, but not cancelling.
This commit is contained in:
Oliver Hamlet
2014-11-10 13:33:48 +00:00
parent 9614170dcf
commit 0ca27f0949
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -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) {
+1 -1
View File
@@ -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">