Sha256: 379f8594a8ab25947d1b20f93f12931a244e8bbe6b0a32315a9044c21ba0b13b

Contents?: true

Size: 1.86 KB

Versions: 1

Compression:

Stored size: 1.86 KB

Contents

{:uriI"file:///Users/madmax/Programs/itmammoth/rails_sortable/vendor/assets/javascripts/plugin.js?type=application/javascript&pipeline=self&id=1a3201ce1540825197503b033c788853933f69e7914ecd3ca5eb304ed67678e0:ET:load_pathI"N/Users/madmax/Programs/itmammoth/rails_sortable/vendor/assets/javascripts;T:
filenameI"X/Users/madmax/Programs/itmammoth/rails_sortable/vendor/assets/javascripts/plugin.js;T:	nameI"plugin;T:logical_pathI"plugin.self.js;T:content_typeI"application/javascript;T:sourceI"(function($) {

  $.fn.railsSortable = function(options) {
    options = options || {};
    var settings = $.extend({}, options);

    settings.update = function(event, ui) {
      if (typeof options.update === 'function') {
        options.update(event, ui);
      }

      $.ajax({
        type: 'POST',
        url: '/sortable/reorder',
        dataType: 'json',
        contentType: 'application/json',
        data: JSON.stringify(makePostData($(this))),
      });
    }

    this.sortable(settings);
  };

  var makePostData = function($sortable) {
    var data = $.map($sortable.sortable('toArray'), function(sortableId) {
      klassAndId = sortableId.split(/[-=_]/);
      return { klass: klassAndId[0], id: klassAndId[1] };
    });
    return { rails_sortable: data };
  };
})(jQuery);
;T:
metadata{:dependencieso:Set:
@hash}
I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"ffile-digest:///Users/madmax/Programs/itmammoth/rails_sortable/vendor/assets/javascripts/plugin.js;TTF:
requiredo;;}F:stubbedo;;}F:
linkso;;}F:charsetI"
utf-8;F:digest"%bX#͖3~3֞N_Fi:lengthi:dependencies_digest"%[ϩO›	`GM'D
Q::idI"E1a3201ce1540825197503b033c788853933f69e7914ecd3ca5eb304ed67678e0;F:
mtimel+27]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_sortable-1.3.0 spec/dummy/tmp/cache/assets/sprockets/v3.0/3p/3pbp-H-w_YBd7d0drOiS2z8F3yXDZI3xvTK7sOdgxmo.cache