don't show jot bb-edit buttons if a mimetype other than text/bbcode is selected (:todo: also disable bbcode autocomplete)
This commit is contained in:
parent
668f56807a
commit
9bf83a57bd
@ -110,10 +110,21 @@ var activeCommentID = 0;
|
|||||||
var activeCommentText = '';
|
var activeCommentText = '';
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
/* enable tinymce on focus and click */
|
/* enable tinymce on focus and click */
|
||||||
$("#profile-jot-text").focus(enableOnUser);
|
$("#profile-jot-text").focus(enableOnUser);
|
||||||
$("#profile-jot-text").click(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({
|
$('#invisible-wall-file-upload').fileupload({
|
||||||
url: 'wall_attach/{{$nickname}}',
|
url: 'wall_attach/{{$nickname}}',
|
||||||
|
Reference in New Issue
Block a user