diff options
author | zotlabs <mike@macgirvin.com> | 2018-01-29 18:43:20 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-01-29 18:43:20 -0800 |
commit | 9bf83a57bdbf4bc4d2ce53852c625506690f11f7 (patch) | |
tree | 5db9cdf23f50bc6cedd2d54fbe13a0cb4341f33a /view/tpl/jot-header.tpl | |
parent | 668f56807ad8bde45a2ed679eb3c97c632b6fb2f (diff) | |
download | volse-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-x | view/tpl/jot-header.tpl | 11 |
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}}', |