o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1381142250.060823: @value"E{I" class:EFI"ProcessedAsset;FI"logical_path;FI"!locomotive/editable_field.js;TI" pathname;FI"}/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.1.0/vendor/assets/javascripts/locomotive/editable_field.js;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-10-07T10:55:41+02:00;FI" length;Fi¨I" digest;F"%1135976c9bcb73c1fb18ad8dc9b0f710I" source;FI"¨/** * Version 0.0.1 * tiny effect to display an input field when clicking on a label * Didier Lafforgue */ $.fn.editableField = function(settings) { var destroy = false; if ('destroy' == settings) { destroy = true } else { settings = $.extend({}, settings); } function getText(element) { if (element.is('select')) { return element[0].options[element[0].options.selectedIndex].text; } else { return element.val(); } } return this.each(function() { if (destroy) { $(this).unbind('mouseenter').unbind('mouseleave'); $(this).prev('.editable').unbind('click').remove(); } else { var input = $(this).hide(); var label = $('').addClass('editable').html(getText(input)); var timer = null; input.before(label); label.bind('click', function() { label.hide(); input.show().focus(); }); input.hover(function() { clearTimeout(timer); }, function() { timer = setTimeout(function() { input.hide(); label.show() }, 1000); }).change(function() { input.hide(); label.show().html(getText(input)) }); } }); } ; ;FI"dependency_digest;F"%1241724c5fbb37927b81ef7a38e3856aI"required_paths;F[I"}/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.1.0/vendor/assets/javascripts/locomotive/editable_field.js;TI"dependency_paths;F[{I" path;FI"}/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.1.0/vendor/assets/javascripts/locomotive/editable_field.js;TI" mtime;FI"2013-10-07T10:55:41+02:00;FI" digest;F"%c7ed0c8d53c0764333c2e0b992d72b36I" _version;F"%ffd318ca8b794f42f5029101c2cf5d91