aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js35
-rwxr-xr-xview/tpl/comment_item.tpl2
-rwxr-xr-xview/tpl/jot.tpl2
-rwxr-xr-xview/tpl/js_strings.tpl1
4 files changed, 38 insertions, 2 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();
diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl
index cdcf35131..c9a3c451c 100755
--- a/view/tpl/comment_item.tpl
+++ b/view/tpl/comment_item.tpl
@@ -43,7 +43,7 @@
<button class="btn btn-default btn-xs" title="{{$edimg}}" onclick="insertbbcomment('{{$comment}}','img', {{$id}}); return false;">
<i class="icon-camera comment-icon"></i>
</button>
- <button class="btn btn-default btn-xs" title="{{$edurl}}" onclick="insertbbcomment('{{$comment}}','url', {{$id}}); return false;">
+ <button class="btn btn-default btn-xs" title="{{$edurl}}" onclick="insertCommentURL('{{$comment}}',{{$id}}); return false;">
<i class="icon-link comment-icon"></i>
</button>
<button class="btn btn-default btn-xs" title="{{$edvideo}}" onclick="insertbbcomment('{{$comment}}','video', {{$id}}); return false;">
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl
index 4fe48d4e5..d65f373dc 100755
--- a/view/tpl/jot.tpl
+++ b/view/tpl/jot.tpl
@@ -46,7 +46,7 @@
<button id="wall-file-upload" class="btn btn-default btn-sm" title="{{$attach}}" >
<i id="wall-file-upload-icon" class="icon-paper-clip jot-icons"></i>
</button>
- <button id="profile-link-wrapper" class="btn btn-default btn-sm" title="{{$weblink}}" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;">
+ <button id="profile-link-wrapper" class="btn btn-default btn-sm" title="{{$weblink}}" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink('#profile-jot-text'); return false;">
<i id="profile-link" class="icon-link jot-icons"></i>
</button>
<button id="profile-video-wrapper" class="btn btn-default btn-sm" title="{{$video}}" onclick="jotVideoURL();return false;">
diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl
index 4eb9ae844..c557b535d 100755
--- a/view/tpl/js_strings.tpl
+++ b/view/tpl/js_strings.tpl
@@ -20,6 +20,7 @@
'rating_val' : "{{$rating_val}}",
'rating_text' : "{{$rating_text}}",
'submit' : "{{$submit}}",
+ 'linkurl' : "{{$linkurl}}",
't01' : "{{$t01}}",
't02' : "{{$t02}}",