From 9a7eb8d552d843601efd4c0af8cc70d99b9140c0 Mon Sep 17 00:00:00 2001 From: markus101 Date: Mon, 14 Feb 2011 17:59:23 -0800 Subject: [PATCH] Save button will be disabled until page is loaded, prevents issues with user presses save before the page is fully loaded (and AJAX is used to save). --- NzbDrone.Web/Content/style.css | 4 ++-- NzbDrone.Web/Views/Settings/Downloads.ascx | 3 ++- NzbDrone.Web/Views/Settings/General.ascx | 3 ++- NzbDrone.Web/Views/Settings/Indexers.ascx | 3 ++- NzbDrone.Web/Views/Settings/Quality.ascx | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/NzbDrone.Web/Content/style.css b/NzbDrone.Web/Content/style.css index 2e401361f..5237c18d1 100644 --- a/NzbDrone.Web/Content/style.css +++ b/NzbDrone.Web/Content/style.css @@ -224,13 +224,13 @@ input[type="text"]:hover background: #C0D6FF; } -.button +#save_button { border: 1px solid #006; background: #ccf; } -.button:hover +#save_button:hover { border: 1px solid #f00; background: #eef; diff --git a/NzbDrone.Web/Views/Settings/Downloads.ascx b/NzbDrone.Web/Views/Settings/Downloads.ascx index 2a4ee2e42..88af2724a 100644 --- a/NzbDrone.Web/Views/Settings/Downloads.ascx +++ b/NzbDrone.Web/Views/Settings/Downloads.ascx @@ -10,6 +10,7 @@ resetForm: false }; $('#form').ajaxForm(options); + $('#save_button').attr('disabled', ''); }); function showRequest(formData, jqForm, options) { @@ -131,7 +132,7 @@ - + <% } %> diff --git a/NzbDrone.Web/Views/Settings/General.ascx b/NzbDrone.Web/Views/Settings/General.ascx index 1d17f4db3..e78e00d41 100644 --- a/NzbDrone.Web/Views/Settings/General.ascx +++ b/NzbDrone.Web/Views/Settings/General.ascx @@ -10,6 +10,7 @@ resetForm: false }; $('#form').ajaxForm(options); + $('#save_button').attr('disabled', ''); }); function showRequest(formData, jqForm, options) { @@ -38,7 +39,7 @@

- +

<% } Html.EndForm();%> diff --git a/NzbDrone.Web/Views/Settings/Indexers.ascx b/NzbDrone.Web/Views/Settings/Indexers.ascx index c9af9b345..7964b84dd 100644 --- a/NzbDrone.Web/Views/Settings/Indexers.ascx +++ b/NzbDrone.Web/Views/Settings/Indexers.ascx @@ -11,6 +11,7 @@ resetForm: false }; $('#form').ajaxForm(options); + $('#save_button').attr('disabled', ''); }); function saveOrder(jqForm, options) { @@ -131,7 +132,7 @@ <%= Html.ValidationMessageFor(m => m.NzbsrusHash)%>
- + <% } %> diff --git a/NzbDrone.Web/Views/Settings/Quality.ascx b/NzbDrone.Web/Views/Settings/Quality.ascx index 4f7df6f7a..8086696be 100644 --- a/NzbDrone.Web/Views/Settings/Quality.ascx +++ b/NzbDrone.Web/Views/Settings/Quality.ascx @@ -12,6 +12,7 @@ resetForm: false }; $('#form').ajaxForm(options); + $('#save_button').attr('disabled', ''); }); function showRequest(formData, jqForm, options) { @@ -61,7 +62,7 @@
- +