`;
- };
-
- /**
- * Theme function for the dropzone element of the Image module's in-place
- * editor.
- *
- * @param {object} settings
- * Settings object used to construct the markup.
- * @param {string} settings.state
- * State of the upload.
- * @param {string} settings.text
- * Text to display inline with the dropzone element.
- *
- * @return {string}
- * The corresponding HTML.
- */
- Drupal.theme.quickeditImageDropzone = function (settings) {
- return (
- `
` +
- ' ' +
- ` ${settings.text}` +
- '
'
- );
- };
-
- /**
- * Theme function for the toolbar of the Image module's in-place editor.
- *
- * @param {object} settings
- * Settings object used to construct the markup.
- * @param {bool} settings.alt_field
- * Whether or not the "Alt" field is enabled for this field.
- * @param {bool} settings.alt_field_required
- * Whether or not the "Alt" field is required for this field.
- * @param {string} settings.alt
- * The current value for the "Alt" field.
- * @param {bool} settings.title_field
- * Whether or not the "Title" field is enabled for this field.
- * @param {bool} settings.title_field_required
- * Whether or not the "Title" field is required for this field.
- * @param {string} settings.title
- * The current value for the "Title" field.
- *
- * @return {string}
- * The corresponding HTML.
- */
- Drupal.theme.quickeditImageToolbar = function (settings) {
- let html = '';
-
- return html;
- };
-})(Drupal);
diff --git a/core/modules/image/js/theme.js b/core/modules/image/js/theme.js
deleted file mode 100644
index 6ae707b0ae5..00000000000
--- a/core/modules/image/js/theme.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
-* DO NOT EDIT THIS FILE.
-* See the following change record for more information,
-* https://www.drupal.org/node/2815083
-* @preserve
-**/
-
-(function (Drupal) {
- Drupal.theme.quickeditImageErrors = function (settings) {
- return `
';
- };
-
- Drupal.theme.quickeditImageToolbar = function (settings) {
- let html = '';
- return html;
- };
-})(Drupal);
\ No newline at end of file
diff --git a/core/modules/image/css/editors/image.css b/core/modules/quickedit/css/editors/image.css
similarity index 93%
rename from core/modules/image/css/editors/image.css
rename to core/modules/quickedit/css/editors/image.css
index f9733d28348..b6218c93f95 100644
--- a/core/modules/image/css/editors/image.css
+++ b/core/modules/quickedit/css/editors/image.css
@@ -1,6 +1,6 @@
/**
* @file
- * Functional styles for the Image module's in-place editor.
+ * Functional styles for the Quick Edit image in-place editor.
*/
/**
diff --git a/core/themes/stable9/css/image/editors/image.theme.css b/core/modules/quickedit/css/editors/image.theme.css
similarity index 90%
rename from core/themes/stable9/css/image/editors/image.theme.css
rename to core/modules/quickedit/css/editors/image.theme.css
index 25a21ba446e..8514266ede4 100644
--- a/core/themes/stable9/css/image/editors/image.theme.css
+++ b/core/modules/quickedit/css/editors/image.theme.css
@@ -1,6 +1,6 @@
/**
* @file
- * Theme styles for the Image module's in-place editor.
+ * Theme styles for the Quick Edit image in-place editor.
*/
.quickedit-image-dropzone {
@@ -22,11 +22,11 @@
}
.quickedit-image-dropzone.upload .quickedit-image-icon {
- background-image: url("../../../../../modules/image/images/upload.svg");
+ background-image: url("../../../../../modules/quickedit/images/upload.svg");
}
.quickedit-image-dropzone.error .quickedit-image-icon {
- background-image: url("../../../../../modules/image/images/error.svg");
+ background-image: url("../../../../../modules/quickedit/images/error.svg");
}
.quickedit-image-dropzone.loading .quickedit-image-icon {
diff --git a/core/modules/quickedit/images/error.svg b/core/modules/quickedit/images/error.svg
new file mode 100644
index 00000000000..1932ea402c5
--- /dev/null
+++ b/core/modules/quickedit/images/error.svg
@@ -0,0 +1,4 @@
+
diff --git a/core/modules/quickedit/images/upload.svg b/core/modules/quickedit/images/upload.svg
new file mode 100644
index 00000000000..168bc43e6af
--- /dev/null
+++ b/core/modules/quickedit/images/upload.svg
@@ -0,0 +1,4 @@
+
diff --git a/core/modules/image/js/editors/image.es6.js b/core/modules/quickedit/js/editors/image.es6.js
similarity index 100%
rename from core/modules/image/js/editors/image.es6.js
rename to core/modules/quickedit/js/editors/image.es6.js
diff --git a/core/modules/image/js/editors/image.js b/core/modules/quickedit/js/editors/image.js
similarity index 100%
rename from core/modules/image/js/editors/image.js
rename to core/modules/quickedit/js/editors/image.js
diff --git a/core/modules/quickedit/js/theme.es6.js b/core/modules/quickedit/js/theme.es6.js
index dd3eb3ac361..fd0bba7a0fd 100644
--- a/core/modules/quickedit/js/theme.es6.js
+++ b/core/modules/quickedit/js/theme.es6.js
@@ -182,4 +182,89 @@
html += '';
return html;
};
+
+ /**
+ * Theme function for validation errors of the Image in-place editor.
+ *
+ * @param {object} settings
+ * Settings object used to construct the markup.
+ * @param {string} settings.errors
+ * Already escaped HTML representing error messages.
+ *
+ * @return {string}
+ * The corresponding HTML.
+ */
+ Drupal.theme.quickeditImageErrors = function (settings) {
+ return `
${settings.errors}
`;
+ };
+
+ /**
+ * Theme function for the dropzone element of the in-place editor.
+ *
+ * @param {object} settings
+ * Settings object used to construct the markup.
+ * @param {string} settings.state
+ * State of the upload.
+ * @param {string} settings.text
+ * Text to display inline with the dropzone element.
+ *
+ * @return {string}
+ * The corresponding HTML.
+ */
+ Drupal.theme.quickeditImageDropzone = function (settings) {
+ return (
+ `
` +
+ ' ' +
+ ` ${settings.text}` +
+ '
'
+ );
+ };
+
+ /**
+ * Theme function for the toolbar of the Image module's in-place editor.
+ *
+ * @param {object} settings
+ * Settings object used to construct the markup.
+ * @param {bool} settings.alt_field
+ * Whether or not the "Alt" field is enabled for this field.
+ * @param {bool} settings.alt_field_required
+ * Whether or not the "Alt" field is required for this field.
+ * @param {string} settings.alt
+ * The current value for the "Alt" field.
+ * @param {bool} settings.title_field
+ * Whether or not the "Title" field is enabled for this field.
+ * @param {bool} settings.title_field_required
+ * Whether or not the "Title" field is required for this field.
+ * @param {string} settings.title
+ * The current value for the "Title" field.
+ *
+ * @return {string}
+ * The corresponding HTML.
+ */
+ Drupal.theme.quickeditImageToolbar = function (settings) {
+ let html = '';
+
+ return html;
+ };
})(jQuery, Drupal);
diff --git a/core/modules/quickedit/js/theme.js b/core/modules/quickedit/js/theme.js
index 0545c680f82..81e43d961ff 100644
--- a/core/modules/quickedit/js/theme.js
+++ b/core/modules/quickedit/js/theme.js
@@ -87,4 +87,27 @@
html += '';
return html;
};
+
+ Drupal.theme.quickeditImageErrors = function (settings) {
+ return `