Hide info screen if account is open and vice versa, plus reorganize screens so loadAfterDeleteScreen always appears on top and can't be closed.

This commit is contained in:
Robbie Antenesse 2015-12-12 11:24:47 -08:00
parent ea04571590
commit d33229e472
2 changed files with 16 additions and 14 deletions

View File

@ -199,20 +199,6 @@ require_once(SITE_LOCATION . '/php/notificationconditiontree.php');
</div>
</div>
<div id="loadAfterDeleteScreen" style="display:none;">
<div id="loadAfterDeleteFade"></div>
<div id="loadAfterDeletePage">
<div class="settingsCol">
<h1>Dictionary Deleted</h1>
<label>Select dictionary to load:<br />
<select id="loadAfterDelete" onchange="ChangeDictionary(this);document.getElementById('loadAfterDeleteScreen').style.display = 'none';"></select>
</label>
<p>Or</p>
<label><button type="button" onclick="CreateNewDictionary();document.getElementById('loadAfterDeleteScreen').style.display = 'none';" style="cursor:pointer;">Create a New Dictionary</button></label>
</div>
</div>
</div>
<?php if ($current_user > 0) {
$user_email = Get_User_Email($current_user);
?>
@ -246,6 +232,20 @@ require_once(SITE_LOCATION . '/php/notificationconditiontree.php');
}
?>
<div id="loadAfterDeleteScreen" style="display:none;">
<div id="loadAfterDeleteFade"></div>
<div id="loadAfterDeletePage">
<div class="settingsCol">
<h1>Dictionary Deleted</h1>
<label>Select dictionary to load:<br />
<select id="loadAfterDelete" onchange="ChangeDictionary(this);document.getElementById('loadAfterDeleteScreen').style.display = 'none';"></select>
</label>
<p>Or</p>
<label><button type="button" onclick="CreateNewDictionary();document.getElementById('loadAfterDeleteScreen').style.display = 'none';" style="cursor:pointer;">Create a New Dictionary</button></label>
</div>
</div>
</div>
</contents>
<footer>
Dictionary Builder only guaranteed to work with most up-to-date HTML5 browsers. <a href="https://github.com/Alamantus/DictionaryBuilder/issues" target="_blank">Report a Problem</a> | <span class="clickable" onclick="ShowInfo('termsText')" style="font-size:12px;">Terms</span> <span class="clickable" onclick="ShowInfo('privacyText')" style="font-size:12px;">Privacy</span>

View File

@ -261,6 +261,7 @@ function ShowInfo(variableName) {
document.getElementById("dictionaryWarn").innerHTML = "If your current dictionary is not already saved to your account, be sure to <span class='exportWarnText' onclick='ExportDictionary()'>export it before logging in</span> so you don't lose anything!";
}
}
HideAccountSettings();
document.getElementById("infoPage").scrollTop = 0;
document.getElementById("infoScreen").style.display = "block";
}
@ -271,6 +272,7 @@ function HideInfo() {
function ShowAccountSettings(variableName) {
document.getElementById("accountSettingsScreen").style.display = "block";
HideInfo();
}
function HideAccountSettings() {