o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1338216581.7557278: @value"ß{I" class:EFI"ProcessedAsset;FI"logical_path;FI"9ems/active_admin/components/jquery.aa.asset-store.js;FI" pathname;FI"‡/private/var/www/html/development/projects/rails/ems/app/assets/javascripts/ems/active_admin/components/jquery.aa.asset-store.js.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2012-05-21T12:55:11+01:00;FI" length;Fiú I" digest;F"%88a7ef1cf707337cbf189104941a778aI" source;FI"ú (function() { window.AssetStore = (function() { function AssetStore(options, el) { var defaults; this.options = options; defaults = {}; this.options = $.extend({}, defaults, options); this.el = $(el); this.items = this.el.find('.asset-item'); this._init(); } AssetStore.prototype._init = function() { this._initDel(); this._initText(); return this._initCopy(); }; AssetStore.prototype._initText = function() { var _this = this; return this.items.on('dblclick', '.asset-text', function(e) { return _this._editText($(e.target)); }); }; AssetStore.prototype._initDel = function() { var suffix, _this = this; suffix = "_destroy"; return this.items.each(function(i, el) { var $el, hid, name; $el = $(el); hid = $el.find('.asset-id-hidden').clone().val(1).attr({ "class": "asset-destroy-hidden", "id": "" }); if (!hid.length) { return false; } name = hid.attr('name').split('['); name.splice(-1, 1); name[name.length] = suffix + "]"; $el.data('assetstore-delete', hid.attr({ 'name': name.join('[') })); return _this._bindCheck($el); }); }; AssetStore.prototype._initCopy = function() { var _this = this; return this.items.each(function(i, el) { var $el; $el = $(el); return $el.find('.asset-container').zclip({ path: '/assets/ems/active_admin/lib/ZeroClipboard.swf', afterCopy: function() { return $('body').animate({ opacity: 0.7 }, 100, function() { return $('body').animate({ opacity: 1 }, 100); }); }, copy: function() { return $el.find('.asset-url').text(); } }); }); }; AssetStore.prototype._bindCheck = function($el) { var _this = this; return $el.on('change', '.asset-check', function(e) { if ($(e.target).is(':checked')) { return _this._keep($el); } else { return _this._delete($el); } }); }; AssetStore.prototype._delete = function($el) { var delEl; delEl = $el.data().assetstoreDelete; return $el.append(delEl); }; AssetStore.prototype._keep = function($el) { return $('#' + $el.data().assetstoreDelete.attr('id')).remove(); }; AssetStore.prototype._editText = function($el) { var input, _this = this; input = $(""); $el.hide().after(input); input.focus(); return input.bind('keydown', function(e) { if (e.keyCode === 13) { e.preventDefault(); _this._changeText($el, input.val()); $el.show(); return input.remove(); } }); }; AssetStore.prototype._changeText = function($el, text) { return $el.text(text).closest('.asset').find('.asset-title-hidden').val(text); }; return AssetStore; })(); (function($) { return $.widget.bridge('assetStore', window.AssetStore); })(jQuery); }).call(this); ;TI"dependency_digest;F"%0005fd57196150329e9b9779ed8e98fcI"required_paths;F[I"‡/private/var/www/html/development/projects/rails/ems/app/assets/javascripts/ems/active_admin/components/jquery.aa.asset-store.js.coffee;FI"dependency_paths;F[{I" path;FI"‡/private/var/www/html/development/projects/rails/ems/app/assets/javascripts/ems/active_admin/components/jquery.aa.asset-store.js.coffee;FI" mtime;FI"2012-05-21T12:55:11+01:00;FI" digest;F"%0157d9569e351a27cf82d8e4e5198c4bI" _version;F"%7270767b2a9e9fff880aa5de378ca791