o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1416672640.271839: @value"Œ{I" class:ETI"ProcessedAsset;FI"logical_path;TI"!locomotive/editable_field.js;FI" pathname;TI"ˆ/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/vendor/assets/javascripts/locomotive/editable_field.js;FI"content_type;TI"application/javascript;TI" mtime;TI"2014-11-22T16:47:37+01:00;TI" length;Ti¨I" digest;TI"%1135976c9bcb73c1fb18ad8dc9b0f710;FI" source;TI"¨/** * 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)) }); } }); } ; ;TI"dependency_digest;TI"%1241724c5fbb37927b81ef7a38e3856a;FI"required_paths;T[I"ˆ/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/vendor/assets/javascripts/locomotive/editable_field.js;FI"dependency_paths;T[{I" path;TI"ˆ/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/vendor/assets/javascripts/locomotive/editable_field.js;FI" mtime;TI"2014-11-22T16:47:37+01:00;TI" digest;TI"%c7ed0c8d53c0764333c2e0b992d72b36;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F