mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Support of formatted case log edition (with inline images) in the legacy portal.
SVN:trunk[4225]
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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>');
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user