[#369] remove old js code

This commit is contained in:
Alexander Machehin 2014-11-18 21:25:50 +05:00
parent 544812ce34
commit 3f283d6b45
1 changed files with 0 additions and 37 deletions

View File

@ -1,37 +0,0 @@
$(document).ready(function() {
var projects_list = $('.form.mass_build #mass_build_projects_list');
var repositories = $(".form.mass_build .left input:checkbox");
repositories.click(function(){
if (this.checked){
$(this).attr('disabled',true);
$.ajax({
type: 'GET',
url: $(this).attr('href'),
success: function(data){
var text = projects_list.val();
if(text.length > 0 && text.slice(-1) != '\n') {text = text + "\n"}
projects_list.val(text+data);
},
error: function(data){
alert('Error :(') // TODO remove
}
});
}
return true;
});
projects_list.keyup(function(){
if($(this).val().length == 0) {
repositories.attr('disabled',false)
.attr('checked', false);
}
});
var autocomplete_repos = $('.autocomplete-form.extra_repositories #extra_repositories');
var default_autocomplete_path = $('#autocomplete_extra_repos_path').val();
$('#mass_build_build_for_platform_id').on('change', function() {
var path = default_autocomplete_path + '&build_for_platform_id=' + $(this).val();
autocomplete_repos.attr('data-autocomplete', path);
});
$('#mass_build_build_for_platform_id').trigger('change');
});