From 0fdbc069eb4f6ad79c0d32c7e51d0eb7c914bc1f Mon Sep 17 00:00:00 2001 From: Dionysis Zindros Date: Fri, 10 Jan 2014 16:23:39 -0800 Subject: [PATCH] Reset remaining character count to 140 when status is posted --- interface_common.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/interface_common.js b/interface_common.js index fff49e2..08ea477 100644 --- a/interface_common.js +++ b/interface_common.js @@ -420,12 +420,17 @@ var postSubmit = function(e) var $replyText = $this.closest(".post-area-new").find("textarea"); var $postOrig = $this.closest(".post-data"); - if( !$postOrig.length ) + + if (!$postOrig.length) { $postOrig = $this.closest(".modal-content").find(".post-data"); + } newPostMsg($replyText.val(), $postOrig); $replyText.val(""); + var tweetForm = $this.parents("form"); + var remainingCount = tweetForm.find(".post-area-remaining"); + remainingCount.text(140); $replyText.attr("placeholder", "Your message was sent!"); closeModal($this); }