aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/jot-header.tpl
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-03-09 11:12:18 +0100
committerMario <mario@mariovavti.com>2018-03-09 11:12:18 +0100
commit4baf5eab16d809977a44e7911ddcab0ff8383897 (patch)
tree393f618c4cfc20f53264ecd8a26a08de0823d35d /view/tpl/jot-header.tpl
parent577da0eb9eb1f90a4cf7a70cfb3582cfb49007ac (diff)
parent7361af85b5488fc8bd1744389a3a332dc74276b0 (diff)
downloadvolse-hubzilla-3.2.tar.gz
volse-hubzilla-3.2.tar.bz2
volse-hubzilla-3.2.zip
Merge branch '3.2RC'3.2
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-xview/tpl/jot-header.tpl31
1 files changed, 19 insertions, 12 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index ffaa4e208..c1dab52d5 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}}',
@@ -448,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']) {
@@ -465,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']);
}