Loading core/.eslintrc.jquery.json +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ "jquery/no-in-array": 0, "jquery/no-is-array": 0, "jquery/no-is-function": 2, "jquery/no-is": 0, "jquery/no-is": 2, "jquery/no-load": 2, "jquery/no-map": 2, "jquery/no-merge": 2, Loading core/misc/ajax.js +1 −1 Original line number Diff line number Diff line Loading @@ -459,7 +459,7 @@ // If no Ajax callback URL was given, use the link href or form action. if (!this.url) { const $element = $(this.element); if ($element.is('a')) { if (this.element.tagName === 'A') { this.url = $element.attr('href'); } else if (this.element && element.form) { this.url = this.$form.attr('action'); Loading core/misc/dialog/dialog.ajax.js +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ click(e) { // If the original button is an anchor tag, triggering the "click" // event will not simulate a click. Use the click method instead. if ($originalButton.is('a')) { if ($originalButton[0].tagName === 'A') { $originalButton[0].click(); } else { $originalButton Loading core/misc/dialog/off-canvas/js/off-canvas.js +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ * True this is currently an off-canvas dialog. */ isOffCanvas($element) { return $element.is('#drupal-off-canvas'); return $element[0].id === 'drupal-off-canvas'; }, /** Loading core/misc/drupal.js +30 −0 Original line number Diff line number Diff line Loading @@ -645,6 +645,36 @@ window.Drupal = { behaviors: {}, locale: {} }; Drupal.theme.placeholder = function (str) { return `<em class="placeholder">${Drupal.checkPlain(str)}</em>`; }; /** * Determine if an element is visible. * * @param {HTMLElement} elem * The element to check. * * @return {boolean} * True if the element is visible. */ Drupal.elementIsVisible = function (elem) { return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); }; /** * Determine if an element is hidden. * * @param {HTMLElement} elem * The element to check. * * @return {boolean} * True if the element is hidden. */ Drupal.elementIsHidden = function (elem) { return !Drupal.elementIsVisible(elem); }; })( Drupal, window.drupalSettings, Loading Loading
core/.eslintrc.jquery.json +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ "jquery/no-in-array": 0, "jquery/no-is-array": 0, "jquery/no-is-function": 2, "jquery/no-is": 0, "jquery/no-is": 2, "jquery/no-load": 2, "jquery/no-map": 2, "jquery/no-merge": 2, Loading
core/misc/ajax.js +1 −1 Original line number Diff line number Diff line Loading @@ -459,7 +459,7 @@ // If no Ajax callback URL was given, use the link href or form action. if (!this.url) { const $element = $(this.element); if ($element.is('a')) { if (this.element.tagName === 'A') { this.url = $element.attr('href'); } else if (this.element && element.form) { this.url = this.$form.attr('action'); Loading
core/misc/dialog/dialog.ajax.js +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ click(e) { // If the original button is an anchor tag, triggering the "click" // event will not simulate a click. Use the click method instead. if ($originalButton.is('a')) { if ($originalButton[0].tagName === 'A') { $originalButton[0].click(); } else { $originalButton Loading
core/misc/dialog/off-canvas/js/off-canvas.js +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ * True this is currently an off-canvas dialog. */ isOffCanvas($element) { return $element.is('#drupal-off-canvas'); return $element[0].id === 'drupal-off-canvas'; }, /** Loading
core/misc/drupal.js +30 −0 Original line number Diff line number Diff line Loading @@ -645,6 +645,36 @@ window.Drupal = { behaviors: {}, locale: {} }; Drupal.theme.placeholder = function (str) { return `<em class="placeholder">${Drupal.checkPlain(str)}</em>`; }; /** * Determine if an element is visible. * * @param {HTMLElement} elem * The element to check. * * @return {boolean} * True if the element is visible. */ Drupal.elementIsVisible = function (elem) { return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); }; /** * Determine if an element is hidden. * * @param {HTMLElement} elem * The element to check. * * @return {boolean} * True if the element is hidden. */ Drupal.elementIsHidden = function (elem) { return !Drupal.elementIsVisible(elem); }; })( Drupal, window.drupalSettings, Loading