o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1383239459.028306: @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.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.0/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-10-31T17:26:43+01:00;TI" length;Tià I" digest;TI"%f913bd0414f407b9507274a3274961c3;FI" source;TI"à (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;TI"%170e94a20ce20b7a2b1fce802066c563;FI"required_paths;T[I"¡/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.0/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee;FI"§/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.0/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.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.0/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee;FI" mtime;TI"2013-10-31T17:26:43+01:00;TI" digest;TI"%6b44321b3f0db82d050034464f16f300;F{I" path;TI"¡/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.0/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee;FI" mtime;TI"2013-10-31T17:26:43+01:00;TI" digest;TI"%fcd46d674e5401eae1d7f4538e3fbb37;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F