Skip to content
Snippets Groups Projects
Commit 98543a29 authored by Serhii Myronets's avatar Serhii Myronets Committed by Tiago Siqueira
Browse files

Issue #3392441 by agami4: Recompile js files

parent fdfbcfcd
No related branches found
No related tags found
1 merge request!184Issue #3392441 by agami4: Improve twig code, js library and php dependency
(function ($) {
(function (Drupal, $, once) {
Drupal.behaviors.textareaAutogrow = {
attach: function attach(context, settings) {
// Attach autosize listener.
$(".form-control--autogrow", context).once("textareaAutogrow").each(function () {
$(once('textareaAutogrow', ".form-control--autogrow", context)).each(function () {
autosize.destroy($('.form-control--autogrow'));
autosize($('.form-control--autogrow'));
autosize.update($('.form-control--autogrow'));
......@@ -19,4 +19,4 @@
});
}
};
})(jQuery);
\ No newline at end of file
})(Drupal, jQuery, once);
\ No newline at end of file
(function ($) {
(function (Drupal, $, once) {
Drupal.behaviors.navbarCollapse = {
attach: function attach(context, settings) {
// Delegate the event to body to prevent screenreaders from thinking
// teasers are clickable.
var $body = $('body');
$body.once('navbarCollapse').on('click', '.dropdown-toggle, #content', function () {
var $body = $(once('navbarCollapse', 'body'));
$body.on('click', '.dropdown-toggle, #content', function () {
$('.navbar-collapse').collapse('hide');
var headerDropDown = $('.navbar-default .dropdown');
setTimeout(function () {
......@@ -17,4 +18,4 @@
});
}
};
})(jQuery);
\ No newline at end of file
})(Drupal, jQuery, once);
\ No newline at end of file
......@@ -2,27 +2,30 @@
* @file
* Add SVG as sanitized option to popover.
*/
(function ($, Drupal) {
(function ($, Drupal, once) {
'use strict';
/**
* @type {Drupal~behavior}
*/
Drupal.behaviors.social_popover = {
attach: function attach(context, settings) {
if (!$.fn.popover) throw new Error('Popover requires tooltip.js');
$('body').once('social_popover').each(function () {
var myDefaultWhiteList = []; // Allow table elements
$(once('social_popover', 'body')).each(function () {
var myDefaultWhiteList = [];
// Allow table elements
myDefaultWhiteList.table = [];
myDefaultWhiteList.td = [];
myDefaultWhiteList.th = []; // Allow SVG's and use options
myDefaultWhiteList.th = [];
// Allow SVG's and use options
myDefaultWhiteList.svg = ['viewBox'];
myDefaultWhiteList.use = ['xlink:href', 'href', 'xlink']; // Extend the popover defaults so we can add the above to the popover.
myDefaultWhiteList.use = ['xlink:href', 'href', 'xlink'];
// Extend the popover defaults so we can add the above to the popover.
$.extend($.fn.popover.Constructor.DEFAULTS.whiteList, myDefaultWhiteList);
});
}
};
})(jQuery, Drupal);
\ No newline at end of file
})(jQuery, Drupal, once);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment