diff --git a/Logic/Swarm/DashboardTodos.cs b/Logic/Swarm/DashboardTodos.cs index f9cb0b06..a135cbdb 100644 --- a/Logic/Swarm/DashboardTodos.cs +++ b/Logic/Swarm/DashboardTodos.cs @@ -44,10 +44,10 @@ namespace Swarmops.Logic.Swarm todo.JavaScript = "alertify.prompt(decodeURIComponent('" + Uri.EscapeDataString ( Logic_Swarm_DashboardTodos.Bitcoin_SetPayoutAddress_Prompt.Replace ( - "[SwarmopsInstallationName]", SystemSettings.InstallationName)) + + "[InstallationName]", SystemSettings.InstallationName)) + "' + '

'), function(okPressed, enteredData) { " + " if (okPressed) { " + - "SwarmopsJS.ajaxCall('/Automation/FinancialFunctions.aspx/SetBitcoinPayoutAddress', { bitcoinAddress: 'test' }, function (result) { " + + "SwarmopsJS.ajaxCall('/Automation/FinancialFunctions.aspx/SetBitcoinPayoutAddress', { bitcoinAddress: enteredData }, function (result) { " + "if (result.Success) { alert ('for great justice!'); $('div#divDashboardTodo').fadeOut(); } else { alertify.alert('Could not set payout address: ' + result.DisplayMessage); } " + "} ); " + " }}); return false;"; diff --git a/Site5/Master-v5.master.cs b/Site5/Master-v5.master.cs index 794391ae..6430f335 100644 --- a/Site5/Master-v5.master.cs +++ b/Site5/Master-v5.master.cs @@ -8,6 +8,7 @@ using System.Threading; using System.Web; using System.Web.Security; using System.Web.UI; +using NBitcoin; using Resources; using Swarmops.Interface.Support; using Swarmops.Logic.Financial; @@ -119,7 +120,12 @@ namespace Swarmops this.RepeaterTodoItems.DataSource = todos; this.RepeaterTodoItems.DataBind(); - this.LabelNoTodoItems.Visible = (todos.Count == 0); + + if (todos.Count == 0) + { + // If no todos, hide the entire Todos box + this.LiteralDocumentReadyHook.Text += @"$('div#divDashboardTodo').hide();"; + } // Set up main menu @@ -137,7 +143,7 @@ namespace Swarmops if (dashMessage != null && dashMessage.Value.Length > 0) { - this.LiteralDocumentReadyHook.Text = + this.LiteralDocumentReadyHook.Text += string.Format ("alertify.alert(decodeURIComponent('{0}'));", dashMessage.Value); DashboardMessage.Reset(); }