o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1381401973.9567401: @value"W{I" class:EFI"ProcessedAsset;FI"logical_path;FI"7locomotive/views/theme_assets/image_picker_view.js;TI" pathname;FI"’/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-10-10T12:39:17+02:00;FI" length;Fià I" digest;F"%f913bd0414f407b9507274a3274961c3I" source;FI"à (function() { var _base, _ref, __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() { _ref = ImagePickerView.__super__.constructor.apply(this, arguments); return _ref; } 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() { var _this = this; this._reset(); return this.collection.fetch({ data: { content_type: 'image' }, success: function() { return _this.open(); } }); }; ImagePickerView.prototype.build_uploader = function(el, link) { var _this = this; link.bind('click', function(event) { event.stopPropagation() & event.preventDefault(); return el.click(); }); return el.bind('change', 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(); } }); }); }); }; 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;F"%170e94a20ce20b7a2b1fce802066c563I"required_paths;F[I"Œ/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee;TI"’/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;TI"dependency_paths;F[{I" path;FI"’/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;TI" mtime;FI"2013-10-10T12:39:17+02:00;FI" digest;F"%6b44321b3f0db82d050034464f16f300{I" path;FI"Œ/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee;TI" mtime;FI"2013-10-10T12:39:17+02:00;FI" digest;F"%fcd46d674e5401eae1d7f4538e3fbb37I" _version;F"%ffd318ca8b794f42f5029101c2cf5d91