aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js22
1 files changed, 16 insertions, 6 deletions
diff --git a/view/js/main.js b/view/js/main.js
index dcd04f053..017d39353 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -44,6 +44,17 @@ $(document).ready(function() {
$(document).on('click', '.conversation-settings-link', getConversationSettings);
$(document).on('click', '#settings_module_ajax_submit', postConversationSettings);
+ $(document).on('click focus', '.comment-edit-form textarea', function(e) {
+ if(! this.autocomplete_handled) {
+ /* autocomplete @nicknames */
+ $(this).editor_autocomplete(baseurl+"/acl?f=&n=1");
+ /* autocomplete bbcode */
+ $(this).bbco_autocomplete('bbcode');
+
+ this.autocomplete_handled = true;
+ }
+ });
+
var tf = new Function('n', 's', 'var k = s.split("/")['+aStr['plural_func']+']; return (k ? k : s);');
jQuery.timeago.settings.strings = {
@@ -239,7 +250,11 @@ function handle_comment_form(e) {
},10000);
});
- function commentSaveChanges(convId,isFinal = false) {
+ function commentSaveChanges(convId, isFinal) {
+
+ if(typeof isFinal === 'undefined')
+ isFinal = false;
+
if(auto_save_draft) {
tmp = $('#' + emptyCommentElm).val();
if(tmp) {
@@ -751,11 +766,6 @@ function updateConvItems(mode,data) {
mediaPlaying = false;
});
- /* autocomplete @nicknames */
- $(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl?f=&n=1");
- /* autocomplete bbcode */
- $(".comment-edit-form textarea").bbco_autocomplete('bbcode');
-
var bimgs = ((preloadImages) ? false : $(".wall-item-body img").not(function() { return this.complete; }));
var bimgcount = bimgs.length;