diff options
author | friendica <info@friendica.com> | 2015-03-04 20:00:54 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-03-04 20:00:54 -0800 |
commit | 2ea162136e8ab68ca0ad854a4225471ffd35a5a8 (patch) | |
tree | 56627ba6eecd9ebaccb91907083d2e099e17eb32 /view/js/main.js | |
parent | 76eb0a7e5606d61153b199094482c4c55685a035 (diff) | |
download | volse-hubzilla-2ea162136e8ab68ca0ad854a4225471ffd35a5a8.tar.gz volse-hubzilla-2ea162136e8ab68ca0ad854a4225471ffd35a5a8.tar.bz2 volse-hubzilla-2ea162136e8ab68ca0ad854a4225471ffd35a5a8.zip |
the link icon on comments now calls the link parsing tool (just like the main editor window). Eventually the link specific icons (image, link, audio, video) will all be handled by inserting a link using the link icon (here and in the main editor window) and the separate buttons will go away. We also need to tie this to oembed so that there's one place to insert a link - no matter what kind of link it is, and we'll try to find the best way to render that as content. Similarly upload will upload content, no matter what kind of content; and we'll likewise try and figure out the best way to present whatever content was uploaded (img, file, audio, video, whatever).
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js index 8ee676f0d..c659d25cf 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -118,6 +118,34 @@ return true; } + function insertCommentURL(comment,id) { + + reply = prompt(aStr['linkurl']); + if(reply && reply.length) { + reply = bin2hex(reply); + $('body').css('cursor', 'wait'); + $.get('parse_url?binurl=' + reply, function(data) { + var tmpStr = $("#comment-edit-text-" + id).val(); + if(tmpStr == comment) { + tmpStr = ""; + $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); + $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); + openMenu("comment-tools-" + id); + $("#comment-edit-text-" + id).val(tmpStr); + } + + textarea = document.getElementById("comment-edit-text-" +id); + textarea.value = textarea.value + data; + $('body').css('cursor', 'auto'); + + }); + } + return true; + } + + + + function viewsrc(id) { $.colorbox({href: 'viewsrc/' + id, maxWidth: '80%', maxHeight: '80%' }); } @@ -1230,6 +1258,13 @@ function chanviewFull() { addeditortext(data); } + + function loadText(textRegion,data) { + var currentText = $(textRegion).val(); + $(textRegion).val(currentText + data); + } + + function addeditortext(data) { if(plaintext == 'none') { var currentText = $("#profile-jot-text").val(); |