Support of formatted case log edition (with inline images) in the legacy portal.

SVN:trunk[4225]
This commit is contained in:
Denis Flaven
2016-06-17 09:41:59 +00:00
parent 636cd646aa
commit feebe3f9a9
3 changed files with 20 additions and 2 deletions

View File

@@ -170,7 +170,7 @@ try
});
//$('.resizable').resizable(); // Make resizable everything that claims to be resizable !
$('.caselog_header').click( function () { $(this).toggleClass('open').next('.caselog_entry').toggle(); });
$('.caselog_header').click( function () { $(this).toggleClass('open').next('.caselog_entry_html').toggle(); });
$(document).ajaxSend(function(event, jqxhr, options) {
jqxhr.setRequestHeader('X-Combodo-Ajax', 'true');

View File

@@ -1122,6 +1122,20 @@ EOF
$oP->add('<h1>'.$aEditFields[$sLogAttCode]['label'].'</h1>');
$oP->add($aEditFields[$sLogAttCode]['value']);
$oP->add('</div>');
// Replace the text area with CKEditor
// To change the default settings of the editor,
// a) edit the file /js/ckeditor/config.js
// b) or override some of the configuration settings, using the second parameter of ckeditor()
$aConfig = array();
$sLanguage = strtolower(trim(UserRights::GetUserLanguage()));
$aConfig['font_style'] = $sLanguage;
$aConfig['language'] = $sLanguage;
$aConfig['contentsLanguage'] = $sLanguage;
$aConfig['extraPlugins'] = 'disabler';
$aConfig['placeholder'] = Dict::S('UI:CaseLogTypeYourTextHere');
$sConfigJS = json_encode($aConfig);
$oP->add_ready_script("$('#input_$sLogAttCode').ckeditor(function() { /* callback code */ }, $sConfigJS);"); // Transform $iId into a CKEdit
}
else
{
@@ -1134,6 +1148,7 @@ EOF
$oP->add('</table>');
$oP->add('</div>');
$oP->add_ready_script(InlineImage::EnableCKEditorImageUpload($oObj, 'zzzzz'));
$oP->WizardFormEnd();
$oP->add('</div>');
}

View File

@@ -232,3 +232,6 @@ div.edit_item span div table tbody tr td textarea{
div#ticket_shortcuts form {
display: inline-block;
}
.cke_contents {
border: 1px #C8C9CA solid !important;
}