Sha256: 25230efd395d32ea18008a4ac44773c5d9a43ad287c37a02ea9fd55ed5d8317a

Contents?: true

Size: 806 Bytes

Versions: 62

Compression:

Stored size: 806 Bytes

Contents

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

    var disableEditMode = function(event) {
            var $cancelButton = $(event.currentTarget),
                $editor = $cancelButton.closest('.content-editor'),
                $activeBlock = $('.content-block--active', $editor);

            event.preventDefault();
            WORKAREA.contentBlocks.deactivateBlock($activeBlock);
        },

        /**
         * @method
         * @name init
         * @memberof WORKAREA.contentEditorFormCancel
         */
        init = function ($scope) {
            $('[data-content-editor-form-cancel]', $scope)
            .on('click', disableEditMode);
        };

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

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.15 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.4.36 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.5.14 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.4.35 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.5.13 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.4.34 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.5.12 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.4.33 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.5.11 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.5.10 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.4.32 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.5.9 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.4.31 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.5.8 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.4.30 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.5.7 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.4.29 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.5.6 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.4.28 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js
workarea-admin-3.5.5 app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js