diff options
author | zotlabs <mike@macgirvin.com> | 2019-01-16 16:52:21 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-01-16 16:52:21 -0800 |
commit | 7e29bd10b6a59bc9c1700cfb84dbefb6a8930153 (patch) | |
tree | ac49731f7ed9a5071bd4fcf76faaa2003204064c /view/js/main.js | |
parent | 20eea2184bc1336efb811c29e3fb49262ae02262 (diff) | |
parent | de8582ec07d125bf1c7f08cc3d695c33aaaf9d85 (diff) | |
download | volse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.tar.gz volse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.tar.bz2 volse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 22 |
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; |