settings: Move success / failure indicator to the top

And scroll there on any error (previously, we would scroll only if we end up
submitting the form).

(imported from commit 63597c4da78ac92cd5c2314d6d174d178b1caaf3)
This commit is contained in:
Keegan McAllister
2013-04-08 13:37:52 -04:00
parent e54e97ffda
commit 481f07d948
2 changed files with 5 additions and 2 deletions

View File

@@ -765,6 +765,9 @@ $(function () {
var settings_status = $('#settings-status');
function settings_change_error(message) {
// Scroll to the top so the error message is visible.
// We would scroll anyway if we end up submitting the form.
viewport.scrollTop(0);
settings_status.removeClass(status_classes)
.addClass('alert-error')
.text(message).stop(true).fadeTo(0,1);