return false;
});
$(postElement).find(".create-reply button:submit").click(function() {
+ button = $(this);
+ button.attr("disabled", "disabled");
sender = $(this.form).find(":input[name=sender]").val();
inputField = $(this.form).find(":input[name=text]:enabled").get(0);
postId = getPostId(this);
} else {
alert(error);
}
+ button.removeAttr("disabled");
});
})(sender, postId, text, inputField);
return false;
iconBlinking = false;
} else {
iconActive = !iconActive;
- console.log("showing icon: " + iconActive);
changeIcon(iconActive ? "images/icon-activity.png" : "images/icon.png");
setTimeout(toggleIcon, 1500);
}
return false;
});
$("#sone #update-status").submit(function() {
+ button = $("button:submit", this);
+ button.attr("disabled", "disabled");
if ($(this).find(":input.default:enabled").length > 0) {
return false;
}
if ((data != null) && data.success) {
loadNewPost(data.postId, data.sone, data.recipient);
}
+ button.removeAttr("disabled");
});
$(this).find(":input[name=sender]").val(getCurrentSoneId());
$(this).find(":input[name=text]:enabled").val("").blur();
});
});
+ /* ajaxify the search input field. */
+ getTranslation("WebInterface.DefaultText.Search", function(defaultText) {
+ registerInputTextareaSwap("#sone #search input[name=query]", defaultText, "query", false, true);
+ });
+
/* ajaxify input field on “view Sone” page. */
getTranslation("WebInterface.DefaultText.Message", function(defaultText) {
registerInputTextareaSwap("#sone #post-message input[name=text]", defaultText, "text", false, false);