gitlabhq/app/views/projects/edit.html.haml
2012-01-28 16:47:55 +02:00

30 lines
770 B
Plaintext

= render "project_head"
%h3 Edit Project
%hr
= render "projects/form"
%div{ :class => "ajax_loader", :style => "display:none;height:200px;"}
%center
= image_tag "ajax-loader.gif", :class => "append-bottom"
%h3.prepend-top Saving project & repository. Please wait...
: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(){
$('.edit_project').live('ajax:before', function() {
$(this).hide();
$('.ajax_loader').show();
});
$('form #project_default_branch').chosen();
})