2010-05-24 00:18:23 +00:00
|
|
|
$(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() {
|
2010-06-10 13:30:22 +00:00
|
|
|
slug.val(makeSlug(input.val()));
|
2010-05-24 00:18:23 +00:00
|
|
|
}, 50);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#content_type_slug').keypress(function() { $(this).addClass('filled'); });
|
|
|
|
});
|