aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/jot-header.tpl
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-29 18:43:20 -0800
committerzotlabs <mike@macgirvin.com>2018-01-29 18:43:20 -0800
commit9bf83a57bdbf4bc4d2ce53852c625506690f11f7 (patch)
tree5db9cdf23f50bc6cedd2d54fbe13a0cb4341f33a /view/tpl/jot-header.tpl
parent668f56807ad8bde45a2ed679eb3c97c632b6fb2f (diff)
downloadvolse-hubzilla-9bf83a57bdbf4bc4d2ce53852c625506690f11f7.tar.gz
volse-hubzilla-9bf83a57bdbf4bc4d2ce53852c625506690f11f7.tar.bz2
volse-hubzilla-9bf83a57bdbf4bc4d2ce53852c625506690f11f7.zip
don't show jot bb-edit buttons if a mimetype other than text/bbcode is selected (:todo: also disable bbcode autocomplete)
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-xview/tpl/jot-header.tpl11
1 files changed, 11 insertions, 0 deletions
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}}',