spec/dummy/tmp/cache/assets/D03/400/sprockets%2Fd6b5a6e0896937f5da48d589229f639e in locomotivecms-search-0.2.8 vs spec/dummy/tmp/cache/assets/D03/400/sprockets%2Fd6b5a6e0896937f5da48d589229f639e in locomotivecms-search-0.3.0

- old
+ new

@@ -1,9 +1,9 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1384093246.738542: @value"Î {I" +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1396022041.450034: @value"™ {I" class:ETI"ProcessedAsset;FI"logical_path;TI"6locomotive/views/shared/fields/belongs_to_view.js;FI" pathname;TI"|/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/fields/belongs_to_view.js.coffee;FI"content_type;TI"application/javascript;TI" -mtime;TI"2013-10-09T00:12:17+02:00;TI" length;TiùI" digest;TI"%7c67c871f8e3e125003977c399aa588d;FI" source;TI"ù(function() { - var _base, _base1, _ref, +mtime;TI"2013-11-22T20:40:15+01:00;TI" length;TiÄI" digest;TI"%2b28af83396a045ef348cc7c5acb0f16;FI" source;TI"Ä(function() { + var _base, _base1, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; (_base = Locomotive.Views).Shared || (_base.Shared = {}); @@ -11,63 +11,37 @@ Locomotive.Views.Shared.Fields.BelongsToView = (function(_super) { __extends(BelongsToView, _super); function BelongsToView() { - _ref = BelongsToView.__super__.constructor.apply(this, arguments); - return _ref; + return BelongsToView.__super__.constructor.apply(this, arguments); } BelongsToView.prototype.render = function() { this.enable_select2(); return this; }; BelongsToView.prototype.enable_select2 = function() { - var options, - _this = this; + var options; options = $(this.el).data(); - $(this.el).select2({ - width: '50%', - minimumInputLength: 1, - quietMillis: 100, - allowClear: true, - placeholder: ' ', - ajax: { - url: options.url, - data: function(term, page) { - return { - q: term, - page: page - }; - }, - results: function(data, page) { - return { - results: data.map(function(item) { - return { - id: item._id, - text: item._label || '' - }; - }), - more: data.length === options.perPage - }; - } - }, - initSelection: function(el, callback) { - return callback({ - id: el.val(), - text: options.value - }); - } - }); - return $(this.el).on('select2-selecting', function(el) { - return _this.model.set("" + _this.options.name + "_id", el.val); - }); + options.init_selection_fn = function(el, callback) { + return callback({ + id: el.val(), + text: options.value + }); + }; + BelongsToView.__super__.enable_select2.call(this, $(this.el), options); + return $(this.el).on('select2-selecting', (function(_this) { + return function(el) { + return _this.model.set("" + _this.options.name + "_id", el.val); + }; + })(this)); }; return BelongsToView; - })(Backbone.View); + })(Locomotive.Views.Shared.Fields.RelationshipView); }).call(this); -;TI"dependency_digest;TI"%5f3e6fd2f7e502060cfe2133c361bec4;FI"required_paths;T[I"|/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/fields/belongs_to_view.js.coffee;FI"dependency_paths;T[{I" path;TI"|/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/fields/belongs_to_view.js.coffee;FI" -mtime;TI"2013-10-09T00:12:17+02:00;TI" digest;TI"%f3c3c133aa63b089301555f7c9c197fc;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F +;TI"dependency_digest;TI"%31648752e924a6162065c5ae5952edf7;FI"required_paths;T[I"|/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/fields/belongs_to_view.js.coffee;FI"dependency_paths;T[{I" path;TI"|/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/fields/belongs_to_view.js.coffee;FI" +mtime;TI"2013-11-22T20:40:15+01:00;TI" digest;TI"%a29462553360cb09cd4643ddc4e0652b;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F \ No newline at end of file