Skip to content
Snippets Groups Projects
Commit f08c03fe authored by Hottlet Valentin's avatar Hottlet Valentin
Browse files

Add reset and example-handling for selection and deamidation

parent 948940b5
Branches
No related tags found
1 merge request!8Tests docker
......@@ -137,6 +137,30 @@ $(document).on("click", "#example-allpeptides", function() {
});
});
$(document).on("click", "#example-selection", function() {
$('#main').load(soft+'craft-selection.php #center', function(){
$("input[name='job_name']").val("example_selection");
$("#peptide_input").hide();
$("#peptide_input input").attr("required", false);
$("#peptide_example").show();
$("input[name='craft-example']").attr("checked", true);
$("#spectra_input").hide();
$("#spectra_input input").attr("required", false);
$("#spectra_example").show();
});
});
$(document).on("click", "#example-deamidation", function() {
$('#main').load(soft+'craft-deamidation.php #center', function(){
$("input[name='job_name']").val("example_deamidation");
$("#peptide_input").hide();
$("#peptide_input input").attr("required", false);
$("#peptide_example").show();
$("input[name='craft-example']").attr("checked", true);
});
});
$(document).on("click", "#back_to_normal", function() {
if ($("input[name='job_name']").val() == "example_1") {
......
......@@ -16,6 +16,8 @@ resetForm("#reset", "form.php")
resetForm("#reset-craft-h", "craft-homology.php")
resetForm("#reset-craft-f", "craft-fillin.php")
resetForm("#reset-craft-a", "craft-allpeptides.php")
resetForm("#reset-craft-s", "craft-selection.php")
resetForm("#reset-craft-d", "craft-deamidation.php")
function formSubmit(formSelector, paramIndex) {
$(document).on("submit", formSelector, function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment