mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 18:59:56 +09:00
General cleanup of DOM traversal code in editor & uploader (should also fix #2303)
This commit is contained in:
parent
7dd3dd3838
commit
b9ea0e65b0
6 changed files with 49 additions and 48 deletions
|
|
@ -134,8 +134,7 @@
|
|||
versionCheck: false
|
||||
},
|
||||
loadXeComponent: true,
|
||||
enableToolbar: true,
|
||||
content_field: jQuery('[name={$editor_content_key_name}]')
|
||||
enableToolbar: true
|
||||
};
|
||||
|
||||
// Add style-sheet for the WYSIWYG
|
||||
|
|
@ -219,15 +218,15 @@
|
|||
var ckeApp = $('#ckeditor_instance_{$editor_sequence}').XeCkEditor(settings);
|
||||
|
||||
// Add use_editor and use_html fields to parent form.
|
||||
var parentform = $('#ckeditor_instance_{$editor_sequence}').parents('form');
|
||||
var parentform = $('#ckeditor_instance_{$editor_sequence}').closest('form');
|
||||
var use_editor = parentform.find("input[name='use_editor']");
|
||||
var use_html = parentform.find("input[name='use_html']");
|
||||
if (use_editor.size()) {
|
||||
if (use_editor.length) {
|
||||
use_editor.val("Y");
|
||||
} else {
|
||||
parentform.append('<input type="hidden" name="use_editor" value="Y" />');
|
||||
}
|
||||
if (use_html.size()) {
|
||||
if (use_html.length) {
|
||||
use_html.val("Y");
|
||||
} else {
|
||||
parentform.append('<input type="hidden" name="use_html" value="Y" />');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue