o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1384182736.3770409: @value"C{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/gems/locomotive_cms-2.3.1/app/assets/javascripts/locomotive/models/editable_element.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-11-11T00:40:29+01:00;TI" length;Ti I" digest;TI"%7aa1eaffd51fa8537dc7c7cbee055060;FI" source;TI" (function() { var _ref, _ref1, __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() { _ref = EditableElement.__super__.constructor.apply(this, arguments); return _ref; } EditableElement.prototype.toJSONForSave = function() { var _this = this; return _.tap({}, function(hash) { var key, value, _ref1; _ref1 = _this.toJSON(); for (key in _ref1) { value = _ref1[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']; } }); }; return EditableElement; })(Backbone.Model); Locomotive.Models.EditableElementsCollection = (function(_super) { __extends(EditableElementsCollection, _super); function EditableElementsCollection() { _ref1 = EditableElementsCollection.__super__.constructor.apply(this, arguments); return _ref1; } EditableElementsCollection.prototype.model = Locomotive.Models.EditableElement; EditableElementsCollection.prototype.blocks = function() { var names, _this = this; names = _.uniq(this.map(function(editable, index) { return editable.get('block_name'); })); return _.tap([], function(list) { return _.each(names, function(name, index) { return list.push({ name: name, index: index }); }); }); }; 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) { var _this = this; return collection.each(function(element) { var _element; _element = _this.find_similar(element); if (_element) { return _element.set('content', element.get('content')); } }); }; EditableElementsCollection.prototype.toJSONForSave = function() { var _this = this; return this.map(function(model) { return model.toJSONForSave(); }); }; return EditableElementsCollection; })(Backbone.Collection); }).call(this); ;TI"dependency_digest;TI"%e23c3a11551a255f7836cb7dbbd8f56d;FI"required_paths;T[I"š/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.1/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/gems/locomotive_cms-2.3.1/app/assets/javascripts/locomotive/models/editable_element.js.coffee;FI" mtime;TI"2013-11-11T00:40:29+01:00;TI" digest;TI"%d3b86454402b0e7bdf958b834000980f;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F