added boussole js library
This commit is contained in:
parent
260c1c5b67
commit
71776320fe
|
@ -0,0 +1,15 @@
|
||||||
|
Drupal.behaviors.boussole = {
|
||||||
|
attach: function (context, settings) {
|
||||||
|
console.log("Hello boussole", context);
|
||||||
|
// Use context to filter the DOM to only the elements of interest,
|
||||||
|
// and use once() to guarantee that our callback function processes
|
||||||
|
// any given element one time at most, regardless of how many times
|
||||||
|
// the behaviour itself is called (it is not sufficient in general
|
||||||
|
// to assume an element will only ever appear in a single context).
|
||||||
|
// once('boussoleForm', 'input.myCustomBehavior', context).forEach(
|
||||||
|
// function (element) {
|
||||||
|
// element.classList.add('processed');
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
};
|
|
@ -3,3 +3,9 @@ global-styling:
|
||||||
css:
|
css:
|
||||||
theme:
|
theme:
|
||||||
css/ouatminimal.css: {}
|
css/ouatminimal.css: {}
|
||||||
|
boussole:
|
||||||
|
version: VERSION
|
||||||
|
js:
|
||||||
|
js/boussole.js: {}
|
||||||
|
dependencies:
|
||||||
|
- core/jquery
|
|
@ -79,7 +79,7 @@ function ouatminimal_theme_suggestions_field_multiple_value_form_alter(array &$s
|
||||||
function ouatminimal_preprocess_field_multiple_value_form__field_entite__node_concernement(&$variables) {
|
function ouatminimal_preprocess_field_multiple_value_form__field_entite__node_concernement(&$variables) {
|
||||||
// $element = $variables['element'];
|
// $element = $variables['element'];
|
||||||
$attributes = $variables['attributes'];
|
$attributes = $variables['attributes'];
|
||||||
|
$variables['#attached']['library'][] = 'ouatminimal/boussole';
|
||||||
}
|
}
|
||||||
// template_preprocess_field_multiple_value_form
|
// template_preprocess_field_multiple_value_form
|
||||||
// function ouatminimal_preprocess_field_multiple_value_form(&$variables) {
|
// function ouatminimal_preprocess_field_multiple_value_form(&$variables) {
|
||||||
|
|
Loading…
Reference in New Issue