diff --git a/Site/Controls/v5/Base/AjaxTextBox.ascx b/Site/Controls/v5/Base/AjaxTextBox.ascx index 8aafbcd9..a50d4358 100644 --- a/Site/Controls/v5/Base/AjaxTextBox.ascx +++ b/Site/Controls/v5/Base/AjaxTextBox.ascx @@ -34,8 +34,14 @@ // public static AjaxInputCallbackResult FunctionName (string newValue, string cookie); // // The page must include IncludedControls.JsonParameters and IncludedControls.ColorAnimation among its script. + + <% + if (!string.IsNullOrEmpty(this.OnChange) || !string.IsNullOrEmpty(this.AjaxCallbackUrl)) + { + Response.Write("$(this).css('background-color', '#FFFFA0');"); // set background yellow indicating processing + } + %> - $(this).css('background-color', '#FFFFA0'); if ("" != "<%=this.AjaxCallbackUrl%>") { // if there's a direct callback AJAX url @@ -49,16 +55,16 @@ } else { alertify.error(SwarmopsJS.unescape('<%= this.Localized_AjaxGeneralErrorSettingValue %>')); } - $(this).css('background-color', '#FFA0A0'); + $(this).css('background-color', '#FFA0A0'); // set background red indicating error } else { if (msg.DisplayMessage != null) { alertify.log(msg.DisplayMessage); } - $(this).css('background-color', '#E0FFE0'); + $(this).css('background-color', '#E0FFE0'); // set background green indicating success _initVal_<%=this.TextInput.ClientID%> = msg.NewValue; } $(this).val(_initVal_<%=this.TextInput.ClientID%>); - $(this).animate({ backgroundColor: "#FFFFFF" }, 250); + $(this).animate({ backgroundColor: "#FFFFFF" }, 250); // animate background back to white <% if (!string.IsNullOrEmpty(this.OnChange)) @@ -118,6 +124,10 @@ <%=this.ClientID%>_initialize(newValue); } + function <%=this.ClientID%>_updateProgressAnimate() { + $('#<%=this.TextInput.ClientID%>').css('background-color', '#FFFFA0'); + } + function <%=this.ClientID%>_disable() { $('#<%=this.TextInput.ClientID%>').attr ('disabled', 'disabled'); diff --git a/Site/Controls/v5/Base/AjaxTextBox.ascx.cs b/Site/Controls/v5/Base/AjaxTextBox.ascx.cs index 8522c639..fa38f177 100644 --- a/Site/Controls/v5/Base/AjaxTextBox.ascx.cs +++ b/Site/Controls/v5/Base/AjaxTextBox.ascx.cs @@ -12,7 +12,7 @@ namespace Swarmops.Frontend.Controls.Base protected void Page_Load(object sender, EventArgs e) { this.TextInput.Attributes["Placeholder"] = this.Placeholder; - this.TextInput.TextMode = this.Mode; + this.TextInput.TextMode = this.Mode; // Defaults to SingleLine, so will work uninitialized } public string Text diff --git a/Site/Master-v5.master b/Site/Master-v5.master index 320aa1bf..43d5849d 100644 --- a/Site/Master-v5.master +++ b/Site/Master-v5.master @@ -246,7 +246,7 @@