o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1381401964.8958468: @value"<{I" class:EFI"ProcessedAsset;FI"logical_path;FI"locomotive/slugify.js;TI" pathname;FI"v/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/vendor/assets/javascripts/locomotive/slugify.js;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-10-10T12:39:18+02:00;FI" length;Fi»I" digest;F"%8c5472973060641a137c82dbbb69cb27I" source;FI"»/** * Version 0.0.1 * Fill in an input field from another one (source) * and apply a filter on the string (slugify) * Didier Lafforgue */ $.fn.slugify = function(settings) { settings = $.extend({ sep: '-', url: null, underscore: false }, settings); var target = $(settings.target); target.data('touched', (target.val() != '')); var makeSlug = function(event) { var source = $(this); if (settings.url != null) { // Ajax call instead meaning rely on the server to get the slugified version of the field params = { 'string': source.val(), 'underscore': (settings.underscore ? '1' : '0') }; jQuery.getJSON(settings.url, params, function(data, textStatus, jqXHR) { var newVal = data['value'] if (!target.data('touched')) { target.val(newVal); target.trigger('change'); } }); } else { var newVal = source.val().slugify(settings.sep); if (!target.data('touched')) { target.val(newVal); target.trigger('change'); } } } target.bind('keyup', function(event) { $(this).data('touched', ($(this).val() != '')); }); return $(this).bind('keyup', makeSlug); }; ;FI"dependency_digest;F"%7afbd8a24f83fd8f4f5463599cef12cdI"required_paths;F[I"v/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/vendor/assets/javascripts/locomotive/slugify.js;TI"dependency_paths;F[{I" path;FI"v/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/vendor/assets/javascripts/locomotive/slugify.js;TI" mtime;FI"2013-10-10T12:39:18+02:00;FI" digest;F"%d3f91d477e03a8ca4945db629ab085ecI" _version;F"%ffd318ca8b794f42f5029101c2cf5d91