Sha256: 432ae2ea007a2ec81597d1bc64908dcdaa118cf8738ba8347ca53f5113b02634

Contents?: true

Size: 630 Bytes

Versions: 3

Compression:

Stored size: 630 Bytes

Contents

if(!window.Jelly) window.Jelly = {};

(Jelly.defineAjaxWithJellyFunctions = function($) {
  $.ajaxWithJelly = function(params) {
    $.ajax($.ajaxWithJelly.params(params));
  };

  if ($.fn.ajaxForm) {
    $.fn.ajaxFormWithJelly = function(params) {
      this.ajaxForm($.ajaxWithJelly.params(params));
    };
  }

  $.ajaxWithJelly.params = function(otherParams) {
    otherParams = otherParams || {};

    return $.extend({
      dataType: 'json',
      cache: false,
      success : function(ops) {
        Jelly.Observers.run.apply(otherParams.observers || Jelly.observers, ops);
      }
    }, otherParams);
  };
})(jQuery);

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
honkster-jelly-0.13.2 generators/jelly/templates/javascripts/ajax_with_jelly.js
honkster-jelly-0.13.1 generators/jelly/templates/javascripts/ajax_with_jelly.js
honkster-jelly-0.13.0 generators/jelly/templates/javascripts/ajax_with_jelly.js