function reloadPageAGrid(){$("#list_datatable_gridlist_Dashboard").DataTable().ajax.reload()}function reloadManualPageGrid(){$("#list_datatable_gridlist_Manual_Conversion").DataTable().ajax.reload()}var IsRenamePDFFile;$app.gridListConfig={};$app.gridListConfig.VIEW_SITES={onConfig:function(n){var t=_.find(n.columns,{data:"ConferenceId"});t.render=function(n,t,i){return i.DisplayStatus=="Open"?"<font color='green'>"+i.ConferenceId+"<\/font>":i.DisplayStatus=="Closed"?"<font color='red'>"+i.ConferenceId+"<\/font>":i.ConferenceId};t=_.find(n.columns,{data:"DisplayStatus"});t.render=function(n,t,i){return i.DisplayStatus=="Open"?"<font color='green'>"+i.DisplayStatus+"<\/font>":i.DisplayStatus=="Closed"?"<font color='red'>"+i.DisplayStatus+"<\/font>":i.DisplayStatus=="Schedule to open"?i.DisplayStatus:""};t=_.find(n.columns,{data:"ContactPerson"});t.render=function(n,t,i){return i.ContactPerson!="null"&&i.ContactPerson!=null&&i.ContactPerson!=""?'<a href="#" data-toggle="modal" onclick=$app.gridListConfig["VIEW_SITES"].showConferenceContactDialog(\''+encodeURIComponent(i.ContactPerson.replace("<","&lt;").replace(">","&gt;"))+"','"+encodeURIComponent(i.ContactEmail)+"','"+encodeURIComponent(i.ContactPhone)+"','"+encodeURIComponent(i.ContactHours)+"')>"+i.ContactPerson.replace("<","&lt;").replace(">","&gt;")+"<\/a>":i.ContactPerson};t=_.find(n.columns,{data:"Action"});t.render=function(n,t,i){return"<a href='#' style='margin-bottom: 2px;width: 35px;margin-right: 3px;' onclick=$app.gridListConfig['VIEW_SITES'].ViewSubmissionsReport('"+i.ConferenceId+"') title='View Submissions' class='btn btn-primary btn-sm'><i class='fas fa-file-upload'><\/i><\/a><a href='#' style='margin-bottom: 2px;width: 35px;margin-right: 3px;' onclick=$app.gridListConfig['VIEW_SITES'].ViewContributorsReport('"+i.ConferenceId+"') title='View Contributors' class='btn btn-primary btn-sm'><i class='fas fa-users-cog'><\/i><\/a><a href='#' style='margin-bottom: 2px;width: 35px;margin-right: 3px;' onclick=$app.gridListConfig['VIEW_SITES'].ViewStatisticsReport('"+i.ConferenceId+"','2') title='View Statistics' class='btn btn-primary btn-sm'><i class='far fa-address-card'><\/i><\/a><a href='#' style='margin-bottom: 2px;width: 35px;margin-right: 3px;' onclick=$app.gridListConfig['VIEW_SITES'].ResendSiteCreationEmail('"+i.ConferenceId+"','2') title='Resend Site Creation Email' class='btn btn-primary btn-sm'><i class='fas fa-envelope-square'><\/i><\/a><a href='#' style='margin-bottom: 2px;width: 35px;margin-right: 3px;' onclick=$app.gridListConfig['VIEW_SITES'].ResendClientInformationEmail('"+i.ConferenceId+"','2') title='Resend Client Information Email' class='btn btn-primary btn-sm'><i class='fas fa-envelope-square'><\/i><\/a><a href='#' style='margin-bottom: 2px;width: 35px;margin-right: 3px;' onclick=$app.gridListConfig['VIEW_SITES'].ViewProxyAction('"+i.ConferenceId+"') title='Organizer Proxy' class='btn btn-primary btn-sm'><i class='fa fa-bolt icon-btn'><\/i><\/a>"}},showConferenceContactDialog:function(n,t,i,r){$app.openViewDialog("Admin/ConferenceContactDetails?name="+n+"&email="+t+"&contactPhone="+i+"&contactHours="+r,{title:"Conference Contact Information"})},ViewSubmissionsReport:function(n){window.location.href=$app.hostUrl+"/Admin/SubmissionsReport?ConferenceId="+btoa(n)},ViewContributorsReport:function(n){window.location.href=$app.hostUrl+"/Admin/ContributorsReport?ConferenceId="+btoa(n)},ViewStatisticsReport:function(n){window.location.href=$app.hostUrl+"/Admin/StatisticsReport?ConferenceId="+btoa(n)},ResendSiteCreationEmail:function(n){var t=bootbox.dialog({message:"Are you sure you want to resend site creation email?",title:"Confirm",buttons:{ok:{label:"YES",className:"btn-primary",callback:function(){$app.post("/Site/ResendSiteCreationMailAsync?conferenceId="+n,"").then(function(n){n.status?$app.messageBox.success(n.flagvalue):$app.messageBox.error(n.msg)})}},cancel:{label:"NO",className:"btn-danger",callback:function(){$(t).modal("hide")}}}})},ResendClientInformationEmail:function(n){var t=bootbox.dialog({message:"Are you sure you want to resend client information email?",title:"Confirm",buttons:{ok:{label:"YES",className:"btn-primary",callback:function(){$app.post("/Site/ResendClientInfoMailAsync?conferenceId="+n,"").then(function(n){n.status?$app.messageBox.success(n.flagvalue):$app.messageBox.error(n.msg)})}},cancel:{label:"NO",className:"btn-danger",callback:function(){$(t).modal("hide")}}}})},ViewProxyAction:function(n){$app.post("/Proxy/OrganiserProxyAction?conferenceId="+n).then(function(){})}};$app.gridListConfig.SUBMISSION_REPORT={onConfig:function(n){var t=_.find(n.columns,{data:"Contributer"});t.render=function(n,t,i){return i.ContributorId!="null"&&i.ContributorId!=null&&i.ContributorId!=""?'<a href="#" data-toggle="modal" onclick=$app.gridListConfig["SUBMISSION_REPORT"].showContributorSubmissionsDialog("'+i.ContributorId+'","'+i.ConferenceId+'","'+i.FirstName+'","'+i.LastName+'") >'+i.Contributer+"<\/a>":i.Contributer};t=_.find(n.columns,{data:"ContributerEmail"});t.render=function(n,t,i){if(i.ContributerEmail!="null"&&i.ContributerEmail!=null&&i.ContributerEmail!=""){var r="mailto:"+i.ContributerEmail;return"<a href="+r+">"+i.ContributerEmail+"<\/a>"}return i.ContributerEmail};t=_.find(n.columns,{data:"Action"});t.render=function(n,t,i){var r="";return i.StatusDesc=="Pass"?r=r+"<a style='width: 35px;border: solid 2px red;margin-bottom: 2px;margin-right: 3px;' href='#'onclick=$app.gridListConfig['SUBMISSION_REPORT'].DownloadPdfPass('"+i.PaperId+"','"+i.ConferenceId+"') title='Download unapproved Pdf' class='btn btn-primary btn-sm action-btn'><i class='far fa-file-pdf'><\/i><\/a>":i.StatusDesc=="Approved"?r=r+"<a style='width:35px;margin-bottom: 2px;margin-right: 3px;' href='#'onclick=$app.gridListConfig['SUBMISSION_REPORT'].DownloadPdfPass('"+i.PaperId+"','"+i.ConferenceId+"') title='Download Pdf'  class='btn btn-primary btn-sm action-btn'><i class='far fa-file-pdf'><\/i><\/a>":i.StatusDesc=="Fail"&&(r=r+"<a style='width:35px;margin-bottom: 2px;margin-right: 3px;'  href='#'onclick=$app.gridListConfig['SUBMISSION_REPORT'].DownloadErrorFail('"+i.PaperId+"','"+i.ConferenceId+"') title='Download Error' class='btn btn-danger btn-sm action-btn'><i class='fas fa-exclamation-triangle'><\/i><\/a>"),r+"<a style='width:35px;' href='#' onclick=$app.gridListConfig['SUBMISSION_REPORT'].ViewProxyAction('"+i.ConferenceId+"','"+i.ContributorId+"','"+i.FirstName+"','"+i.LastName+"') title='Author Proxy' class='btn btn-primary btn-sm'><i class='fa fa-bolt icon-btn'><\/i><\/a>"}},DownloadPdfPass:function(n,t){$app.post("/Admin/DownloadPdf?paperId="+n+"&conferenceId="+t).then(function(n){n.status||$app.messageBox.error("File not found")})},DownloadErrorFail:function(n,t){$app.post("/Admin/DownloadError?paperId="+n+"&conferenceId="+t).then(function(n){n.status||$app.messageBox.error("File not found")})},showContributorSubmissionsDialog:function(n,t,i,r){var u=t+" Submissions for: "+i+", "+r,f={title:u};$app.openViewDialog("Admin/ContributorSubmissions?ContributorId="+n+"&ConferenceId="+t,f)},ViewProxyAction:function(n,t,i,r){$app.post("/Proxy/AuthorProxyAction?conferenceId="+n+"&contributorId="+t+"&fullName="+i+" "+r).then(function(){})}};$app.gridListConfig.CONTRIBUTOR_SUBMISSIONS_POPUP={onConfig:function(n){var t=_.find(n.columns,{data:"Action"});t.render=function(n,t,i){return i.StatusDesc=="Pass"?"<a style='width: 35px;border: solid 2px red;margin-bottom: 2px;margin-right: 3px;' href='#'onclick=$app.gridListConfig['CONTRIBUTOR_SUBMISSIONS_POPUP'].DownloadPdfPassCountributor('"+i.PaperId+"','"+i.ConferenceId+"') title='Download unapproved Pdf'  class='btn btn-primary btn-sm action-btn'><i class='far fa-file-pdf'><\/i><\/a>":i.StatusDesc=="Approved"?"<a style='width:35px;margin-bottom: 2px;margin-right: 3px;' href='#'onclick=$app.gridListConfig['CONTRIBUTOR_SUBMISSIONS_POPUP'].DownloadPdfPassCountributor('"+i.PaperId+"','"+i.ConferenceId+"') title='Download Pdf' class='btn btn-primary btn-sm action-btn'><i class='far fa-file-pdf'><\/i><\/a>":i.StatusDesc=="Fail"?"<a style='width:35px;margin-bottom: 2px;margin-right: 3px;' href='#'onclick=$app.gridListConfig['CONTRIBUTOR_SUBMISSIONS_POPUP'].DownloadErrorFailCountributor('"+i.PaperId+"','"+i.ConferenceId+"') title='Download Error' class='btn btn-danger btn-sm action-btn'><i class='fas fa-exclamation-triangle'><\/i><\/a>":""}},DownloadPdfPassCountributor:function(n,t){$app.post("/Admin/DownloadPdf?paperId="+n+"&conferenceId="+t).then(function(n){n.status||$app.messageBox.error("File not found")})},DownloadErrorFailCountributor:function(n,t){$app.post("/Admin/DownloadError?paperId="+n+"&conferenceId="+t).then(function(n){n.status||$app.messageBox.error("File not found")})}};$app.gridListConfig.CONTRIBUTOR_REPORT={onConfig:function(n){var t=_.find(n.columns,{data:"LastName"});t.render=function(n,t,i){return i.LastName!="null"&&i.LastName!=null&&i.LastName!=""?'<a href="#" data-toggle="modal" onclick=$app.gridListConfig["CONTRIBUTOR_REPORT"].showContributorSubmissionsDialog("'+i.ContributorId+'","'+i.ConferenceId+'","'+i.FirstName+'","'+i.LastName+'") >'+i.LastName+"<\/a>":i.LastName};t=_.find(n.columns,{data:"EmailAddress"});t.render=function(n,t,i){if(i.EmailAddress!="null"&&i.EmailAddress!=null&&i.EmailAddress!=""){var r="mailto:"+i.EmailAddress;return"<a href="+r+">"+i.EmailAddress+"<\/a>"}return i.EmailAddress}},showContributorSubmissionsDialog:function(n,t,i,r){var u=t+" Submissions for: "+i+", "+r,f={title:u};$app.openViewDialog("Admin/ContributorSubmissions?ContributorId="+n+"&ConferenceId="+t,f)}};$app.gridListConfig.STATISTICS_SUBMISSION_REPORT={onConfig:function(n){var t=_.find(n.columns,{data:"Action"});t.render=function(n,t,i){return i.StatusDesc=="Pass"?"<a style='width:35px;border: solid 2px red;' href='#'onclick=$app.gridListConfig['STATISTICS_SUBMISSION_REPORT'].DownloadPdfPassStatics('"+i.PaperId+"','"+i.ConferenceId+"') title='Download unapproved Pdf' class='btn btn-primary btn-sm action-btn'><i class='far fa-file-pdf'><\/i><\/a>":i.StatusDesc=="Approved"?"<a style='width:35px;' href='#'onclick=$app.gridListConfig['STATISTICS_SUBMISSION_REPORT'].DownloadPdfPassStatics('"+i.PaperId+"','"+i.ConferenceId+"') title='Download Pdf' class='btn btn-primary btn-sm action-btn'><i class='far fa-file-pdf'><\/i><\/a>":i.StatusDesc=="Fail"?"<a  style='width:35px;' href='#'onclick=$app.gridListConfig['STATISTICS_SUBMISSION_REPORT'].DownloadErrorFailStatics('"+i.PaperId+"','"+i.ConferenceId+"') title='Download Error' class='btn btn-danger btn-sm action-btn'><i class='fas fa-exclamation-triangle'><\/i><\/a>":""}},DownloadPdfPassStatics:function(n,t){$app.post("/Admin/DownloadPdf?paperId="+n+"&conferenceId="+t).then(function(n){n.status||$app.messageBox.error("File not found")})},DownloadErrorFailStatics:function(n,t){$app.post("/Admin/DownloadError?paperId="+n+"&conferenceId="+t).then(function(n){n.status||$app.messageBox.error("File not found")})}};$app.gridListConfig.STATISTICS_CONTRIBUTOR_REPORT={onConfig:function(n){var t=_.find(n.columns,{data:"LastName"});t.render=function(n,t,i){return i.LastName!="null"&&i.LastName!=null&&i.LastName!=""?'<a href="#" data-toggle="modal" onclick=$app.gridListConfig["CONTRIBUTOR_REPORT"].showContributorSubmissionsDialog("'+i.ContributorId+'","'+i.ConferenceId+'","'+i.FirstName+'","'+i.LastName+'") >'+i.LastName+"<\/a>":i.LastName};t=_.find(n.columns,{data:"EmailAddress"});t.render=function(n,t,i){if(i.EmailAddress!="null"&&i.EmailAddress!=null&&i.EmailAddress!=""){var r="mailto:"+i.EmailAddress;return"<a href="+r+">"+i.EmailAddress+"<\/a>"}return i.EmailAddress}},showContributorSubmissionsDialog:function(n,t,i,r){var u=t+" Submissions for: "+i+", "+r,f={title:u};$app.openViewDialog("Admin/ContributorSubmissions?ContributorId="+n+"&ConferenceId="+t,f)}};$app.gridListConfig.FILES_SUBMISSIONS={onConfig:function(n){var t=_.find(n.columns,{data:"Action"});t.render=function(n,t,i){var r="",u;i.Action==0&&(u="/Organiser/FilesSubmission?conferenceId="+btoa(i.ConferenceId),r="<a  href='#' style='margin-bottom: 2px;width: 35px;margin-right: 4px;'  onclick=$app.gridListConfig['FILES_SUBMISSIONS'].viewFilesSubmission('"+u+"') title='Archive files'><i class='fas fa-file-archive' style='font-size: 25px;'><\/i><\/a>");var e=new Date(i.ConferenceOpen),o=new Date(i.ConferenceClose),f=new Date;return e<=f&&o>=f&&!i.IsProxy&&(r=r+"<a  href='#' style='margin-bottom: 2px;width: 35px;margin-right: 4px;' onclick=$app.gridListConfig['FILES_SUBMISSIONS'].OrgLoginAsAuthor('"+i.ConferenceId+"') title='Upload paper'><i class='far fa fa-upload' style='font-size: 25px;'><\/i><\/a>"),r}},viewFilesSubmission:function(n){window.location.href=$app.hostUrl+n},OrgLoginAsAuthor:function(n){window.location.href=$app.hostUrl+"/Proxy/AsRoleAction?conferenceId="+n+"&fromUserRole=4&toUserRole=1"}};var fileArray=[],paperIdArray=[],fileArray1=[],paperIdArray1=[];$app.gridListConfig.FILES_SUBMISSION_DETAILS={onConfig:function(n){var t=_.find(n.columns,{data:"ConversionFilePath"});t.render=function(n,t,i){if(i.ConversionFilePath!="null"&&i.ConversionFilePath!=null&&i.ConversionFilePath!=""){var r=i.ConversionFilePath.split("\\")[i.ConversionFilePath.split("\\").length-1];return i.ConversionFileRename!="null"&&i.ConversionFileRename!=null&&i.ConversionFileRename!=""?"<a href='#' onclick=$app.gridListConfig['FILES_SUBMISSION_DETAILS'].DownloadFile('"+i.PaperId+"','"+encodeURIComponent(i.ConversionFilePath)+"') title='Download file'>"+i.ConversionFileRename+".pdf<\/a>":"<a href='#' onclick=$app.gridListConfig['FILES_SUBMISSION_DETAILS'].DownloadFile('"+i.PaperId+"','"+encodeURIComponent(i.ConversionFilePath)+"') title='Download file'>"+r+"<\/a>"}return i.ConversionFilePath};t=_.find(n.columns,{data:"FileForZip"});t.render=function(n,t,i){return(localStorage.setItem("conferenceId",i.ConferenceId),localStorage.setItem("fileList1",i.ConversionFilePath),localStorage.setItem("paperIds1",i.PaperId),(i.ZipFileName=="null"||i.ZipFileName==null||i.ZipFileName=="")&&i.ConversionFilePath!="null"&&i.ConversionFilePath!=null&&i.ConversionFilePath!="")?'<input type="checkbox" id=chk'+i.PaperId+' onclick=$app.gridListConfig["FILES_SUBMISSION_DETAILS"].chkFileSelect(\''+i.PaperId+"','"+i.ConferenceId.trim()+"','"+encodeURIComponent(i.ConversionFilePath)+"') />":""};t=_.find(n.columns,{data:"ZipFileName"});t.render=function(n,t,i){if(i.ZipFileName!="null"&&i.ZipFileName!=null&&i.ZipFileName!=""){var r=i.ZipFileName;return"<a href='#' onclick=$app.gridListConfig['FILES_SUBMISSION_DETAILS'].DownloadZipFile('"+i.PaperId+"','"+encodeURIComponent(i.ZipFilePath)+"') title='Download file'>"+r+"<\/a>"}return""};t=_.find(n.columns,{data:"Action"});t.render=function(n,t,i){return"<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['FILES_SUBMISSION_DETAILS'].RenameModalPopup('"+i.ConferenceId+"','"+i.PaperId+"','"+i.PaperInfoId+"') title='Rename PDF' class='btn btn-primary btn-sm'><i class='fa fa-edit'><\/i><\/a>"}},chkFileSelect:function(n,t,i){localStorage.setItem("conferenceId",t);$.inArray(n,paperIdArray)==-1?(paperIdArray.push(n),fileArray.push(decodeURIComponent(i))):(paperIdArray.splice($.inArray(n,paperIdArray),1),fileArray.splice($.inArray(decodeURIComponent(i),fileArray),1));localStorage.setItem("fileList",fileArray);localStorage.setItem("paperIds",paperIdArray);$("#list_datatable_gridlist_FILES_SUBMISSION_DETAILS").on("draw.dt",function(){for(var n=0;n<paperIdArray.length;n++)$("#chk"+paperIdArray[n]).attr("checked",!0)})},showContributorSubmissionsDialog:function(n,t,i){var r=t+" Submissions for: "+i,u={title:r};$app.openViewDialog("Admin/ContributorSubmissions?ContributorId="+n+"&ConferenceId="+t,u)},DownloadFile:function(n,t){$app.post("/Organiser/DownloadFile?paperId="+n+"&filepath="+decodeURIComponent(t)).then(function(n){n.status||$app.messageBox.error("File not found")})},DownloadZipFile:function(n,t){$app.post("/Organiser/DownloadZipFile?paperId="+n+"&filepath="+decodeURIComponent(t)).then(function(n){n.status||$app.messageBox.error("File not found")})},RenameModalPopup:function(n,t,i){OpenApproveRenamePopUp(n,t,i)}};IsRenamePDFFile=$("#IsRenamePDFFile").html();$app.gridListConfig.Dashboard={onConfig:function(n){var t=_.find(n.columns,{data:"ConversionFilePath"});t.render=function(n,t,i){if(i.ConversionFilePath!="null"&&i.ConversionFilePath!=null&&i.ConversionFilePath!=""){var r=i.ConversionFilePath.split("\\")[i.ConversionFilePath.split("\\").length-1];return i.ConversionFileRename!="null"&&i.ConversionFileRename!=null&&i.ConversionFileRename!=""?"<a title='Download file'>"+i.ConversionFileRename+".pdf<\/a>":"<a title='Download file'>"+r+"<\/a>"}return i.ConversionFilePath};t=_.find(n.columns,{data:"PDFAttempt"});t.render=function(n,t,i){return i.PDFAttempt+" of 10"};t=_.find(n.columns,{data:"SourceFileAttempt"});t.render=function(n,t,i){return i.SourceFileAttempt+" of 20"};t=_.find(n.columns,{data:"Action"});t.render=function(n,t,i){if(i.ConversionStatus==0)return"<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].TryAgain('"+i.PaperId+"') title='Try Again' class='btn btn-primary btn-sm clsTryAgain'><i class='fas fa-undo'><\/i><\/a><a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].UpdatePaperStatus('"+i.PaperId+"','2') title='Remove' class='btn btn-primary btn-sm'><i class='far fa-trash-alt'><\/i><\/a>";if(i.ConversionStatus==1||i.ConversionStatus==2)return"<img src='"+appRootPath+"/Content/images/ajax-loader.gif' style='width: 18px;-webkit-transform: scaleX(-1);transform: scaleX(-1);'>";if(i.ConversionStatus==3){var r="";return r="<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].DownloadPdf('"+i.PaperId+"') title='Download Pdf' class='btn btn-primary btn-sm'><i class='far fa-file-pdf'><\/i><\/a>",i.Status==0&&(r+="<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].UpdatePaperStatus('"+i.PaperId+"','1') title='Approve' class='btn btn-primary btn-sm'><i class='far fa-check-circle'><\/i><\/a>",IsRenamePDFFile=="True"&&(r+="<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].ApproveRenameModalPopup('"+i.ConferenceId+"','"+i.PaperId+"','"+i.PaperInfoId+"') title='Rename' class='btn btn-primary btn-sm'><i class='far fa-edit'><\/i><\/a>"),r+="<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].TryAgain('"+i.PaperId+"') title='Try Again' class='btn btn-primary btn-sm clsTryAgain'><i class='fas fa-undo'><\/i><\/a>",r+="<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].UpdatePaperStatus('"+i.PaperId+"','2') title='Remove' class='btn btn-primary btn-sm'><i class='far fa-trash-alt'><\/i><\/a>",r+="<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].ManualRequest('"+i.PaperId+"') title='Manual Request' class='btn btn-primary btn-sm'><i class='fas fa-file-alt'><\/i><\/a>"),r}return i.ConversionStatus==4?"<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].DownloadError('"+i.PaperId+"') title='Download Error' class='btn btn-danger btn-sm'><i class='fas fa-exclamation-triangle'><\/i><\/a><a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].TryAgain('"+i.PaperId+"') title='Try Again' class='btn btn-primary btn-sm clsTryAgain'><i class='fas fa-undo'><\/i><\/a><a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].ManualRequest('"+i.PaperId+"') title='Manual Request' class='btn btn-primary btn-sm'><i class='fas fa-file-alt'><\/i><\/a><a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].UpdatePaperStatus('"+i.PaperId+"','2') title='Remove' class='btn btn-primary btn-sm'><i class='far fa-trash-alt'><\/i><\/a>":i.ConversionStatus==5?"<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].TryAgain('"+i.PaperId+"') title='Try Again' class='btn btn-primary btn-sm clsTryAgain'><i class='fas fa-undo'><\/i><\/a><a style='margin-bottom: 2px;width: 35px;margin-right: 3px;' href='#' onclick=$app.gridListConfig['Dashboard'].ManualRequest('"+i.PaperId+"') title='Manual Request' class='btn btn-primary btn-sm'><i class='fas fa-file-alt'><\/i><\/a>":i.ConversionStatus==6?"":void 0}},UpdatePaperStatus:function(n,t){var i=bootbox.dialog({message:""+(t=="2"?"Are you sure you want to remove this paper?":"Are you sure you would like to approve the PDF? Once the file is approved, you cannot rename the PDF file. Please click Yes to approve.")+"",title:"Confirm",buttons:{ok:{label:"YES",className:"btn-primary",callback:function(){$app.post("/Home/ApproveRemovePaper?paperId="+n+"&status="+t).then(function(n){n.status?$app.messageBox.success("Paper "+(t=="2"?"removed":"approved")+" successfully",null,reloadPageAGrid):$app.messageBox.error("Error")})}},cancel:{label:"NO",className:"btn-danger",callback:function(){$(i).modal("hide")}}}})},DownloadPdf:function(n){$app.post("/Home/DownloadPdf?paperId="+n).then(function(n){n.status||$app.messageBox.error("File not found")})},DownloadError:function(n){$app.post("/Home/DownloadError?paperId="+n).then(function(n){n.status||$app.messageBox.error("File not found")})},TryAgain:function(n){OpenModelPopup(n)},ManualRequest:function(n){window.location.href=$app.hostUrl+"/ManualConversion/MRequest?paperId="+n},ApproveRenameModalPopup:function(n,t,i){OpenApproveRenamePopUp(n,t,i)},DownloadFile:function(n,t){$app.post("/Organiser/DownloadFile?paperId="+n+"&filepath="+decodeURIComponent(t)).then(function(n){n.status||$app.messageBox.error("File not found")})}};$app.gridListConfig.Manual_Conversion={onConfig:function(n){var t=_.find(n.columns,{data:"UploadFileName"});t.render=function(n,t,i){return i.UploadFileName!=0||i.UploadFileName!=null?"<a href='#' onclick=$app.gridListConfig['Manual_Conversion'].Downloadfile('"+encodeURIComponent(i.UploadFilePath)+"') title='Download File''>"+i.UploadFileName+"<\/a>":""};t=_.find(n.columns,{data:"Action"});t.render=function(n,t,i){var r="";return r+=i.ManualConversionStatus==1||i.ManualConversionStatus==2?"<img src='"+appRootPath+"/Content/images/ajax-loader.gif' style='margin-bottom: 2px;margin-right: 3px;width: 18px;-webkit-transform: scaleX(-1);transform: scaleX(-1);'>":"<a href='#' style='margin-bottom: 2px;width: 35px;margin-right: 3px;' onclick=OpenModelPopup('"+encodeURIComponent(i.PaperInfoId)+"','"+encodeURIComponent(i.UploadFilePath)+"','"+encodeURIComponent(i.UploadProcessId)+"','"+encodeURIComponent(i.PaperId)+"') title='Upload Output File' class='btn btn-primary btn-sm'><i class='far fa fa-upload'><\/i><\/a>",i.LastConversionStatus==4&&(r+="<a href='#'style='margin-bottom: 2px;width: 35px;margin-right: 3px;' onclick=$app.gridListConfig['Manual_Conversion'].DownloadAuthorError('"+encodeURIComponent(i.ConversionFilePath)+"') title='Download Error' class='btn btn-danger btn-sm action-btn'><i class='fas fa-exclamation-triangle'><\/i><\/a>"),i.LastConversionStatus==3&&(r+="<a style='margin-bottom: 2px;width: 35px;margin-right: 3px;border: solid 2px red;' href='#'onclick=$app.gridListConfig['Manual_Conversion'].Downloadfile('"+encodeURIComponent(i.ConversionFilePath)+"') title='Download File' class='btn btn-primary btn-sm action-btn'><i class='far fa-file-pdf'><\/i><\/a>"),i.ManualConversionStatus==3&&(r+="<a style='margin-bottom: 2px;margin-right: 3px;' href='#'onclick=$app.gridListConfig['Manual_Conversion'].Downloadfile('"+encodeURIComponent(i.ManualConversionFilePath)+"') title='Download File' class='btn btn-primary btn-sm action-btn'>MPass<\/a>",r+="<a style='margin-bottom: 2px;margin-right: 3px;' href='#'onclick=$app.gridListConfig['Manual_Conversion'].RevertBack('"+i.PaperId+"','"+i.ManualConversionId+"','"+encodeURIComponent(i.ManualConversionFilePath)+"') title='Forword back to author' class='btn btn-primary btn-sm action-btn'><i class='fa fa-arrow-left'><\/i><\/a>"),i.ManualConversionStatus==4&&(r+="<a href='#'style='margin-bottom: 2px;margin-right: 3px;' onclick=$app.gridListConfig['Manual_Conversion'].DownloadError('"+i.PaperInfoId+"') title='Download File' class='btn btn-danger btn-sm action-btn'>MFail<\/a>"),r}},DownloadAuthorError:function(n){$app.post("/ManualConversion/DownloadAuthorError?filepath="+n).then(function(n){n.status||$app.messageBox.error("File not found")})},DownloadAuthorUploadfile:function(n){$app.post("/ManualConversion/DownloadAuthorUploadfile?filepath="+decodeURIComponent(n)).then(function(n){n.status||$app.messageBox.error("File not found")})},DownloadError:function(n){$app.post("/ManualConversion/DownloadError?paperInfoId="+n).then(function(n){n.status||$app.messageBox.error("File not found")})},Downloadfile:function(n){$app.post("/ManualConversion/DownloadFile?filepath="+decodeURIComponent(n)).then(function(n){n.status||$app.messageBox.error("File not found")})},RevertBack:function(n,t,i){var r={PaperId:n,ManualConversionId:t,ConversionFilePath:decodeURIComponent(i)};$app.post("/ManualConversion/SendFileToAuthor",r).then(function(n){n.status?$app.messageBox.success("Data has been saved successfully",null,reloadManualPageGrid):$app.messageBox.error("Error in saving data",null,reloadManualPageGrid)})}};$app.gridListConfig.QUEUE={onConfig:function(n){var t=_.find(n.columns,{data:"PDFAttempt"});t.render=function(n,t,i){return i.PDFAttempt+" of 10"};t=_.find(n.columns,{data:"SourceFileAttempt"});t.render=function(n,t,i){return i.SourceFileAttempt+" of 20"}}};$app.gridListConfig.Site_Report={onConfig:function(n){var t=_.find(n.columns,{data:"AuthorLastName"});t.render=function(n,t,i){return i.AuthorEmailId!="null"&&i.AuthorEmailId!=null&&i.AuthorEmailId!=""?'<a href="#" data-toggle="modal" onclick=$app.gridListConfig["Site_Report"].showOrganoserSiteContactDialog(\''+encodeURIComponent(i.AuthorEmailId)+"')>"+i.AuthorLastName+"<\/a>":i.AuthorLastName};t=_.find(n.columns,{data:"PaperTitle"});t.render=function(n,t,i){return i.ConversionFilePath!="null"&&i.ConversionFilePath!=null&&i.ConversionFilePath!=""?'<a href="#" data-toggle="modal" onclick=$app.gridListConfig["Site_Report"].DownloadPdfPassSiteReport(\''+i.PaperId+"','"+i.ConferenceId+"')>"+i.PaperTitle+"<\/a>":i.PaperTitle}},showOrganoserSiteContactDialog:function(n){$app.openViewDialog("Organiser/GetSiteReportAuhtorDetails?email="+decodeURIComponent(n),{title:"Author Contact Information"})},DownloadPdfPassSiteReport:function(n,t){$app.post("/Organiser/DownloadPdf?paperId="+n+"&conferenceId="+t).then(function(n){n.status||$app.messageBox.error("File not found")})}}