Sha256: c98eb19a86c468dc798d35e48e7275470e8b9702de45622a39f5cad6d219b55f

Contents?: true

Size: 1.87 KB

Versions: 3

Compression:

Stored size: 1.87 KB

Contents

{:uriI"file:///Users/madmax/Programs/itmammoth/rails_sortable/vendor/assets/javascripts/plugin.js?type=application/javascript&pipeline=self&id=6d5dbe1faf92247cf33f21a6601e61b0b78d9e876184850d8e8a33744773a49c: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;
    console.log($sortable.sortable('toArray'));
    // $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"%ΎrsS5ЊC5ORG9b)B:lengthi-:dependencies_digest"%v?Iz>2B5C(:idI"E6d5dbe1faf92247cf33f21a6601e61b0b78d9e876184850d8e8a33744773a49c;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/-R/-RBl5Otls9eKjBDLs-sw0CZKjYNIoxyt05c77eu6MPU.cache
rails_sortable-1.2.1 spec/dummy/tmp/cache/assets/sprockets/v3.0/-R/-RBl5Otls9eKjBDLs-sw0CZKjYNIoxyt05c77eu6MPU.cache
rails_sortable-1.2.0 spec/dummy/tmp/cache/assets/sprockets/v3.0/-R/-RBl5Otls9eKjBDLs-sw0CZKjYNIoxyt05c77eu6MPU.cache