/** * @file * Provides overridable theme functions for all of Quick Edit's client-side HTML. */ (function ($, Drupal) { "use strict"; /** * Theme function for a "backstage" for the Quick Edit module. * * @param Object settings * An object with the following keys: * - String id: the id to apply to the backstage. * @return String * The corresponding HTML. */ Drupal.theme.quickeditBackstage = function (settings) { var html = ''; html += '
'; return html; }; /** * Theme function for a toolbar container of the Quick Edit module. * * @param Object settings * An object with the following keys: * - String id: the id to apply to the toolbar container. * @return String * The corresponding HTML. */ Drupal.theme.quickeditEntityToolbar = function (settings) { var html = ''; html += ' '; return html; }; /** * Theme function for a toolbar container of the Quick Edit module. * * @param Object settings * An object with the following keys: * - String entityLabel: The title of the active entity. * - String fieldLabel: The label of the highlighted or active field. * @return String * The corresponding HTML. */ Drupal.theme.quickeditEntityToolbarLabel = function (settings) { return '' + settings.fieldLabel + '' + settings.entityLabel; }; /** * Element that defines a containing box of the placement of the entity toolbar. * * @return String * The corresponding HTML. */ Drupal.theme.quickeditEntityToolbarFence = function () { return ''; }; /** * Theme function for a toolbar container of the Quick Edit module. * * @param settings * An object with the following keys: * - id: the id to apply to the toolbar container. * @return * The corresponding HTML. */ Drupal.theme.quickeditFieldToolbar = function (settings) { return ''; }; /** * Theme function for a toolbar toolgroup of the Quick Edit module. * * @param Object settings * An object with the following keys: * - String id: (optional) the id of the toolgroup * - String classes: the class of the toolgroup. * - Array buttons: @see Drupal.theme.quickeditButtons(). * @return String * The corresponding HTML. */ Drupal.theme.quickeditToolgroup = function (settings) { // Classes. var classes = (settings.classes || []); classes.unshift('quickedit-toolgroup'); var html = ''; html += '