Merge branch 'feature_311'
This commit is contained in:
commit
fb3815b28a
|
@ -58,14 +58,14 @@
|
||||||
= link_to 'Remove', @project, :confirm => 'Are you sure?', :method => :delete, :class => "red-button"
|
= link_to 'Remove', @project, :confirm => 'Are you sure?', :method => :delete, :class => "red-button"
|
||||||
|
|
||||||
|
|
||||||
:javascript
|
|
||||||
$('.new_project, .edit_project').bind('ajax:before', function() {
|
|
||||||
$(this).find(".form_content").hide();
|
|
||||||
$('.ajax_loader').show();
|
|
||||||
});
|
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
$(function(){
|
$(function(){
|
||||||
|
$('.new_project, .edit_project').bind('ajax:before', function() {
|
||||||
|
$(this).find(".form_content").hide();
|
||||||
|
$('.ajax_loader').show();
|
||||||
|
});
|
||||||
|
|
||||||
taggifyForm();
|
taggifyForm();
|
||||||
|
|
||||||
$('form #project_default_branch').chosen();
|
$('form #project_default_branch').chosen();
|
||||||
})
|
})
|
||||||
|
|
|
@ -8,3 +8,16 @@
|
||||||
|
|
||||||
%div.clear
|
%div.clear
|
||||||
= render 'form'
|
= render 'form'
|
||||||
|
|
||||||
|
:javascript
|
||||||
|
$(function(){
|
||||||
|
$("#project_name").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();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue