Fix "add-row" link in admin inline for initial CKEditor when it's placed in new row admin inline.

This commit is contained in:
Arcady Usov 2014-04-13 23:53:47 +06:00
parent d3d0d102ca
commit f3b5188a1a
1 changed files with 12 additions and 0 deletions

View File

@ -51,6 +51,18 @@ $(document).ready(function () {
// initialize ckeditor only if the container exists and is ready
initCMSCKEditor();
// initialize ckeditor in admin inline for "add-row" link
if ($('.add-row a').length > 0) {
$('.add-row a').each(function() {
if ($(this).data('isInitCMSCKEditor') != 'yes') {
$(this).click(function() {
initCMSCKEditor();
});
$(this).data('isInitCMSCKEditor', 'yes');
}
})
}
});
})(CMS.$);
</script>