Sha256: 9816cd36b52199b23021eb65ed639382dd890836ee8dd80590a7d7fb9338b458

Contents?: true

Size: 375 Bytes

Versions: 12

Compression:

Stored size: 375 Bytes

Contents

$(document).ready(function() {
	
	// automatic slug from  name
	$('#content_type_name').keypress(function() {
		var input = $(this);
		var slug = $('#content_type_slug');
	
		if (!slug.hasClass('filled')) {
			setTimeout(function() {
				slug.val(makeSlug(input.val()));
			}, 50);
		}
	});
	
	$('#content_type_slug').keypress(function() { $(this).addClass('filled'); });
});

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
locomotive_cms-0.0.3.3 public/javascripts/admin/content_types.js
locomotive_cms-0.0.3.1 public/javascripts/admin/content_types.js
locomotive_cms-0.0.2.9 public/javascripts/admin/content_types.js
locomotive_cms-0.0.2.8 public/javascripts/admin/content_types.js
locomotive_cms-0.0.2.7 public/javascripts/admin/content_types.js
locomotive_cms-0.0.2.6 public/javascripts/admin/content_types.js
locomotive_cms-0.0.2.5 public/javascripts/admin/content_types.js
locomotive_cms-0.0.2.4 public/javascripts/admin/content_types.js
locomotive_cms-0.0.2.3 public/javascripts/admin/content_types.js
locomotive_cms-0.0.2.2 public/javascripts/admin/content_types.js
locomotive_cms-0.0.2.1 public/javascripts/admin/content_types.js
locomotive_cms-0.0.2 public/javascripts/admin/content_types.js