fix "resend" function when editor is disabled
This commit is contained in:
parent
096ecba883
commit
5c9eb19767
1 changed files with 77 additions and 69 deletions
|
@ -4,7 +4,8 @@
|
|||
var editor=false;
|
||||
var textlen = 0;
|
||||
|
||||
function initEditor(){
|
||||
function initEditor(cb){
|
||||
if (editor==false){
|
||||
$("#profile-jot-text-loading").show();
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
|
@ -61,18 +62,20 @@ function initEditor(){
|
|||
ed.pasteAsPlainText = true;
|
||||
$("#profile-jot-text-loading").hide();
|
||||
$("#profile-jot-submit-wrapper").show();
|
||||
if (typeof cb!="undefined") cb();
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
editor = true;
|
||||
|
||||
// setup acl popup
|
||||
$("#profile-jot-acl-wrapper").hide();
|
||||
$("a#jot-perms-icon").fancybox({
|
||||
'transitionIn' : 'none',
|
||||
'transitionOut' : 'none'
|
||||
});
|
||||
} else {
|
||||
if (typeof cb!="undefined") cb();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -181,13 +184,18 @@ function initEditor(){
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function jotShare(id) {
|
||||
$('#like-rotator-' + id).show();
|
||||
|
||||
$.get('share/' + id, function(data) {
|
||||
initEditor(function(){
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||
$('#like-rotator-' + id).hide();
|
||||
$(window).scrollTop(0);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function linkdropper(event) {
|
||||
|
|
Loading…
Reference in a new issue