Sha256: f2c9dff60232fd3c5b1070f2092572203af5ebbf8b51eaee29dbac66b5fdc27d

Contents?: true

Size: 644 Bytes

Versions: 3

Compression:

Stored size: 644 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(callbacks) {
        Jelly.Observers.notify.call(otherParams.observers || Jelly.observers, callbacks);
      }
    }, otherParams);
  };
})(jQuery);

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
honkster-jelly-0.12.0 generators/jelly/templates/javascripts/ajax_with_jelly.js
honkster-jelly-0.11.0 generators/jelly/templates/javascripts/ajax_with_jelly.js
honkster-jelly-0.10.0 generators/jelly/templates/javascripts/ajax_with_jelly.js