From 5490057480f17e5810cf8b9e558769ebd74d4b27 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 16 Sep 2009 12:27:13 -0700 Subject: When editing tags in place, and there is a validation error, highlight the tag with a red border and show a statust message. This fixes ticket: #779 --- modules/tag/js/tag.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/tag/js') diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index aaae9e72..d656da36 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -19,6 +19,7 @@ function ajaxify_tag_form() { function closeEditInPlaceForms() { // closes currently open inplace edit forms if ($("#gRenameTagForm").length) { + $("#gEditErrorMessage").remove(); var li = $("#gRenameTagForm").parent(); $("#gRenameTagForm").parent().html($("#gRenameTagForm").parent().data("revert")); li.height(""); @@ -66,6 +67,11 @@ function editInPlace(element) { $("#gTag-" + data.tag_id).text(data.new_tagname); // update tagname console.log(data); window.location.reload(); + } else if (data.result == "error") { + $("#gRenameTagForm #name") + .css("border", "2px solid red") + .focus(); + $("#gTagAdmin").before("

" + data.message + "

"); } } }); -- cgit v1.2.3