From 95495a1db6634f7bd442c2c565eb4fd0df00cf10 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Thu, 4 Jun 2015 11:28:44 +0200 Subject: [PATCH] Fixed a very embarrassing bug on Init --- Site5/Pages/v5/Public/Initialize.aspx | 29 +++++++++++------------- Site5/Pages/v5/Public/Initialize.aspx.cs | 20 ---------------- 2 files changed, 13 insertions(+), 36 deletions(-) diff --git a/Site5/Pages/v5/Public/Initialize.aspx b/Site5/Pages/v5/Public/Initialize.aspx index 686a2b5a..51e4e1d6 100644 --- a/Site5/Pages/v5/Public/Initialize.aspx +++ b/Site5/Pages/v5/Public/Initialize.aspx @@ -105,7 +105,7 @@ if (hostName && hostName.length > 0 && hostAddress && hostAddress.length > 0) { $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/VerifyHostNameAndAddress", + url: "/Pages/v5/Public/Initialize.aspx/VerifyHostNameAndAddress", data: "{'name': '" + escape(hostName) + "', 'address': '" + escape(hostAddress) + "'}", contentType: "application/json; charset=utf-8", dataType: "json", @@ -130,7 +130,7 @@ if (isValid) { // Validate writability of config file $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/IsConfigurationFileWritable", + url: "/Pages/v5/Public/Initialize.aspx/IsConfigurationFileWritable", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", @@ -196,7 +196,7 @@ $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/CreateDatabaseFromRoot", + url: "/Pages/v5/Public/Initialize.aspx/CreateDatabaseFromRoot", data: $.toJSON(jsonData), contentType: "application/json; charset=utf-8", dataType: "json", @@ -231,7 +231,7 @@ $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/FirstCredentialsTest", + url: "/Pages/v5/Public/Initialize.aspx/FirstCredentialsTest", data: $.toJSON(jsonData), contentType: "application/json; charset=utf-8", dataType: "json", @@ -302,7 +302,7 @@ if (isValid) { $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/CreateFirstUser", + url: "/Pages/v5/Public/Initialize.aspx/CreateFirstUser", data: "{'name': '" + escape($('#<%=this.TextFirstUserName.ClientID %>').val()) + "', 'mail': '" + escape($('#<%=this.TextFirstUserMail.ClientID %>').val()) + "', 'password': '" + escape($('#<%=this.TextFirstUserPassword1.ClientID %>').val()) + "'}", contentType: "application/json; charset=utf-8", dataType: "json", @@ -347,7 +347,7 @@ $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/ResetTestCredentials", + url: "/Pages/v5/Public/Initialize.aspx/ResetTestCredentials", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", @@ -362,7 +362,7 @@ $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/IsConfigurationFileWritable", + url: "/Pages/v5/Public/Initialize.aspx/IsConfigurationFileWritable", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", @@ -387,7 +387,7 @@ $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/GetInitProgress", + url: "/Pages/v5/Public/Initialize.aspx/GetInitProgress", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", @@ -422,7 +422,7 @@ $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/GetInitProgressMessage", + url: "/Pages/v5/Public/Initialize.aspx/GetInitProgressMessage", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", @@ -452,7 +452,7 @@ $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/RecheckDatabasePermissions", + url: "/Pages/v5/Public/Initialize.aspx/RecheckDatabasePermissions", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", @@ -503,7 +503,7 @@ function beginInitDatabase() { $.ajax({ type: "POST", - url: "/Pages/v5/Init/Default.aspx/InitDatabase", + url: "/Pages/v5/Public/Initialize.aspx/InitDatabase", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", @@ -527,11 +527,8 @@
-
|
| 
| 
-
Swarmops Logo
-
-
- +
+ INITIALIZING SWARMOPS
diff --git a/Site5/Pages/v5/Public/Initialize.aspx.cs b/Site5/Pages/v5/Public/Initialize.aspx.cs index 6ee58af1..186590d2 100644 --- a/Site5/Pages/v5/Public/Initialize.aspx.cs +++ b/Site5/Pages/v5/Public/Initialize.aspx.cs @@ -47,10 +47,6 @@ namespace Swarmops.Frontend.Pages.v5.Public throw new InvalidOperationException("This installation has already been initialized. Cannot re-initalize on top of existing installation."); } - this.ImageCultureIndicator.Style[HtmlTextWriterStyle.MarginTop] = "-3px"; - this.ImageCultureIndicator.Style[HtmlTextWriterStyle.MarginRight] = "3px"; - this.ImageCultureIndicator.Style[HtmlTextWriterStyle.Cursor] = "pointer"; - this.TextCredentialsReadDatabase.Style[HtmlTextWriterStyle.Width] = "70px"; this.TextCredentialsReadServer.Style[HtmlTextWriterStyle.Width] = "70px"; this.TextCredentialsReadUser.Style[HtmlTextWriterStyle.Width] = "70px"; @@ -83,9 +79,6 @@ namespace Swarmops.Frontend.Pages.v5.Public private void Localize() { - this.LabelCurrentUserName.Text = @"Systems Administrator"; - this.LabelCurrentOrganizationName.Text = @"No organizations yet"; - this.LabelPreferences.Text = Global.CurrentUserInfo_Preferences; this.LabelSidebarInfoHeader.Text = Global.Sidebar_Information; this.LabelSidebarInfoContent.Text = @"Welcome to the Swarmops installation pages. This will guide you to an operational Swarmops."; this.LabelSidebarActionsHeader.Text = Global.Sidebar_Actions; @@ -97,19 +90,6 @@ namespace Swarmops.Frontend.Pages.v5.Public this.DropFavoriteColor.Items.Add (" -- Select one --"); this.DropFavoriteColor.Items.Add ("Blue!"); this.DropFavoriteColor.Items.Add ("No, wait, yellow!"); - - // SetupMenuItems(); - - string flagName = "uk"; - - string cultureString = Thread.CurrentThread.CurrentCulture.ToString(); - string cultureStringLower = cultureString.ToLowerInvariant(); - - if (cultureStringLower != "en-gb" && cultureString.Length > 3) - { - flagName = cultureStringLower.Substring (3); - } - this.ImageCultureIndicator.ImageUrl = "~/Images/Flags/" + flagName + "-24px.png"; }