[Rt-commit] rt branch, 4.4/preview-non-richtext, updated. rt-4.2.10-109-gac07be9
Alex Vandiver
alexmv at bestpractical.com
Mon Mar 30 19:26:43 EDT 2015
The branch, 4.4/preview-non-richtext has been updated
via ac07be9812bb503321b33db4fd39ccc65150d153 (commit)
from f99201427830653db137edc37dca615d43d51a5f (commit)
Summary of changes:
share/html/Ticket/Update.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit ac07be9812bb503321b33db4fd39ccc65150d153
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Mar 30 16:07:45 2015 -0400
Check the data structure; CKEditor can fail to instantiate
Instead of checking the conditions that trigger CKEditor to be enabled,
instead check against the data structure itself; CKEditor can decline to
enable itself if it does not recognize the User-Agent provided by the
browser, leaving the textarea with the "richtext" class, but no
CKEDITOR.instances set up.
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 1f03ba2..2174e38 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -214,7 +214,7 @@
<script type="text/javascript">
jQuery( function() {
var updateScrips = function() {
- if (jQuery('#UpdateContent').hasClass("richtext")) {
+ if (CKEDITOR.instances && CKEDITOR.instances['UpdateContent']) {
CKEDITOR.instances['UpdateContent'].updateElement();
}
var syncCheckboxes = function(ev) {
@@ -243,7 +243,7 @@ jQuery( function() {
);
};
updateScrips();
- if (jQuery('#UpdateContent').hasClass("richtext")) {
+ if (CKEDITOR.instances && CKEDITOR.instances['UpdateContent']) {
CKEDITOR.instances['UpdateContent'].on('blur', updateScrips );
}
jQuery("#ticket-update-metadata :input, #UpdateCc, #UpdateBcc").change( updateScrips );
-----------------------------------------------------------------------
More information about the rt-commit
mailing list