o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1364984317.6930509: @value"Ø{I" class:EFI"ProcessedAsset;FI"logical_path;FI"7locomotive/views/theme_assets/image_picker_view.js;TI" pathname;FI"~/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-01-18T09:21:50+01:00;FI" length;FiÆ I" digest;F"%5b876565be563468e48d302a915a7c26I" 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"%dc780ea11b0aaea27b4d43967b39e53aI"required_paths;F[I"x/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee;TI"~/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;TI"dependency_paths;F[{I" path;FI"~/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;TI" mtime;FI"2013-01-18T09:21:50+01:00;FI" digest;F"%524e507ef02aa6c5428100fc06b56c6c{I" path;FI"x/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee;TI" mtime;FI"2013-01-18T09:21:50+01:00;FI" digest;F"%68ddf826fc50b6f06e9989bfc2f9c8ccI" _version;F"%6776f581a4329e299531e1d52aa59832