diff --git a/application/ui.htmleditorwidget.class.inc.php b/application/ui.htmleditorwidget.class.inc.php index 839f9245b..cd52fe199 100644 --- a/application/ui.htmleditorwidget.class.inc.php +++ b/application/ui.htmleditorwidget.class.inc.php @@ -80,7 +80,7 @@ class UIHTMLEditorWidget // Could also be bound to 'instanceReady.ckeditor' $oPage->add_ready_script("$('#$iId').bind('validate', function(evt, sFormId) { return ValidateCKEditField('$iId', '', {$this->m_sMandatory}, sFormId, '') } );\n"); - $oPage->add_ready_script("$('#$iId').bind('update', function() { BlockField('cke_$iId', $('#$iId').attr('disabled')); } );\n"); + $oPage->add_ready_script("$('#$iId').bind('update', function() { BlockField('cke_$iId', $('#$iId').attr('disabled')); $(this).data('ckeditorInstance').setReadOnly($(this).prop('disabled')); } );\n"); return $sHtmlValue; } diff --git a/css/light-grey.css b/css/light-grey.css index 53ae3c08f..f7e937ee6 100644 --- a/css/light-grey.css +++ b/css/light-grey.css @@ -206,6 +206,11 @@ legend.transparent { padding-left:14px; background: url(../images/mini-arrow-orange.gif) no-repeat left; } + +.ui-widget-content td a.cke_toolbox_collapser { + padding-left: 0; +} + p a:hover, td a:hover { text-decoration:underline; color:#EB8F00; diff --git a/js/forms-json-utils.js b/js/forms-json-utils.js index 3b7176888..82584c453 100644 --- a/js/forms-json-utils.js +++ b/js/forms-json-utils.js @@ -230,25 +230,32 @@ function ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue) var bValid; var sTextContent; - // Get the contents without the tags - var oFormattedContents = $("#cke_"+sFieldId+" iframe"); - if (oFormattedContents.length == 0) + if ($('#'+sFieldId).attr('disabled')) { - var oSourceContents = $("#cke_"+sFieldId+" textarea.cke_source"); - sTextContent = oSourceContents.val(); + bValid = true; // disabled fields are not checked } else { - sTextContent = oFormattedContents.contents().find("body").text(); - } - - if (bMandatory && (sTextContent == '')) - { - bValid = false; - } - else - { - bValid = true; + // Get the contents without the tags + var oFormattedContents = $("#cke_"+sFieldId+" iframe"); + if (oFormattedContents.length == 0) + { + var oSourceContents = $("#cke_"+sFieldId+" textarea.cke_source"); + sTextContent = oSourceContents.val(); + } + else + { + sTextContent = oFormattedContents.contents().find("body").text(); + } + + if (bMandatory && (sTextContent == '')) + { + bValid = false; + } + else + { + bValid = true; + } } ReportFieldValidationStatus(sFieldId, sFormId, bValid, '');