Commit 0642caca authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Update minified js

parent 3f14c714
......@@ -146,7 +146,7 @@ dgenies.result.export.save_file(blob,"svg")},0)};/**
* Export query like reference fasta file (standalone mode)
*/dgenies.result.export.export_query_as_reference_fasta_standalone=function(){dgenies.show_loading("Building file...",180);window.setTimeout(()=>{dgenies.post(`/build-query-as-reference/${dgenies.result.id_res}`,{},function(data,success){if(data["success"]){let export_div=$("div#export-pict");export_div.html("");export_div.append($("<a>").attr("href",`/get-query-as-reference/${dgenies.result.id_res}`).attr("download",`as_reference_${d3.boxplot.name_y}.fasta`).attr("id","my-download").text("download"));document.getElementById("my-download").click();dgenies.hide_loading()}else{dgenies.notify(`An error has occurred. Please contact the support`,"danger")}})},0)};/**
* Download offline viewer
*/dgenies.result.export.export_offline_viewer=function(){dgenies.show_loading("Building file...",180);window.setTimeout(()=>{let export_div=$("div#export-pict");export_div.html("");export_div.append($("<a>").attr("href",`/viewer/${dgenies.result.id_res}`).attr("download",dgenies.result.id_res+".html").attr("id","my-download").text("download"));dgenies.hide_loading();document.getElementById("my-download").click()})};/**
*/dgenies.result.export.export_offline_viewer=function(){dgenies.show_loading("Building file...",180);window.setTimeout(()=>{dgenies.post(`/summary/${dgenies.result.id_res}`,{},function(data){dgenies.hide_loading();if(data["success"]){if(data["status"]==="done"){let export_div=$("div#export-pict");export_div.html("");export_div.append($("<a>").attr("href",`/viewer/${dgenies.result.id_res}`).attr("download",dgenies.result.id_res+".html").attr("id","my-download").text("download"));dgenies.hide_loading();document.getElementById("my-download").click()}else if(data["status"]==="waiting"){dgenies.result.export.export_offline_viewer()}}else{dgenies.notify(data["message"]||"An error occurred! Please contact us to report the bug","danger")}})},0)};/**
* Manage exports
*/dgenies.result.export.export=function(){let select=$("form#export select");let selection=parseInt(select.val());window.setTimeout(()=>{if(selection>0){let async=false;if(selection===1){dgenies.result.export.export_svg();async=true}else if(selection===2){dgenies.result.export.export_png();async=true}else if(selection===3)dgenies.result.export.export_paf();else if(selection===4){dgenies.result.export.ask_export_fasta();async=true}else if(selection===5){dgenies.result.export.export_association_table()}else if(selection===6){dgenies.result.export.export_no_association_file("query");async=true}else if(selection===7){dgenies.result.export.export_no_association_file("target");async=true}else if(selection===8){if(dgenies.mode==="webserver"){dgenies.result.export.export_query_as_reference_fasta_webserver()}else{dgenies.result.export.export_query_as_reference_fasta_standalone();async=true}}else if(selection===9){dgenies.result.export.export_backup_file();async=true}else if(selection===10){dgenies.result.export.export_offline_viewer();async=true}else dgenies.notify("Not supported yet!","danger",2000);if(!async)dgenies.hide_loading();select.val("0")}},0)};if(!dgenies||!dgenies.result){throw"dgenies.result wasn't included!"}dgenies.result.summary={};dgenies.result.summary.percents={};/**
* Show summary window
......
......@@ -63,7 +63,7 @@ dgenies.result.export.save_file(blob,"svg")},0)};/**
* Export query like reference fasta file (standalone mode)
*/dgenies.result.export.export_query_as_reference_fasta_standalone=function(){dgenies.show_loading("Building file...",180);window.setTimeout(()=>{dgenies.post(`/build-query-as-reference/${dgenies.result.id_res}`,{},function(data,success){if(data["success"]){let export_div=$("div#export-pict");export_div.html("");export_div.append($("<a>").attr("href",`/get-query-as-reference/${dgenies.result.id_res}`).attr("download",`as_reference_${d3.boxplot.name_y}.fasta`).attr("id","my-download").text("download"));document.getElementById("my-download").click();dgenies.hide_loading()}else{dgenies.notify(`An error has occurred. Please contact the support`,"danger")}})},0)};/**
* Download offline viewer
*/dgenies.result.export.export_offline_viewer=function(){dgenies.show_loading("Building file...",180);window.setTimeout(()=>{let export_div=$("div#export-pict");export_div.html("");export_div.append($("<a>").attr("href",`/viewer/${dgenies.result.id_res}`).attr("download",dgenies.result.id_res+".html").attr("id","my-download").text("download"));dgenies.hide_loading();document.getElementById("my-download").click()})};/**
*/dgenies.result.export.export_offline_viewer=function(){dgenies.show_loading("Building file...",180);window.setTimeout(()=>{dgenies.post(`/summary/${dgenies.result.id_res}`,{},function(data){dgenies.hide_loading();if(data["success"]){if(data["status"]==="done"){let export_div=$("div#export-pict");export_div.html("");export_div.append($("<a>").attr("href",`/viewer/${dgenies.result.id_res}`).attr("download",dgenies.result.id_res+".html").attr("id","my-download").text("download"));dgenies.hide_loading();document.getElementById("my-download").click()}else if(data["status"]==="waiting"){dgenies.result.export.export_offline_viewer()}}else{dgenies.notify(data["message"]||"An error occurred! Please contact us to report the bug","danger")}})},0)};/**
* Manage exports
*/dgenies.result.export.export=function(){let select=$("form#export select");let selection=parseInt(select.val());window.setTimeout(()=>{if(selection>0){let async=false;if(selection===1){dgenies.result.export.export_svg();async=true}else if(selection===2){dgenies.result.export.export_png();async=true}else if(selection===3)dgenies.result.export.export_paf();else if(selection===4){dgenies.result.export.ask_export_fasta();async=true}else if(selection===5){dgenies.result.export.export_association_table()}else if(selection===6){dgenies.result.export.export_no_association_file("query");async=true}else if(selection===7){dgenies.result.export.export_no_association_file("target");async=true}else if(selection===8){if(dgenies.mode==="webserver"){dgenies.result.export.export_query_as_reference_fasta_webserver()}else{dgenies.result.export.export_query_as_reference_fasta_standalone();async=true}}else if(selection===9){dgenies.result.export.export_backup_file();async=true}else if(selection===10){dgenies.result.export.export_offline_viewer();async=true}else dgenies.notify("Not supported yet!","danger",2000);if(!async)dgenies.hide_loading();select.val("0")}},0)};
if(!dgenies||!dgenies.result){throw"dgenies.result wasn't included!"}dgenies.result.summary={};dgenies.result.summary.percents={};/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment