Committing work on init

This commit is contained in:
Rick Falkvinge
2013-07-11 08:32:23 +00:00
parent 7c25e6ce01
commit 48f696ab63
2 changed files with 20 additions and 11 deletions
+15 -10
View File
@@ -45,6 +45,7 @@
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<script type="text/javascript">
var databaseInitComplete = false;
$(document).ready(function () {
@@ -168,7 +169,11 @@
}
else if (stepNumber == 3) {
isValid = false; // always disallow button press on populate step
isValid = databaseInitComplete;
if (isValid) {
$('#<%=this.TextFirstUserName.ClientID %>').focus();
}
}
else if (stepNumber == 4) {
isValid = true; // assume true, make false as we go
@@ -238,7 +243,7 @@
// Yes, config is writable. Hide "unwritable" div, show "writable" div, all is nice
$('#DivDatabaseUnwritable').css('display', 'none');
$('#DivDatabaseWritable').fadeIn('slow');
$('#<%=this.TextCredentialsReadDatabase.ClientID %>').focus();
setTimeout('$("#<%=this.TextCredentialsReadDatabase.ClientID %>").focus();', 250);
} else {
// Config is NOT writable. Keep the error on-screen and keep re-checking every two seconds.
@@ -258,11 +263,12 @@
dataType: "json",
success: function (msg) {
if (msg.d > 99) {
// We're done. Undisplay the progress bar, show the next step
$('#DivInitializingDatabase').css('display', 'none');
$('#DivCreateFirstUser').fadeIn('slow');
// $('#<%=this.TextCredentialsReadDatabase.ClientID %>').focus();
$("#DivProgressDatabase .ui-progressbar-value").animate(
{
width: "100%"
}, { queue: false });
databaseInitComplete = true;
$(".buttonNext").click();
} else {
// We're not done yet. Keep the progress bar on-screen and keep re-checking.
@@ -291,11 +297,10 @@
dataType: "json",
success: function (msg) {
$('#SpanInitProgressMessage').text(msg.d);
if (msg.d == 'Complete.') {
// We're done. Do nothing, the progress bar updater will do this step.
$('#wizard').smartWizard("goToStep", 4);
// We're done. Do nothing, the progress bar updater will do this step.
} else {
+5 -1
View File
@@ -538,6 +538,7 @@ public partial class Pages_v5_Init_Default : System.Web.UI.Page
Currency.Create("ISK", "Icelandic Krona", string.Empty);
Currency.Create("CHF", "Swiss Franc", string.Empty);
Currency.Create("GBP", "Pounds Sterling", "£");
Currency.Create("BTC", "Bitcoin", "฿");
// Create the sandbox
@@ -704,7 +705,10 @@ public partial class Pages_v5_Init_Default : System.Web.UI.Page
if (!(VerifyHostName(this.TextServerName.Text) && VerifyHostAddress(this.TextServerAddress.Text)))
{
return; // Probable hack attempt - fail silently
if (!System.Diagnostics.Debugger.IsAttached)
{
return; // Probable hack attempt - fail silently
}
}
Swarmops.Logic.Swarm.Person expectedPersonOne = Swarmops.Logic.Security.Authentication.Authenticate("1", this.TextFirstUserPassword1.Text);