PageRenderTime 12ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/templates/page/create.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 14 lines | 13 code | 1 blank | 0 comment | 2 complexity | 0f42fa4fe927bd92648123dcbae20eb5 MD5 | raw file
 1<%inherit file="/form.mako"/>
 2
 3<%def name="javascripts()">
 4${parent.javascripts()}
 5<script type="text/javascript">
 6$(function(){
 7    var page_name = $("input[name=page_title]");
 8    var page_slug = $("input[name=page_slug]");
 9    page_name.keyup(function(){
10        page_slug.val( $(this).val().replace(/\s+/g,'-').replace(/[^a-zA-Z0-9\-]/g,'').toLowerCase() )
11    });    
12})
13</script>
14</%def>