o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1416672647.952182: @value"é{I" class:ETI"ProcessedAsset;FI"logical_path;TI"7locomotive/views/theme_assets/image_picker_view.js;FI" pathname;TI"¢/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2014-11-22T16:47:36+01:00;TI" length;Ti I" digest;TI"%f593320be3852d6cd297e58911b10569;FI" source;TI" (function() { var _base, __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).ThemeAssets || (_base.ThemeAssets = {}); Locomotive.Views.ThemeAssets.ImagePickerView = (function(_super) { __extends(ImagePickerView, _super); function ImagePickerView() { return ImagePickerView.__super__.constructor.apply(this, arguments); } ImagePickerView.prototype.events = { 'click ul.list a': 'select_asset' }; ImagePickerView.prototype.initialize = function() { this.collection || (this.collection = new Locomotive.Models.ThemeAssetsCollection()); return ImagePickerView.__super__.initialize.apply(this, arguments); }; ImagePickerView.prototype.template = function() { return ich.theme_image_picker; }; ImagePickerView.prototype.fetch_assets = function() { this._reset(); return this.collection.fetch({ data: { content_type: 'image' }, success: (function(_this) { return function() { return _this.open(); }; })(this) }); }; ImagePickerView.prototype.build_uploader = function(el, link) { link.bind('click', function(event) { event.stopPropagation() & event.preventDefault(); return el.click(); }); return el.bind('change', (function(_this) { return function(event) { return _.each(event.target.files, function(file) { var asset; asset = new Locomotive.Models.ThemeAsset({ source: file }); return asset.save({}, { headers: { 'X-Flash': true }, success: function(model) { return _this.collection.add(model); }, error: function() { return _this.shake(); } }); }); }; })(this)); }; ImagePickerView.prototype.select_asset = function(event) { event.stopPropagation() & event.preventDefault(); if (this.options.on_select) { return this.options.on_select($(event.target).html()); } }; ImagePickerView.prototype.add_asset = function(asset) { this.$('ul.list').append(ich.theme_asset(asset.toJSON())); return this._refresh(); }; ImagePickerView.prototype._reset = function() { return this.$('ul.list').empty(); }; return ImagePickerView; })(Locomotive.Views.Shared.AssetPickerView); }).call(this); ;TI"dependency_digest;TI"%d4ce45a655d904d6ff3162e8644c04cb;FI"required_paths;T[I"œ/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee;FI"¢/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;FI"dependency_paths;T[{I" path;TI"¢/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;FI" mtime;TI"2014-11-22T16:47:36+01:00;TI" digest;TI"%6b44321b3f0db82d050034464f16f300;F{@I"œ/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee;F@ I"2014-11-22T16:47:36+01:00;T@"I"%27e3e984571c5c13f4806c59ed07ca5c;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F