Mercurial > hg > isophonics-drupal-site
diff core/modules/image/js/theme.js @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 129ea1e6d783 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/image/js/theme.js Wed Nov 29 16:09:58 2017 +0000 @@ -0,0 +1,29 @@ +/** +* 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 '<div class="quickedit-image-errors">' + settings.errors + '</div>'; + }; + + Drupal.theme.quickeditImageDropzone = function (settings) { + return '<div class="quickedit-image-dropzone ' + settings.state + '">' + ' <i class="quickedit-image-icon"></i>' + (' <span class="quickedit-image-text">' + settings.text + '</span>') + '</div>'; + }; + + Drupal.theme.quickeditImageToolbar = function (settings) { + var html = '<form class="quickedit-image-field-info">'; + if (settings.alt_field) { + 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>'; + } + if (settings.title_field) { + 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>'; + } + html += '</form>'; + + return html; + }; +})(Drupal); \ No newline at end of file