public/javascripts/admin/pages.js in locomotive_cms-0.0.3.1 vs public/javascripts/admin/pages.js in locomotive_cms-0.0.3.3

- old
+ new

@@ -29,9 +29,22 @@ $.growl('success', data.notice); }, 'json'); } }); + // templatized feature + + $.subscribe('toggle.page_templatized.checked', function(event, data) { + $('#page_slug_input').hide(); + $('#page_content_type_id_input').show(); + }, []); + + $.subscribe('toggle.page_templatized.unchecked', function(event, data) { + $('#page_slug_input').show(); + $('#page_slug').val(makeSlug($('#page_title').val())).addClass('touched'); + $('#page_content_type_id_input').hide(); + }, []); + // automatic slug from page title $('#page_title').keypress(function() { var input = $(this); var slug = $('#page_slug'); \ No newline at end of file