/**
* @file
* Bootstrap Tooltips.
*/
var Drupal = Drupal || {};
(function ($, Drupal, Bootstrap) {
"use strict";
/**
* Extend the Bootstrap Tooltip plugin constructor class.
*/
Bootstrap.extendPlugin('tooltip', function (settings) {
return {
DEFAULTS: {
animation: !!settings.tooltip_animation,
enabled: settings.tooltip_enabled,
html: !!settings.tooltip_html,
placement: settings.tooltip_placement,
selector: settings.tooltip_selector,
trigger: settings.tooltip_trigger,
delay: parseInt(settings.tooltip_delay, 10),
container: settings.tooltip_container
}
};
});
/**
* Bootstrap Tooltips.
*
* @todo This should really be properly delegated if selector option is set.
*/
Drupal.behaviors.bootstrapTooltips = {
attach: function (context) {
// Immediately return if tooltips are not available.
if (!$.fn.tooltip || !$.fn.tooltip.Constructor.DEFAULTS.enabled) {
return;
}
var elements = $(context).find('[data-toggle="tooltip"]').toArray();
for (var i = 0; i < elements.length; i++) {
var $element = $(elements[i]);
var options = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, $element.data());
$element.tooltip(options);
}
},
detach: function (context) {
// Immediately return if tooltips are not available.
if (!$.fn.tooltip || !$.fn.tooltip.Constructor.DEFAULTS.enabled) {
return;
}
// Destroy all tooltips.
$(context).find('[data-toggle="tooltip"]').tooltip('destroy');
}
};
})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
体育平台
Sun-City-app-admin@vilapoucadeaguiar.net
bet365体育
bet365网址
365体育
Sun-City-app-sales@ronwarepctech.net
新葡京
Sabah-Official-website-info@jobhir.net
潮汕网
腾讯文学手机门户
思雨电影网
湖北工业大学工程技术学院
太原欣欣旅游网
新华书店网上商城
欧派地板
金投机构大全