Sha256: ae49b783ed6ee86ad950a3ad03c4a107f2ddcd2576d8b32f1b25e543004b3a00
Contents?: true
Size: 1.28 KB
Versions: 62
Compression:
Stored size: 1.28 KB
Contents
/** * @namespace WORKAREA.addToCalendarButtons */ WORKAREA.registerModule('addToCalendarButtons', (function () { 'use strict'; var toggleContent = function ($button, $moreInfo, event) { event.preventDefault(); $button.tooltipster('content', $moreInfo); }, initTooltip = function (button, $content) { var config = _.merge({}, WORKAREA.config.tooltipster, { content: $content, interactive: true }); return $(button).tooltipster(config); }, setup = function (index, button) { var data = $(button).data('addToCalendarButton'), $initial = $(data.initial), $moreInfo = $(data.moreInfo), $button = initTooltip(button, $initial), toggle = _.partial(toggleContent, $button, $moreInfo); $initial .find('[data-add-to-calendar-button-toggle]') .on('click', toggle); }, /** * @method * @name init * @memberof WORKAREA.addToCalendarButtons */ init = function ($scope) { $('[data-add-to-calendar-button]', $scope).each(setup); }; return { init: init }; }()));
Version data entries
62 entries across 62 versions & 1 rubygems