annotate core/modules/image/js/theme.js @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author |
Chris Cannam |
date |
Thu, 28 Feb 2019 13:21:36 +0000 |
parents |
4c8ae668cc8c |
children |
|
rev |
line source |
Chris@0
|
1 /**
|
Chris@0
|
2 * DO NOT EDIT THIS FILE.
|
Chris@0
|
3 * See the following change record for more information,
|
Chris@0
|
4 * https://www.drupal.org/node/2815083
|
Chris@0
|
5 * @preserve
|
Chris@0
|
6 **/
|
Chris@0
|
7
|
Chris@0
|
8 (function (Drupal) {
|
Chris@0
|
9 Drupal.theme.quickeditImageErrors = function (settings) {
|
Chris@0
|
10 return '<div class="quickedit-image-errors">' + settings.errors + '</div>';
|
Chris@0
|
11 };
|
Chris@0
|
12
|
Chris@0
|
13 Drupal.theme.quickeditImageDropzone = function (settings) {
|
Chris@0
|
14 return '<div class="quickedit-image-dropzone ' + settings.state + '">' + ' <i class="quickedit-image-icon"></i>' + (' <span class="quickedit-image-text">' + settings.text + '</span>') + '</div>';
|
Chris@0
|
15 };
|
Chris@0
|
16
|
Chris@0
|
17 Drupal.theme.quickeditImageToolbar = function (settings) {
|
Chris@0
|
18 var html = '<form class="quickedit-image-field-info">';
|
Chris@0
|
19 if (settings.alt_field) {
|
Chris@17
|
20 html += '<div><label for="alt" class="' + (settings.alt_field_required ? 'required' : '') + '">' + Drupal.t('Alternative text') + '</label>' + ('<input type="text" placeholder="' + settings.alt + '" value="' + settings.alt + '" name="alt" ' + (settings.alt_field_required ? 'required' : '') + '/>') + ' </div>';
|
Chris@0
|
21 }
|
Chris@0
|
22 if (settings.title_field) {
|
Chris@17
|
23 html += '<div><label for="title" class="' + (settings.title_field_required ? 'form-required' : '') + '">' + Drupal.t('Title') + '</label>' + ('<input type="text" placeholder="' + settings.title + '" value="' + settings.title + '" name="title" ' + (settings.title_field_required ? 'required' : '') + '/>') + '</div>';
|
Chris@0
|
24 }
|
Chris@0
|
25 html += '</form>';
|
Chris@0
|
26
|
Chris@0
|
27 return html;
|
Chris@0
|
28 };
|
Chris@0
|
29 })(Drupal); |