mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Rollback modifications from r5192 as it introduced a regression.
JS escaping and previous value comparison strategies are to be define before going further with this matter. SVN:trunk[5193]
This commit is contained in:
@@ -97,7 +97,7 @@ class UIHTMLEditorWidget
|
||||
// The most relevant solution would be to implement a plugin to CKEdit, and handle the internal events like: setData, insertHtml, insertElement, loadSnapshot, key, afterUndo, afterRedo
|
||||
|
||||
// Could also be bound to 'instanceReady.ckeditor'
|
||||
$oPage->add_ready_script("$('#$iId').bind('validate', function(evt, sFormId) { return ValidateCKEditField('$iId', '', {$this->m_sMandatory}, sFormId, '', '$sValue') } );\n");
|
||||
$oPage->add_ready_script("$('#$iId').bind('validate', function(evt, sFormId) { return ValidateCKEditField('$iId', '', {$this->m_sMandatory}, sFormId, '') } );\n");
|
||||
$oPage->add_ready_script(
|
||||
<<<EOF
|
||||
$('#$iId').bind('update', function(evt){
|
||||
|
||||
@@ -281,7 +281,7 @@ function ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue,
|
||||
|
||||
// Get the original value without the tags
|
||||
var oFormattedOriginalContents = (originalValue !== undefined) ? $('<div></div>').html(originalValue) : undefined;
|
||||
var sTextOriginalContents = (oFormattedOriginalContents !== null) ? oFormattedOriginalContents.text() : undefined;
|
||||
var sTextOriginalContents = (oFormattedOriginalContents !== undefined) ? oFormattedOriginalContents.text() : undefined;
|
||||
|
||||
if (bMandatory && (sTextContent == nullValue))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user