o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1397508826.595789: @value"l{I" class:ETI"ProcessedAsset;FI"logical_path;TI"1locomotive/views/shared/asset_picker_view.js;FI" pathname;TI"¨/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/engine-5337f0929131/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2014-04-10T01:06:58+02:00;TI" length;TiI" digest;TI"%d77f4d37becbdfe66ec0abe0ad50d58d;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).Shared || (_base.Shared = {}); Locomotive.Views.Shared.AssetPickerView = (function(_super) { __extends(AssetPickerView, _super); function AssetPickerView() { return AssetPickerView.__super__.constructor.apply(this, arguments); } AssetPickerView.prototype.tag = 'div'; AssetPickerView.prototype.initialize = function() { _.bindAll(this, 'add_assets', 'add_asset', 'remove_asset'); this.collection.bind('reset', this.add_assets); this.collection.bind('add', this.add_asset); return this.collection.bind('remove', this.remove_asset); }; AssetPickerView.prototype.render = function() { $(this.el).html(this.template()()); this.create_dialog(); return this; }; AssetPickerView.prototype.template = function() {}; AssetPickerView.prototype.fetch_assets = function() {}; AssetPickerView.prototype.build_uploader = function(el, link) {}; AssetPickerView.prototype.create_dialog = function() { return this.dialog || (this.dialog = $(this.el).dialog({ autoOpen: false, modal: true, zIndex: window.application_view.unique_dialog_zindex(), dialogClass: this.dialog_class(), width: 615, minHeight: 520, create: (function(_this) { return function(event, ui) { var actions, input, link; $(_this.el).prev().find('.ui-dialog-title').html(_this.$('h2').html()); _this.$('h2').remove(); actions = _this.$('.dialog-actions').appendTo($(_this.el).parent()).addClass('ui-dialog-buttonpane ui-widget-content ui-helper-clearfix'); actions.find('#close-link').click(function(event) { return _this.close(event); }); input = actions.find('input[type=file]'); link = actions.find('#upload-link'); return _this.build_uploader(input, link); }; })(this), open: (function(_this) { return function(event, ui, extra) { $(_this.el).dialog('overlayEl').bind('click', function() { return _this.close(); }); return $(document.body).addClass('stop-scrolling'); }; })(this), close: (function(_this) { return function(event, ui, extra) { return $(document.body).removeClass('stop-scrolling'); }; })(this) })); }; AssetPickerView.prototype.open = function() { return $(this.el).dialog('open'); }; AssetPickerView.prototype.close = function(event) { if (event != null) { event.stopPropagation() & event.preventDefault(); } $(this.el).dialog('overlayEl').unbind('click'); return $(this.el).dialog('close'); }; AssetPickerView.prototype.shake = function() { return $(this.el).parents('.ui-dialog').effect('shake', { times: 4 }, 100); }; AssetPickerView.prototype.center = function() { return $(this.el).dialog('option', 'position', 'center'); }; AssetPickerView.prototype.add_assets = function(collection) { collection.each((function(_this) { return function(asset) { return _this.add_asset(asset, true); }; })(this)); return this._refresh(); }; AssetPickerView.prototype.add_asset = function(asset, first) {}; AssetPickerView.prototype.remove_asset = function(asset) {}; AssetPickerView.prototype.dialog_class = function() { return 'asset-picker-dialog'; }; AssetPickerView.prototype._move_to_last_asset = function() { var limit; limit = this.$('ul.list li.clear').position(); if (limit != null) { return this.$('ul.list').animate({ scrollTop: limit.top }, 100); } }; AssetPickerView.prototype._move_to_top = function() { return this.$('ul.list').animate({ scrollTop: 0 }, 100); }; AssetPickerView.prototype._refresh = function() { if (this.collection.length === 0) { this.$('ul.list').hide() & this.$('p.no-items').show(); } else { this.$('p.no-items').hide() & this.$('ul.list').show(); this._on_refresh(); } if (this.dialog != null) { return this.center(); } }; AssetPickerView.prototype._on_refresh = function() {}; AssetPickerView.prototype._reset = function() {}; return AssetPickerView; })(Backbone.View); }).call(this); ;TI"dependency_digest;TI"%348940fa54d75f3300c84cde753448e6;FI"required_paths;T[I"¨/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/engine-5337f0929131/app/assets/javascripts/locomotive/views/shared/asset_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/bundler/gems/engine-5337f0929131/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee;FI" mtime;TI"2014-04-10T01:06:58+02:00;TI" digest;TI"%27e3e984571c5c13f4806c59ed07ca5c;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F