js.single-mapping-project.min.js Maven / Gradle / Ivy
(function(c,b){function d(h,e,g){showSpinner();var f="";if(g){c.each(g,function(i,j){f+=''})}c('").appendTo("body").submit()}function a(){c.post(b.getContextUrl()+"/firstattributemapping",{mappingProjectId:c('input[name="mappingProjectId"]').val(),target:c('input[name="target"]').val(),skipAlgorithmStates:["DISCUSS","CURATED"]},function(e){if(e.length!==0){b.createAlert([{message:'The next attribute to map is '+e.targetAttribute+'. "Target '+e.target+'", "Source '+e.source+'"'}],"info");c("#nextAttributeMaping").on("click",function(){d("get",b.getContextUrl()+"/attributeMapping",e)})}})}c(function(){var e=c("table.scroll"),g=e.find("tbody tr:first").children(),f;c(".ace.readonly").each(function(){var i=c(this).attr("id"),h=ace.edit(i);h.setTheme("ace/theme/eclipse");h.getSession().setMode("ace/mode/javascript");h.setReadOnly(true);h.renderer.setShowGutter(false);h.setHighlightActiveLine(false)});c("form.verify").submit(function(){var h=this;bootbox.confirm("Are you sure?",function(i){if(i){h.submit()}});return false});c("#submit-new-source-column-btn").click(function(){c("#create-new-source-form").submit()});c("#create-integrated-entity-btn").click(function(){c("#create-integrated-entity-form").submit()});c('select[name="source"]').select2();a();c(window).resize(function(){f=g.map(function(){return c(this).width()}).get();e.find("thead tr").children().each(function(j,h){c(h).width(f[j])})}).resize();c.validator.addMethod("regex",function(k,h,j){var i=new RegExp(j);return this.optional(h)||i.test(k)},"Please check your input.");c("#newIntegratedDatasetForm").validate()})}($,window.top.molgenis=window.top.molgenis||{}));