Rename projects.js to projects.js.coffee
This commit is contained in:
parent
d6ea70c9b6
commit
c1ff89fa2a
1 changed files with 0 additions and 0 deletions
25
app/assets/javascripts/projects.js.coffee
Normal file
25
app/assets/javascripts/projects.js.coffee
Normal file
|
@ -0,0 +1,25 @@
|
|||
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();
|
||||
$('.save-project-loader').show();
|
||||
});
|
||||
|
||||
$('form #project_default_branch').chosen();
|
||||
|
||||
disableButtonIfEmtpyField("#project_name", ".project-submit")
|
||||
}
|
||||
|
||||
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"));
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue