claro-8.x-1.x-dev/js/ajax.es6.js

js/ajax.es6.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
 * @file
 * Ajax theme overrides for Claro.
 */
 
(Drupal => {
  /**
   * Theme override of the ajax progress indicator for full screen.
   *
   * @return {string}
   *   The HTML markup for the throbber.
   */
  Drupal.theme.ajaxProgressIndicatorFullscreen = () =>
    '<div class="ajax-progress ajax-progress--fullscreen"><div class="ajax-progress__throbber ajax-progress__throbber--fullscreen">&nbsp;</div></div>';
 
  /**
   * Theme override of the ajax progress indicator.
   *
   * @param {string} message
   *   The message shown on the UI.
   * @return {string}
   *   The HTML markup for the throbber.
   */
  Drupal.theme.ajaxProgressThrobber = message => {
    // Build markup without adding extra white space since it affects rendering.
    const messageMarkup =
      typeof message === "string"
        ? Drupal.theme("ajaxProgressMessage", message)
        : "";
    const throbber = '<div class="ajax-progress__throbber">&nbsp;</div>';
 
    return `<div class="ajax-progress ajax-progress--throbber">${throbber}${messageMarkup}</div>`;
  };
 
  /**
   * Theme override of the ajax progress message.
   *
   * @param {string} message
   *   The message shown on the UI.
   * @return {string}
   *   The HTML markup for the throbber.
   */
  Drupal.theme.ajaxProgressMessage = message =>
    `<div class="ajax-progress__message">${message}</div>`;
})(Drupal);

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc