From: Sarven Capadisli Date: Mon, 8 Jun 2009 20:52:27 +0000 (+0000) Subject: Clearing notice_data-test and resetting notice_text-count if the X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=67cb99c4428f71a19187ccc0b8ac6ad0f129b325;p=quix0rs-gnu-social.git Clearing notice_data-test and resetting notice_text-count if the notice XHR. Removed hanging text URL from previous commit. --- diff --git a/js/util.js b/js/util.js index 763c7d7ee3..44c3002cd5 100644 --- a/js/util.js +++ b/js/util.js @@ -178,10 +178,14 @@ $(document).ready(function(){ $('#form_notice').append(document._importNode($(".error", xhr.responseXML).get(0), true)); } else { - var HTTP20x30x = new Array(200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307); + var HTTP20x30x = [200, 404, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307]; if(jQuery.inArray(parseInt(xhr.status), HTTP20x30x) < 0) { alert("Sorry! We had trouble sending your notice ("+xhr.status+" "+xhr.statusText+"). Please report the problem to the site administrator if this happens again."); } + else { + $("#notice_data-text").val(""); + counter(); + } } } },