summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Reeves2016-03-07 01:57:35 (GMT)
committerScott Reeves2016-03-07 01:57:35 (GMT)
commit0fa19e0a2c4457155a8c0e685846d4e19a55dc56 (patch)
tree04d076ef5113020160d8eff8e127b86f442a88a5
parent0bbd5d3f39befc144a335b8e6b637ae55e54fbcb (diff)
Issue #2626570 by Wim Leers, thpoul, DuaelFr: Drupal 8's custom Image and Link plugins do not include a HiDPI icon
-rw-r--r--core/modules/ckeditor/js/plugins/drupalimage/icons/drupalimage.png (renamed from core/modules/ckeditor/js/plugins/drupalimage/image.png)bin470 -> 470 bytes
-rw-r--r--core/modules/ckeditor/js/plugins/drupalimage/icons/hidpi/drupalimage.pngbin0 -> 1415 bytes
-rw-r--r--core/modules/ckeditor/js/plugins/drupalimage/plugin.js5
-rw-r--r--core/modules/ckeditor/js/plugins/drupallink/icons/drupallink.png (renamed from core/modules/ckeditor/js/plugins/drupallink/link.png)bin328 -> 328 bytes
-rw-r--r--core/modules/ckeditor/js/plugins/drupallink/icons/drupalunlink.png (renamed from core/modules/ckeditor/js/plugins/drupallink/unlink.png)bin312 -> 312 bytes
-rw-r--r--core/modules/ckeditor/js/plugins/drupallink/icons/hidpi/drupallink.pngbin0 -> 1231 bytes
-rw-r--r--core/modules/ckeditor/js/plugins/drupallink/icons/hidpi/drupalunlink.pngbin0 -> 1656 bytes
-rw-r--r--core/modules/ckeditor/js/plugins/drupallink/plugin.js9
-rw-r--r--core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php2
-rw-r--r--core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php4
-rw-r--r--core/modules/ckeditor/src/Tests/CKEditorToolbarButtonTest.php2
11 files changed, 12 insertions, 10 deletions
diff --git a/core/modules/ckeditor/js/plugins/drupalimage/image.png b/core/modules/ckeditor/js/plugins/drupalimage/icons/drupalimage.png
index 83cd553..83cd553 100644
--- a/core/modules/ckeditor/js/plugins/drupalimage/image.png
+++ b/core/modules/ckeditor/js/plugins/drupalimage/icons/drupalimage.png
Binary files differ
diff --git a/core/modules/ckeditor/js/plugins/drupalimage/icons/hidpi/drupalimage.png b/core/modules/ckeditor/js/plugins/drupalimage/icons/hidpi/drupalimage.png
new file mode 100644
index 0000000..63e115d
--- /dev/null
+++ b/core/modules/ckeditor/js/plugins/drupalimage/icons/hidpi/drupalimage.png
Binary files differ
diff --git a/core/modules/ckeditor/js/plugins/drupalimage/plugin.js b/core/modules/ckeditor/js/plugins/drupalimage/plugin.js
index ebcc33d..8206226 100644
--- a/core/modules/ckeditor/js/plugins/drupalimage/plugin.js
+++ b/core/modules/ckeditor/js/plugins/drupalimage/plugin.js
@@ -19,6 +19,8 @@
CKEDITOR.plugins.add('drupalimage', {
requires: 'image2',
+ icons: 'drupalimage',
+ hidpi: true,
beforeInit: function (editor) {
// Override the image2 widget definition to require and handle the
@@ -270,8 +272,7 @@
editor.ui.addButton('DrupalImage', {
label: Drupal.t('Image'),
// Note that we use the original image2 command!
- command: 'image',
- icon: this.path + '/image.png'
+ command: 'image'
});
}
},
diff --git a/core/modules/ckeditor/js/plugins/drupallink/link.png b/core/modules/ckeditor/js/plugins/drupallink/icons/drupallink.png
index 54e506a..54e506a 100644
--- a/core/modules/ckeditor/js/plugins/drupallink/link.png
+++ b/core/modules/ckeditor/js/plugins/drupallink/icons/drupallink.png
Binary files differ
diff --git a/core/modules/ckeditor/js/plugins/drupallink/unlink.png b/core/modules/ckeditor/js/plugins/drupallink/icons/drupalunlink.png
index 64056ad..64056ad 100644
--- a/core/modules/ckeditor/js/plugins/drupallink/unlink.png
+++ b/core/modules/ckeditor/js/plugins/drupallink/icons/drupalunlink.png
Binary files differ
diff --git a/core/modules/ckeditor/js/plugins/drupallink/icons/hidpi/drupallink.png b/core/modules/ckeditor/js/plugins/drupallink/icons/hidpi/drupallink.png
new file mode 100644
index 0000000..e9f60c5
--- /dev/null
+++ b/core/modules/ckeditor/js/plugins/drupallink/icons/hidpi/drupallink.png
Binary files differ
diff --git a/core/modules/ckeditor/js/plugins/drupallink/icons/hidpi/drupalunlink.png b/core/modules/ckeditor/js/plugins/drupallink/icons/hidpi/drupalunlink.png
new file mode 100644
index 0000000..a000713
--- /dev/null
+++ b/core/modules/ckeditor/js/plugins/drupallink/icons/hidpi/drupalunlink.png
Binary files differ
diff --git a/core/modules/ckeditor/js/plugins/drupallink/plugin.js b/core/modules/ckeditor/js/plugins/drupallink/plugin.js
index e3ddcaf..ff64f88 100644
--- a/core/modules/ckeditor/js/plugins/drupallink/plugin.js
+++ b/core/modules/ckeditor/js/plugins/drupallink/plugin.js
@@ -62,6 +62,9 @@
}
CKEDITOR.plugins.add('drupallink', {
+ icons: 'drupallink,drupalunlink',
+ hidpi: true,
+
init: function (editor) {
// Add the commands for link and unlink.
editor.addCommand('drupallink', {
@@ -195,13 +198,11 @@
if (editor.ui.addButton) {
editor.ui.addButton('DrupalLink', {
label: Drupal.t('Link'),
- command: 'drupallink',
- icon: this.path + '/link.png'
+ command: 'drupallink'
});
editor.ui.addButton('DrupalUnlink', {
label: Drupal.t('Unlink'),
- command: 'drupalunlink',
- icon: this.path + '/unlink.png'
+ command: 'drupalunlink'
});
}
diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php
index 080c017..d3c4140 100644
--- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php
+++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php
@@ -56,7 +56,7 @@ class DrupalImage extends CKEditorPluginBase implements CKEditorPluginConfigurab
return array(
'DrupalImage' => array(
'label' => t('Image'),
- 'image' => drupal_get_path('module', 'ckeditor') . '/js/plugins/drupalimage/image.png',
+ 'image' => drupal_get_path('module', 'ckeditor') . '/js/plugins/drupalimage/icons/drupalimage.png',
),
);
}
diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php
index dbfc07f..64cf4a3 100644
--- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php
+++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php
@@ -55,11 +55,11 @@ class DrupalLink extends CKEditorPluginBase {
return array(
'DrupalLink' => array(
'label' => t('Link'),
- 'image' => $path . '/link.png',
+ 'image' => $path . '/icons/drupallink.png',
),
'DrupalUnlink' => array(
'label' => t('Unlink'),
- 'image' => $path . '/unlink.png',
+ 'image' => $path . '/icons/drupalunlink.png',
),
);
}
diff --git a/core/modules/ckeditor/src/Tests/CKEditorToolbarButtonTest.php b/core/modules/ckeditor/src/Tests/CKEditorToolbarButtonTest.php
index 4b241d7..f03fcdd 100644
--- a/core/modules/ckeditor/src/Tests/CKEditorToolbarButtonTest.php
+++ b/core/modules/ckeditor/src/Tests/CKEditorToolbarButtonTest.php
@@ -74,7 +74,7 @@ class CKEditorToolbarButtonTest extends WebTestBase {
$json_encode = function($html) {
return trim(Json::encode($html), '"');
};
- $markup = $json_encode(file_url_transform_relative(file_create_url('core/modules/ckeditor/js/plugins/drupalimage/image.png')));
+ $markup = $json_encode(file_url_transform_relative(file_create_url('core/modules/ckeditor/js/plugins/drupalimage/icons/drupalimage.png')));
$this->assertRaw($markup);
}