diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-03-26 21:41:58 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-03-26 21:41:58 +0300 |
commit | 7d56a51bdcffa2413a68779e4899e8139c1ba4f9 (patch) | |
tree | 7dcb80148a424b21cd4791ca22da59819f5be0d3 /app/views/projects/new.html.haml | |
parent | f1c534c68eecf68c72ce401e30c3d7d846052885 (diff) | |
download | gitlab-ce-7d56a51bdcffa2413a68779e4899e8139c1ba4f9.tar.gz |
Js refactoring and ajax animation replaced
Diffstat (limited to 'app/views/projects/new.html.haml')
-rw-r--r-- | app/views/projects/new.html.haml | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 5883e7b8890..3f3d51d038a 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -1,28 +1,11 @@ -%h3 New Project -%hr -= render 'form' -%div{ :class => "ajax_loader", :style => "display:none;height:200px;"} +.project_new_holder + %h3 New Project + %hr + = render 'form' +%div.ajax_loader.hide %center - = image_tag "ajax-loader.gif", :class => "append-bottom" + %div.padded= image_tag "ajax_loader.gif" %h3.prepend-top Creating project & repository. Please wait for few minutes :javascript - $(function(){ - $("#project_name").live("change", function(){ - var slug = slugify($(this).val()); - $("#project_code").val(slug); - $("#project_path").val(slug); - }); - }); - - function slugify(text) { - return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase(); - } - - $(function(){ - $('.new_project').live('ajax:before', function() { - $(this).hide(); - $('.ajax_loader').show(); - }); - $('form #project_default_branch').chosen(); - }) + $(function(){ new Projects(); }); |