aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/jot-header.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-xview/tpl/jot-header.tpl28
1 files changed, 18 insertions, 10 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 2670ba9e7..7b1f4ee05 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -198,16 +198,24 @@ var activeCommentText = '';
})
}
-
function jotShare(id,post_type) {
+ $('#like-rotator-' + id).show();
+ $.get('{{$baseurl}}/share/' + id, function(data) {
+ $('#like-rotator-' + id).hide();
+ updateInit();
+ });
+ }
+
+ function jotEmbed(id,post_type) {
if(post_type == 6) {
window.location.href = 'rpost?f=&post_id='+id;
}
else {
+
if ($('#jot-popup').length != 0) $('#jot-popup').show();
$('#like-rotator-' + id).show();
- $.get('{{$baseurl}}/share/' + id, function(data) {
+ $.get('{{$baseurl}}/embed/' + id, function(data) {
if (!editor) $("#profile-jot-text").val("");
initEditor(function(){
addeditortext(data);
@@ -219,7 +227,7 @@ var activeCommentText = '';
}
function linkdropper(event) {
- var linkFound = event.dataTransfer.types.contains("text/uri-list");
+ var linkFound = ((event.dataTransfer.types.indexOf("text/uri-list") > -1) ? true : false);
if(linkFound) {
event.preventDefault();
var editwin = '#' + event.target.id;
@@ -256,7 +264,7 @@ var activeCommentText = '';
commentwin = ((editwin.indexOf('comment') >= 0) ? true : false);
if(commentwin) {
var commentid = editwin.substring(editwin.lastIndexOf('-') + 1);
- commentOpen(document.getElementById(event.target.id),commentid);
+ $("#comment-edit-text-" + commentid).addClass("expanded");
}
}
@@ -346,7 +354,7 @@ var activeCommentText = '';
}
function itemAddToCal(id) {
- $.get('{{$baseurl}}/events/add/' + id);
+ $.get('{{$baseurl}}/channel_calendar/add/' + id);
if(timer) clearTimeout(timer);
timer = setTimeout(updateInit,1000);
}
@@ -419,7 +427,9 @@ var activeCommentText = '';
var imageparent = document.getElementById($(image).parent()[0].id);
$(imageparent).toggleClass('embed-photo-selected-photo');
var href = $(imageparent).attr('href');
- $.post("embedphotos/photolink", {href: href},
+ $.post(
+ "embedphotos/photolink",
+ {href: href},
function(ddata) {
if (ddata['status']) {
addeditortext(ddata['photolink']);
@@ -429,10 +439,8 @@ var activeCommentText = '';
}
return false;
},
- 'json');
- $('#embedPhotoModalBodyAlbumDialog').html('');
- $('#embedPhotoModalBodyAlbumDialog').off('click');
- $('#embedPhotoModal').modal('hide');
+ 'json'
+ );
}
});
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');