core/modules/ckeditor/js/plugins/drupalimage/plugin.js | 2 +- core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.js | 4 ++-- core/modules/ckeditor/js/plugins/drupalimagecaption/theme.js | 4 ---- core/modules/filter/css/filter.caption.css | 1 + core/themes/bartik/css/ckeditor-iframe.css | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/core/modules/ckeditor/js/plugins/drupalimage/plugin.js b/core/modules/ckeditor/js/plugins/drupalimage/plugin.js index 7721ff2..abfb867 100644 --- a/core/modules/ckeditor/js/plugins/drupalimage/plugin.js +++ b/core/modules/ckeditor/js/plugins/drupalimage/plugin.js @@ -89,7 +89,7 @@ CKEDITOR.plugins.add('drupalimage', { existingValues.height = imageDOMElement ? imageDOMElement.height : ''; // Populate all other attributes by their specified attribute values. var attribute = null; - for (var key = 0; key < imageDOMElement.attributes.length; key++) { + for (var key = 0, length = imageDOMElement.attributes.length; key < length; key++) { attribute = imageDOMElement.attributes.item(key); existingValues[attribute.nodeName.toLowerCase()] = attribute.nodeValue; } diff --git a/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.js b/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.js index 6a4b320..944bc74 100644 --- a/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.js +++ b/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.js @@ -189,7 +189,7 @@ CKEDITOR.plugins.add('drupalimagecaption', { function setupAlignCommand (value) { var command = editor.getCommand('justify' + value); if (command) { - if (value in { right:1,left:1,center:1 }) { + if (value in { right: 1, left: 1, center: 1 }) { command.on('exec', function (event) { var widget = getSelectedWidget(editor); if (widget && widget.name === 'drupalimagecaption') { @@ -201,7 +201,7 @@ CKEDITOR.plugins.add('drupalimagecaption', { command.on('refresh', function (event) { var widget = getSelectedWidget(editor), - allowed = { left:1,center:1,right:1 }, + allowed = { left: 1, center: 1, right: 1 }, align; if (widget) { diff --git a/core/modules/ckeditor/js/plugins/drupalimagecaption/theme.js b/core/modules/ckeditor/js/plugins/drupalimagecaption/theme.js index 99384e9..d35ddb5 100644 --- a/core/modules/ckeditor/js/plugins/drupalimagecaption/theme.js +++ b/core/modules/ckeditor/js/plugins/drupalimagecaption/theme.js @@ -80,10 +80,6 @@ CKEDITOR.on('instanceCreated', function (event) { // Reinitialize this widget with the current data. editor.widgets.initOn(figure, 'drupalimagecaption', this.data); } - else { - // Nothing remains to be done, this is already taken care of in - // originalDataFn(). - } } }; }); diff --git a/core/modules/filter/css/filter.caption.css b/core/modules/filter/css/filter.caption.css index 3c62556..be9fe20 100644 --- a/core/modules/filter/css/filter.caption.css +++ b/core/modules/filter/css/filter.caption.css @@ -8,6 +8,7 @@ */ .caption { display: table; + margin: 0; } .caption > * { display: block; diff --git a/core/themes/bartik/css/ckeditor-iframe.css b/core/themes/bartik/css/ckeditor-iframe.css index f6c6495..892515b 100644 --- a/core/themes/bartik/css/ckeditor-iframe.css +++ b/core/themes/bartik/css/ckeditor-iframe.css @@ -1,6 +1,6 @@ /** - * @todo Figure out if we want to duplicate what's in Bartik's style.css here, - * or if Bartik's css should @import this file. Probably the latter. + * @file + * Approximate Bartik's style in CKEditor instances on the Drupal back-end. */ /* -------------- Captions -------------- */