Commit 1ecdbfd3 authored by Mark Halliwell's avatar Mark Halliwell
Browse files

Issue #2397407 by markcarver: Move CSS/JS altering to Libraries API

parent a3f51255
Loading
Loading
Loading
Loading
+1 −2
Changes for bootstrap.info.yml: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
core: 8.x
type: theme
version: VERSION
base theme: false

name: 'Bootstrap'
@@ -37,4 +36,4 @@ stylesheets-remove:
  - '@system/css/components/tabs.theme.css'

libraries:
  - 'bootstrap/globalscripts'
  - 'bootstrap/base-theme'
+7 −7
Changes for bootstrap.libraries.yml: 7 added lines, 7 removed lines.
Original line number Diff line number Diff line
globalscripts:
  version: VERSION
base-theme:
  css: {}
  js:
    js/bootstrap.js: {}
    js/base-theme.js: {}
  dependencies:
    - core/jquery
    - core/jquery.once
    - core/drupal.ajax
    - core/drupal
    - core/drupalSettings

adminscript:
  version: VERSION
theme-settings:
  js:
    js/bootstrap.admin.js: {}
    js/theme-settings.js: {}
  dependencies:
    - bootstrap/base-theme
+9 −9
Changes for bootstrap.theme: 9 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -29,15 +29,6 @@ use Drupal\bootstrap\Bootstrap;
 */
Bootstrap::initialize();

/**
 * {@inheritdoc}
 *
 * @see \Drupal\bootstrap\Plugin\Alter\Css::alter()
 */
function bootstrap_css_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}

/**
 * {@inheritdoc}
 *
@@ -92,6 +83,15 @@ function bootstrap_js_callback_filter_xss_alter(&$data, &$context1 = NULL, &$con
  Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}

/**
 * {@inheritdoc}
 *
 * @see \Drupal\bootstrap\Plugin\Alter\LibraryInfo::alter()
 */
function bootstrap_library_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}

/**
 * {@inheritdoc}
 *
+0 −0

File moved.

+0 −0

File moved.

Loading