(function($){

    $.widget( "core.bindReq", {

        options: {
            request: {
                dataType: "json",
                type: "POST"
            },
            loader: "div.content",
            serialized_data: "",
            custom: {}
        },

        _create: function() {
            this.context_loader = $(this.options.loader).busyBox({
                spinner: '<img src="<%= image_path('ajax-loader.gif')  %>" />',
                autoOpen: false
            });

        },
        perform: function() {
            var opts = this.options;
            var that = this;

            $.ajax($.extend({
                url: opts.context.prop("action"),
                data: opts.serialized_data,
                beforeSend: function() {
                    that.context_loader.busyBox("open");
                },
                success: function(response) {
                },
                complete: function() {
                    that.context_loader.busyBox("close");
                }
            }, this.options.request, this.options.custom));
        },

        _destroy: function() {
        }

    });


})(jQuery);
//= depend_on_asset "ajax-loader.gif"

(function($){

    $.widget( "core.bindReq", {

        options: {
            request: {
                dataType: "json",
                type: "POST"
            },
            loader: "div.content",
            serialized_data: "",
            custom: {}
        },

        _create: function() {
            this.context_loader = $(this.options.loader).busyBox({
                spinner: '<img src="<%= image_path('ajax-loader.gif')  %>" />',
                autoOpen: false
            });

        },
        perform: function() {
            var opts = this.options;
            var that = this;

            $.ajax($.extend({
                url: opts.context.prop("action"),
                data: opts.serialized_data,
                beforeSend: function() {
                    that.context_loader.busyBox("open");
                },
                success: function(response) {
                },
                complete: function() {
                    that.context_loader.busyBox("close");
                }
            }, this.options.request, this.options.custom));
        },

        _destroy: function() {
        }

    });


})(jQuery);

Fix assets dependencies for jquery loader
Fix assets dependencies for jquery loader

Change-Id: Id664647cf4d6a98302a830225de3194c47782f9b
