mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Ensure the form inside htmleditorfield-dialog element is redrawn when the form is lazy loaded by AJAX.
This commit is contained in:
parent
ddd5c402b0
commit
fdebedd103
@ -314,7 +314,8 @@ class HtmlEditorField_Toolbar extends RequestHandler {
|
|||||||
'anchor' => _t('HtmlEditorField.LINKANCHOR', 'Anchor on this page'),
|
'anchor' => _t('HtmlEditorField.LINKANCHOR', 'Anchor on this page'),
|
||||||
'email' => _t('HtmlEditorField.LINKEMAIL', 'Email address'),
|
'email' => _t('HtmlEditorField.LINKEMAIL', 'Email address'),
|
||||||
'file' => _t('HtmlEditorField.LINKFILE', 'Download a file'),
|
'file' => _t('HtmlEditorField.LINKFILE', 'Download a file'),
|
||||||
)
|
),
|
||||||
|
'internal'
|
||||||
),
|
),
|
||||||
new LiteralField('Step2',
|
new LiteralField('Step2',
|
||||||
'<div class="step2">' . sprintf($numericLabelTmpl, '2', _t('HtmlEditorField.DETAILS', 'Details')) . '</div>'
|
'<div class="step2">' . sprintf($numericLabelTmpl, '2', _t('HtmlEditorField.DETAILS', 'Details')) . '</div>'
|
||||||
|
@ -295,6 +295,7 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
|
|||||||
url: url,
|
url: url,
|
||||||
success: function(html) {
|
success: function(html) {
|
||||||
dialog.html(html);
|
dialog.html(html);
|
||||||
|
dialog.getForm().redraw();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -330,7 +331,7 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
|
|||||||
},
|
},
|
||||||
ondialogopen: function(e) {
|
ondialogopen: function(e) {
|
||||||
this.getForm().updateFromEditor();
|
this.getForm().updateFromEditor();
|
||||||
this.redraw();
|
this.getForm().redraw();
|
||||||
},
|
},
|
||||||
ondialogclose: function(e) {
|
ondialogclose: function(e) {
|
||||||
this.getForm().resetFields();
|
this.getForm().resetFields();
|
||||||
|
Loading…
Reference in New Issue
Block a user