2012-03-26 21:41:58 +03:00
|
|
|
function Projects() {
|
|
|
|
$("#project_name").live("change", function(){
|
|
|
|
var slug = slugify($(this).val());
|
|
|
|
$("#project_code").val(slug);
|
|
|
|
$("#project_path").val(slug);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('.new_project, .edit_project').live('ajax:before', function() {
|
|
|
|
$('.project_new_holder, .project_edit_holder').hide();
|
2012-08-30 22:15:34 +03:00
|
|
|
$('.save-project-loader').show();
|
2012-03-26 21:41:58 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
$('form #project_default_branch').chosen();
|
2012-08-30 22:15:34 +03:00
|
|
|
|
|
|
|
disableButtonIfEmtpyField("#project_name", ".project-submit")
|
2012-03-26 21:41:58 +03:00
|
|
|
}
|
2012-09-03 22:30:14 +03:00
|
|
|
|
|
|
|
function initGitCloneSwitcher() {
|
|
|
|
var link_sel = ".project_clone_holder button";
|
|
|
|
$(link_sel).bind("click", function(e) {
|
|
|
|
$(link_sel).removeClass("active");
|
|
|
|
$(this).addClass("active");
|
|
|
|
$("#project_clone").val($(this).attr("data-clone"));
|
|
|
|
})
|
|
|
|
}
|