aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-09-10 10:41:53 +0200
committerMax Kostikov <max@kostikov.co>2019-09-10 10:41:53 +0200
commitcc45129e9fb76bd29e4b0e9e5b053b870b32475e (patch)
treeeb6eba2df95b0c31ad3ab79cfc2b1ef79021705e
parentbffc9d5aba78359c009581c2398c2df6a94e85e1 (diff)
parentfd30be7644cc35d5396bcaf7bb376fd26e476ba5 (diff)
downloadvolse-hubzilla-cc45129e9fb76bd29e4b0e9e5b053b870b32475e.tar.gz
volse-hubzilla-cc45129e9fb76bd29e4b0e9e5b053b870b32475e.tar.bz2
volse-hubzilla-cc45129e9fb76bd29e4b0e9e5b053b870b32475e.zip
Merge branch 'dev' into 'dev'
Add selected text quote on comment reply See merge request hubzilla/core!1724
-rw-r--r--view/js/main.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 2eea7543d..bc1c48cf1 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1146,8 +1146,8 @@ function doreply(parent, ident, owner, hint) {
var i = form.find('button[type=submit]');
var btn = i.html().replace(/<[^>]*>/g, '').trim();
i.html('<i class="fa fa-reply" ></i> ' + btn);
- i.prop('title', hint);
- form.find('textarea').val("@{" + owner + "} ");
+ var sel = 'wall-item-body-' + ident.toString();
+ form.find('textarea').val("@{" + owner + "}" + (($(window.getSelection().anchorNode).closest("#" + sel).attr("id") != sel) ? " " : "\n[quote]" + window.getSelection().toString() + "[/quote]\n"));
$('#comment-edit-text-' + parent.toString()).focus();
}