Sha256: 868c59a04f00f3f2842ea5eb21f80cb03ac5b90bab0409770572d66a69ed9c58

Contents?: true

Size: 1.81 KB

Versions: 3

Compression:

Stored size: 1.81 KB

Contents

{:uriI"file:///Users/madmax/Programs/itmammoth/rails_sortable/vendor/assets/javascripts/plugin.js?type=application/javascript&pipeline=self&id=6bc6544db2185c0c49fc06a903e4e3520356ca77a8dde9cd0e83e08c845a4a50: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 setting = $.extend({
      axis: 'y',
      scroll: 'true',
    }, options);

    setting.update = function(event, ui) {
      if (typeof options.update === 'function') {
        options.update(event, ui);
      }
      // $.post("/sortable/reorder", makePostData($(this)));
      console.log(makePostData($(this)));
    }

    this.sortable(setting);
  };

  var makePostData = function($sortable) {
    var data = {}, klass, id;
    $sortable.sortable('toArray').forEach(function(sortableId) {
      [klass, id] = sortableId.split(/[-=_]/);
      (data[klass] || (data[klass] = [])).push(id);
    });
    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"%Og|X1JTPTN+4N:lengthi:dependencies_digest"%Zw^~-2Gaǫq.:idI"E6bc6544db2185c0c49fc06a903e4e3520356ca77a8dde9cd0e83e08c845a4a50;F:
mtimel+Z

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_sortable-1.3.0 spec/dummy/tmp/cache/assets/sprockets/v3.0/0i/0iROcwwTcx7Nm88QZYGEnMcYR8UQeRUFriWBo-AMrtU.cache
rails_sortable-1.2.1 spec/dummy/tmp/cache/assets/sprockets/v3.0/0i/0iROcwwTcx7Nm88QZYGEnMcYR8UQeRUFriWBo-AMrtU.cache
rails_sortable-1.2.0 spec/dummy/tmp/cache/assets/sprockets/v3.0/0i/0iROcwwTcx7Nm88QZYGEnMcYR8UQeRUFriWBo-AMrtU.cache