frio: fix - jot default was not removed in every case while inserting content
This commit is contained in:
parent
773517a734
commit
aec885b963
|
@ -191,5 +191,3 @@ function dropItem(url, object) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,10 +143,14 @@ function enableOnUser(){
|
||||||
$(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);
|
||||||
|
|
||||||
|
|
||||||
|
// When clicking on a forum in acl we should remove the profile jot textarea
|
||||||
|
// default value before inserting the forum mention
|
||||||
|
$("body").on('click', '#jot-modal .acl-list-item.forum', function(){
|
||||||
|
jotTextOpenUI(document.getElementById("profile-jot-text"));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
/* show images / file browser window
|
/* show images / file browser window
|
||||||
|
@ -376,8 +380,14 @@ function enableOnUser(){
|
||||||
|
|
||||||
function addeditortext(data) {
|
function addeditortext(data) {
|
||||||
if(plaintext == 'none') {
|
if(plaintext == 'none') {
|
||||||
|
// get the textfield
|
||||||
|
var textfield = document.getElementById("profile-jot-text");
|
||||||
|
// check if the textfield does have the default-value
|
||||||
|
jotTextOpenUI(textfield);
|
||||||
|
// save already existent content
|
||||||
var currentText = $("#profile-jot-text").val();
|
var currentText = $("#profile-jot-text").val();
|
||||||
$("#profile-jot-text").val(currentText + data);
|
//insert the data as new value
|
||||||
|
textfield.value = currentText + data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||||
|
@ -426,5 +436,6 @@ function enableOnUser(){
|
||||||
$(function() {Dialog.showJot();});
|
$(function() {Dialog.showJot();});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue