o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1396088392.6420321: @value"¿{I" class:ETI"ProcessedAsset;FI"logical_path;TI"*locomotive/models/editable_element.js;FI" pathname;TI"¡/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/engine-c0bddd719ddf/app/assets/javascripts/locomotive/models/editable_element.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2014-03-29T11:18:01+01:00;TI" length;Ti‡ I" digest;TI"%b0f24f62b08c201c91bdbf7e03a062b6;FI" source;TI"‡ (function() { var __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; }; Locomotive.Models.EditableElement = (function(_super) { __extends(EditableElement, _super); function EditableElement() { return EditableElement.__super__.constructor.apply(this, arguments); } EditableElement.prototype.toJSONForSave = function() { return _.tap({}, (function(_this) { return function(hash) { var key, value, _ref; _ref = _this.toJSON(); for (key in _ref) { value = _ref[key]; if (_.include(['id', 'source', 'content', 'remove_source'], key)) { hash[key] = value; } } if (_this.get('type') === 'EditableFile') { return delete hash['content']; } else { return delete hash['source']; } }; })(this)); }; return EditableElement; })(Backbone.Model); Locomotive.Models.EditableElementsCollection = (function(_super) { __extends(EditableElementsCollection, _super); function EditableElementsCollection() { return EditableElementsCollection.__super__.constructor.apply(this, arguments); } EditableElementsCollection.prototype.model = Locomotive.Models.EditableElement; EditableElementsCollection.prototype.blocks = function() { var names; names = _.uniq(this.map(function(editable, index) { return editable.get('block_name'); })); return _.tap([], (function(_this) { return function(list) { return _.each(names, function(name, index) { return list.push({ name: name, index: index }); }); }; })(this)); }; EditableElementsCollection.prototype.by_block = function(name) { return this.filter(function(editable) { return editable.get('block_name') === name; }); }; EditableElementsCollection.prototype.find_similar = function(editable) { return this.find(function(_editable) { return editable.get('block') === _editable.get('block') && editable.get('slug') === _editable.get('slug') && editable.get('type') === _editable.get('type'); }); }; EditableElementsCollection.prototype.update_content_from = function(collection) { return collection.each((function(_this) { return function(element) { var _element; _element = _this.find_similar(element); if (_element) { return _element.set('content', element.get('content')); } }; })(this)); }; EditableElementsCollection.prototype.toJSONForSave = function() { return this.map((function(_this) { return function(model) { return model.toJSONForSave(); }; })(this)); }; return EditableElementsCollection; })(Backbone.Collection); }).call(this); ;TI"dependency_digest;TI"%aedb2ef1a98d9a892e21b1d957a7b688;FI"required_paths;T[I"¡/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/engine-c0bddd719ddf/app/assets/javascripts/locomotive/models/editable_element.js.coffee;FI"dependency_paths;T[{I" path;TI"¡/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/engine-c0bddd719ddf/app/assets/javascripts/locomotive/models/editable_element.js.coffee;FI" mtime;TI"2014-03-29T11:18:01+01:00;TI" digest;TI"%d3b86454402b0e7bdf958b834000980f;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F