From 6f21b3dc349c71b06ad8617814d2afc3bfbf916d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 4 Jan 2018 11:31:48 +0100 Subject: fix nav update regressions - fixes issue #950 --- view/tpl/jot-header.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'view/tpl/jot-header.tpl') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 2f9dd9f15..ffaa4e208 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -340,7 +340,7 @@ var activeCommentText = ''; $.get('{{$baseurl}}/tagger/' + id + '?term=' + reply); if(timer) clearTimeout(timer); - timer = setTimeout(NavUpdate,3000); + timer = setTimeout(updateInit,3000); liking = 1; } } @@ -359,7 +359,7 @@ var activeCommentText = ''; if(reply && reply.length) { commentBusy = true; $('body').css('cursor', 'wait'); - $.get('{{$baseurl}}/filer/' + id + '?term=' + reply, NavUpdate); + $.get('{{$baseurl}}/filer/' + id + '?term=' + reply, updateInit); liking = 1; $('#item-filer-dialog').modal('hide'); } @@ -372,13 +372,13 @@ var activeCommentText = ''; function itemBookmark(id) { $.get('{{$baseurl}}/bookmarks?f=&item=' + id); if(timer) clearTimeout(timer); - timer = setTimeout(NavUpdate,1000); + timer = setTimeout(updateInit,1000); } function itemAddToCal(id) { $.get('{{$baseurl}}/events/add/' + id); if(timer) clearTimeout(timer); - timer = setTimeout(NavUpdate,1000); + timer = setTimeout(updateInit,1000); } function toggleVoting() { @@ -409,7 +409,7 @@ var activeCommentText = ''; if(id && icon) { $.get('{{$baseurl}}/react?f=&postid=' + id + '&emoji=' + icon); if(timer) clearTimeout(timer); - timer = setTimeout(NavUpdate,1000); + timer = setTimeout(updateInit,1000); } } -- cgit v1.2.3 From 9bf83a57bdbf4bc4d2ce53852c625506690f11f7 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 29 Jan 2018 18:43:20 -0800 Subject: don't show jot bb-edit buttons if a mimetype other than text/bbcode is selected (:todo: also disable bbcode autocomplete) --- view/tpl/jot-header.tpl | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'view/tpl/jot-header.tpl') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index ffaa4e208..0ffc8b349 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -110,10 +110,21 @@ var activeCommentID = 0; var activeCommentText = ''; $(document).ready(function() { + /* enable tinymce on focus and click */ $("#profile-jot-text").focus(enableOnUser); $("#profile-jot-text").click(enableOnUser); + $('#id_mimetype').on('load', jotSetMime); + $('#id_mimetype').on('change', jotSetMime); + + function jotSetMime() { + var mtype = $('#id_mimetype').val(); + if(mtype == 'text/bbcode') + $('#profile-jot-submit-left').show(); + else + $('#profile-jot-submit-left').hide(); + } $('#invisible-wall-file-upload').fileupload({ url: 'wall_attach/{{$nickname}}', -- cgit v1.2.3 From 04ec35d9cc39cbf62c8db2818574c1f6d56f2a20 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 25 Feb 2018 19:25:00 -0800 Subject: hubzilla issue #979 - alter image selection widget to accept/submit on choose (jot, wiki, cover_photo, profile_photo) --- view/tpl/jot-header.tpl | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'view/tpl/jot-header.tpl') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 0ffc8b349..c1dab52d5 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -459,13 +459,7 @@ var activeCommentText = ''; if (typeof($(image).parent()[0]) !== 'undefined') { var imageparent = document.getElementById($(image).parent()[0].id); $(imageparent).toggleClass('embed-photo-selected-photo'); - } - }); - $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); - $('#embed-photo-OKButton').click(function () { - $('.embed-photo-selected-photo').each(function (index) { - var href = $(this).attr('href'); + var href = $(imageparent).attr('href'); $.post("embedphotos/photolink", {href: href}, function(ddata) { if (ddata['status']) { @@ -476,12 +470,14 @@ var activeCommentText = ''; } return false; }, - 'json'); - }); - $('#embedPhotoModalBodyAlbumDialog').html(''); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('hide'); + 'json'); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + } }); + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); } else { window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); } -- cgit v1.2.3