Sha256: 0feb96f5a862ccd4dee2249d3a1427da2a1e7502cd1fdcbedcb0e5b5c880e2ad

Contents?: true

Size: 685 Bytes

Versions: 62

Compression:

Stored size: 685 Bytes

Contents

/**
 * @namespace WORKAREA.dialogCloseButtons
 */
WORKAREA.registerModule('dialogCloseButtons', (function () {
    'use strict';

    var closeDialog = function (event) {
            var $closestDialog = WORKAREA.dialog.closest(event.currentTarget);

            if (_.isEmpty($closestDialog)) { return; }

            event.preventDefault();

            $closestDialog.dialog('close');
        },

        /**
         * @method
         * @name init
         * @memberof WORKAREA.dialogCloseButtons
         */
        init = function ($scope) {
            $('[data-dialog-close-button]', $scope).on('click', closeDialog);
        };

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

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.5.27 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.5.26 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.4.45 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.5.25 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.5.23 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.4.44 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.5.22 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.4.43 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.5.21 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.4.42 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.5.20 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.4.41 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.5.19 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.4.40 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.5.18 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.4.39 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.5.17 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.4.38 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.5.16 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js
workarea-storefront-3.4.37 app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js