Sha256: 9d1534bb3b2acb55d07d5b75c0d62d849dca6e5bb473ddeb9e79216a594fc292

Contents?: true

Size: 842 Bytes

Versions: 6

Compression:

Stored size: 842 Bytes

Contents

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

    var replacePlaceholder = function (placeholder, content) {
            var $content = $(content);

            $(placeholder).replaceWith($content);

            WORKAREA.initModules($content);
        },

        getContent = function (index, placeholder) {
            var url = $(placeholder).data('blogCommentPlaceholder');

            $.get(url).done(_.partial(replacePlaceholder, placeholder));
        },

        /**
         * @method
         * @name init
         * @memberof WORKAREA.blogCommentPlaceholder
         */
        init = function ($scope) {
            $('[data-blog-comment-placeholder]', $scope).each(getContent);
        };

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
workarea-blog-3.5.2 app/assets/javascripts/workarea/storefront/blog/modules/blog_comment_placeholder.js
workarea-blog-3.5.1 app/assets/javascripts/workarea/storefront/blog/modules/blog_comment_placeholder.js
workarea-blog-3.5.0 app/assets/javascripts/workarea/storefront/blog/modules/blog_comment_placeholder.js
workarea-blog-3.4.9 app/assets/javascripts/workarea/storefront/blog/modules/blog_comment_placeholder.js
workarea-blog-3.4.8 app/assets/javascripts/workarea/storefront/blog/modules/blog_comment_placeholder.js
workarea-blog-3.4.7 app/assets/javascripts/workarea/storefront/blog/modules/blog_comment_placeholder.js