Sha256: 6aaf39e55be833e7bf3c96669ba34a429af6bd6816d612f922327e1ea1fe473d

Contents?: true

Size: 744 Bytes

Versions: 62

Compression:

Stored size: 744 Bytes

Contents

/**
 * Hook onto the content preset tooltip form so that it dismisses when
 * form is submitted asynchronously.
 *
 * @namespace WORKAREA.contentPresetForm
 */
WORKAREA.registerModule('contentPresetForm', (function () {
    'use strict';

    var dismissTooltip = function($button) {
            $button.tooltipster('close');
        },

        /**
         * @method
         * @name init
         * @memberof WORKAREA.contentPresetForm
         */
        init = function($scope) {
            var $form = $('[data-content-preset-form]', $scope),
                $button = $('[data-content-preset-button]');

            $form.on('ajax:success', _.partial(dismissTooltip, $button));
        };

    return {
        init: init
    };
}()));

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.4.13 app/assets/javascripts/workarea/admin/modules/content_preset_form.js
workarea-admin-3.4.12 app/assets/javascripts/workarea/admin/modules/content_preset_form.js