CINXE.COM

Nomination Management — Academia Europaea

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Nomination Management — Academia Europaea</title> <link rel="stylesheet" href="themes/base/jquery-ui.css" /> <link rel="stylesheet" href="css/screen.css" /> <link rel="stylesheet" type="text/css" href="datatables/jquery.dataTables.min.css" /> <script type="text/javascript" src="base_form.js"></script> <script type="text/javascript" src="jquery-3.6.4.min.js"></script> <script type="text/javascript" src="jquery-ui-1.13.2/jquery-ui.min.js"></script> <script type="text/javascript" src="datatables/jquery.dataTables.min.js"></script> <script type="text/javascript"> $(function() { nomination_management = new BaseForm("", document.querySelector("form"), "ACAD"); nomination_management.createNewFormData = function() { console.info("createNewFormData", this.credentials.group); var sfx = this.form.name.substring(this.form.name.lastIndexOf("_") + 1); this.sfx = sfx; var frmName = "membership_nomination_" + sfx; this.targetFormName = frmName; var me = this; var section = "%"; this.partXhr(function(md) { console.info(md); me.schema = md; var section_list = md.field.section? md.field.section.enum : []; me.group2sect = {}; me.sect2label = {}; setText(document, "#memberName", this.credentials.user); setText(document, "#memberType", this.credentials.membership.toLowerCase() + " academia europaea member"); for (var i = 0; i < section_list.length; i++) { me.group2sect[section_list[i].group] = section_list[i].value; me.sect2label[section_list[i].value] = section_list[i].label; if (me.credentials.group.indexOf(section_list[i].group) >= 0) { me.partXhr(function(sectdata) { console.info("sectiondata",sectdata); if (!sectdata.ikeys) return; for (var j = 0; j < sectdata.ikeys.length; j++) { me.xhr(-1, function(r) { me.sectionItem(r); return true; }, undefined, "GET", me.rootPath + "data/" + frmName + ".json?ikey=" + encodeURIComponent(sectdata.ikeys[j])); } }, undefined, "GET", me.rootPath + "data/query/" + frmName + "?query=" + encodeURIComponent(JSON.stringify({field:"section",query:section_list[i].value}))); } } for (var ikey in me.credentials.ikey) { if (me.credentials.ikey[ikey].form == frmName) { me.xhr(-1, function(r) { if (r.reference) me.coItem(r); else me.myItem(r); return true; }, undefined, "GET", me.rootPath + "data/" + frmName + ".json?ikey=" + encodeURIComponent(ikey)); } } }, undefined, "GET", this.rootPath + "metadata/" + frmName + ".json"); } var fmtDate = function(d) { if (d.constructor == String) d = new Date(d); return d.toLocaleString(); } nomination_management.nomineeData = function(elem, item, insertInto) { console.info("nomineeDatas",elem, item); this.nomineeData[item.ikey] = item; var d = item.data; var isChair = ["SUBMITTED", "REFERENCES", "FINISHED"].indexOf(item.status) >= 0; var state = isChair? "submitted" : "draft saved"; var conom = "pending authorization by"; if (item.refStatus == "ACCEPTED") conom = "supported by"; if (item.refStatus == "DECLINED") conom = "support DECLINED by"; if (isChair) conom = "supported by"; var nom1 = this.schema.field.nominator2.enum.filter((v)=>v.value == d.nominator1); var nom2 = this.schema.field.nominator2.enum.filter((v)=>v.value == d.nominator2); var nomName = ""; if (d.title) nomName += d.title + " "; if (d.firstName) nomName += d.firstName + " "; if (d.familyName) nomName += d.familyName + " "; if (nomName == "") nomName = "[no name specified]"; var sort = (d.familyName||"~") + " " + (d.firstName||"~"); elem.dataset.sort = sort; setText(elem, ".Nominee", nomName); setText(elem, ".Section", this.sect2label[item.section ]); setText(elem, ".NominationStatus .State", state); var bdate = new Date(); var deltaT = bdate.getTime() - new Date(item.serverDate).getTime(); var adjTm = function(dateStr) { return new Date(new Date(dateStr).getTime() + deltaT); } /*console.info("SERVER", item.serverDate, "BROWSER", bdate, "DIFF", deltaT, "LAST", item.storedDate);*/ var subm = null; for(const cpy of item.copies) { if(["SUBMITTED", "FINISHED"].indexOf(cpy.status) >= 0) { subm = cpy; } } var submstate = isChair? "" : subm? "submitted on " + fmtDate(adjTm(subm.created)) : ""; setText(elem, ".NominationStatus .Date", fmtDate(adjTm(item.storedDate))); setText(elem, ".Submission", submstate); if (nom2.length>0) { setText(elem, ".CoNominator .State", conom); setText(elem, ".CoNominator .Name", nom2[0].label); } else { setText(elem, ".CoNominator .State", ""); setText(elem, ".CoNominator .Name", ""); } setText(elem, ".Nominator .Name", nom1.length>0? nom1[0].label : "-"); if (item.refStatus == "DECLINED") { setStyle(elem, ".Nominee", {color:"gray" /*textDecoration: "line-through"*/}); if (item.reference) { setText(elem, ".NoFun", "Declined"); } } setButton(elem, ".Edit", !item.reference || item.refStatus == "ACCEPTED" , this, this.clickEdit, item); setButton(elem, ".Delete", !item.reference, this, this.clickDelete, item); setButton(elem, ".Submit", item.refStatus == "ACCEPTED" , this, this.clickSubmit, item); setButton(elem, ".Accept", item.reference && item.refStatus in {"CONFIRM":1,"DECLINED":1}, this, this.clickAccept, item); setButton(elem, ".Decline", item.reference && item.refStatus == "CONFIRM", this, this.clickDecline, item); setButton(elem, ".View", item.reference && item.refStatus == "CONFIRM", this, this.clickView, item); setButton(elem, ".Download", isChair, this, this.clickDownload, item); if (insertInto) { for (const ch of insertInto.children) { if (!ch.dataset && !ch.dataset.sort) continue; if (sort > ch.dataset.sort) continue; insertInto.insertBefore(elem, ch); return; } insertInto.appendChild(elem); } } nomination_management.clickEdit = function(ev) { var ikey = ev.target.dataset.ikey; console.info("edit", ikey); document.location.href = "membership_nomination" + ".html?ikey=" + encodeURIComponent(ikey); } nomination_management.clickDelete = function(ev) { var ikey = ev.target.dataset.ikey; console.info("delete", ikey); $("#deleteDialog").dialog({ modal:true, width: "400", closeOnEscape: false, buttons: { "Delete": function() { nomination_management.deleteForm(function() { document.location.reload(); }, ikey, nomination_management.targetFormName); }, "Abort": function() { $("#deleteDialog").dialog("close"); } } }) } nomination_management.clickSubmit = function(ev) { var ikey = ev.target.dataset.ikey; console.info("clickSubmit TODO", ikey); } nomination_management.updateStatus = function(ikey, status, cb) { var url = this.rootPath + "data/store/" + this.targetFormName + "/" + ikey + "?status=" + status; this.xhr(-1, cb, null, "POST", url, "" ); } nomination_management.clickAccept = function(ev) { var ikey = ev.target.dataset.ikey; console.info("clickAccept", ikey); this.updateStatus(ev.target.dataset.ikey, "ACCEPTED", function(item) { document.location.reload(); }) } nomination_management.clickDecline = function(ev) { var ikey = ev.target.dataset.ikey; console.info("clickAccept", ikey); this.updateStatus(ev.target.dataset.ikey, "DECLINED", function(item) { document.location.reload(); }) } nomination_management.clickView = function(ev) { var frm = nomination_management.targetFormName; var ikey = ev.target.dataset.ikey; var base = nomination_management.rootPath + "data/"; var url = base + "acad-member-pdf/" + frm + "/" + ikey + ".pdf"; window.open(url); } nomination_management.clickDownload = function(ev) { var ikey = ev.target.dataset.ikey; console.info("clickDownload", ikey); var url = this.rootPath + "data/" + ikey + "/" + this.targetFormName + "/zip/1.zip"; window.open(url); } nomination_management.clickNewNomination = function(ev) { for (var ikey in this.credentials.ikey) { if (this.credentials.ikey[ikey].form != this.targetFormName) continue; if (this.credentials.ikey[ikey].status == "NEW") { document.location.href = "membership_nomination" + ".html#ikey=" + ikey; return; } } this.requestNewForm(function(item) { document.location.href = "membership_nomination" + ".html#ikey=" + item.ikey; }, null, this.targetFormName); } nomination_management.myItem = function(item) { if (item.status == "SUBMITTED" || item.status == "FINISHED" || item.status == "REFERENCES") return; console.info("myItem", item); var lst = this.myNominationList; var elem = lst.elem.cloneNode(true); this.nomineeData(elem, item, lst.parent); //lst.parent.insertBefore(elem, lst.prev); } nomination_management.coItem = function(item) { if (item.status == "SUBMITTED" || item.status == "FINISHED" || item.status == "REFERENCES") return; console.info("coItem", item); if (!item.status) { console.error(JSON.stringify(item)); return; } this.coNominations.style.display = ""; var lst = this.coNominationList; var elem = lst.elem.cloneNode(true); this.nomineeData(elem, item, lst.parent); //lst.parent.insertBefore(elem, lst.prev); } nomination_management.sectionItem = function(item) { if (item.status != "SUBMITTED" && item.status != "FINISHED" && item.status != "REFERENCES") return; var sect = item.data.section; var cont = document.querySelector(".SectionNomination." + sect); if (!cont) { var nn = nm.SectionNomination.elem.cloneNode(true); nn.classList.add(sect); nm.SectionNomination.parent.insertBefore(nn, nm.SectionNomination.prev); setText(nn, ".SubmittedSection", this.sect2label[sect].replace(/【.*】 /,"")); cont = nn; } var list = cont.querySelector(".SectionNominationList"); var out = this.SectionNominationList.elem.cloneNode(true); this.nomineeData(out, item, list); //list.appendChild(out); } nomination_management.allLoaded = function() { console.info("all loaded", this.credentials); var grp = this.credentials.group; if (grp && grp.indexOf("Admin") >= 0) { var admTbl = document.querySelector("#adminTableBox"); admTbl.style.display='table'; this.admin_data_table = new DataTable('#adminTable', { ajax: 'data/admin_data/membership_nomination_' + this.sfx }); var me = this; this.admin_data_table.on("draw", function(ev) { console.debug(ev); setButton(admTbl, ".DeleteForm", true, me, me.clickDelete); }); } } var setText = function(parent, sel, value) { var nl = parent.querySelectorAll(sel); for (var i = 0; i < nl.length; i++) { nl[i].textContent = value; } } var setStyle = function(parent, sel, value) { var nl = parent.querySelectorAll(sel); for (var i = 0; i < nl.length; i++) { for (var k in value) { nl[i].style[k] = value[k]; } } } var setButton = function(parent, sel, active, obj, method, item) { console.debug("setButton",parent, sel, active, obj, method, item) var nl = parent.querySelectorAll(sel); for (var i = 0; i < nl.length; i++) { nl[i].style.display = active? "" : "none"; if (active) { var f = function $_f(ev) { $_f.func.call($_f.obj, ev); } f.func = method; f.obj = obj; nl[i].addEventListener("click", f); if (item) nl[i].dataset.ikey = item.ikey; } } } var templ = (s) => { var e = document.querySelector(s); var ps = e.previousSibling; var p = e.parentNode; p.removeChild(e); return {elem:e,prev:ps,parent:p}; } var nm = nomination_management; nm.myNominations = document.getElementById("myNominations"); nm.myNominationList = templ("#myNominationList tr"); nm.coNominations = document.getElementById("coNominations"); nm.coNominationList = templ("#coNominationList tr"); nm.coNominations.style.display = "none"; nm.SectionNominationList = templ(".SectionNominationList tr"); nm.SectionNomination = templ(".SectionNomination"); setButton(nm.myNominations, ".New", true, nm, nm.clickNewNomination); }); function parseDate(dstr) { var ret = new Date(dstr); if(!(ret.getFullYear() > 0)) { var d = /(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)([+-])(\d\d)(\d\d)/.exec(dstr); var tz = (d[7] == "+"? 1 : -1) * (d[8] * 60 + d[9]); var tzo = (new Date()).getTimezoneOffset(); //year, month, day, hours, minutes, seconds, milliseconds ret = new Date(d[1], d[2], d[3], d[4], d[5], d[6], 0); if(tz != tzo) { ret = new Date(ret.getTime() + 1000 * 60 * (tzo - tz)); } } return ret; } </script> <style type="text/css"> body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #666; } #adminTableBox { display:none; background-color: white; width: calc(100% - 30pt); } #adminTable { width: 90%; border: 4px solid #eaeaea; text-align:left; margin: 6pt 0; } #adminTable th { background-color: #f0f0f0; } #adminTable tr td:nth-child(1) { font-family:monospace; } .dataTables_wrapper { padding-bottom: 4pt; } #adminTableBox .dataTables_length { margin-left: 20pt; padding: 6pt 0; } #adminTableBox .dataTables_filter { margin-right: 60pt; padding: 6pt 0; } .dataTables_wrapper label { display: inline; } .HeadLink { display: inline-block; background-color: #eee; padding: 4pt 10pt; border-left: 2px white; border-right: 2px white; border-top: 2px white; text-decoration: none; color: blue; vertical-align: bottom; } .HeadLink:hover { text-decoration: underline; background-color: #fffcf8; color: #44d; } .HeadLink:active { font-weight: bold; } .HeadLink:visited { color: blue; } #memberName { font-weight: bold; padding-right: 12pt; } #memberType { font-style: italic; padding-right: 6pt; } #page_head { color: #A8BCDD; background-color: #2759AB; /* padding-bottom: 10pt; */ } #page_head h1 { color: white; } #ikey { float: right; margin-top: -20pt; font-size: small; color: lightgray; } #ikeyError { color: red; } form { padding-top: 20pt; padding-bottom: 20pt; background-color: #f4f4fc; text-align: center; } .AlreadyChosen { /*text-decoration: line-through;*/ color: gray; } #detailedInstructions { margin:0; padding-left: 6pt; padding-right: 6pt; font-size: x-small; font-weight: bold; background-color: #eee; color: #666; } #detailedInstructions p { font-size: small; text-align: justify; font-weight: normal; } #instructions { background-color: #ffe; margin-bottom: 1em; margin-right: 0.5em; padding: 4pt; border: 2px solid gray; } #candidates { margin-top: 0.6em; maring-bottom: 1em; margin-right: 0em; } #candidateList { overflow: auto; height: 12.5em; margin-right: 0.5em; } #candidates li { list-style-type: none; } #candidates a:before { content: '‣ ' } #candidates a { display: block; padding: 2pt; font-size: 16pt; } #candidates a:hover { font-weight: bold; background-color: #2759AB; color: white; cursor: pointer; } #candidates a.AlreadyChosen { margin-left: 1em; } #candidates a.AlreadyChosen:before { content: none; } #candidates a.AlreadyChosen:hover { font-weight: normal; cursor: default; background-color: inherit; color: gray; } label { display: inline-block; width: 100pt; text-align: right; padding-right: 12pt; vertical-align: middle; font-size: 12pt; } #firstBox label { width: 100pt; font-size: 14pt; } input.Slot { display: inline-block; vertical-align: middle; font-size: 16pt; border: 1px solid white; background-color: white; padding-left: 6pt; } #votingBox { display: inline-block; border: 1em solid #2759AB; border-radius: 6px; height: 11em; vertical-align: top; padding: 1em 1em 4em 0em; text-align: right; } #firstBox, #secondBox, #thirdBox { height: 3em; margin-bottom: 1em; vertical-align: middle; padding: 0.4em 0.4em 0.0em 0.4em; } .CurrentSlot { background-color: #2759AB; color: white; font-weight: bold; } #submitBtn { width: 10em; height: 8em; margin-right: 4em; vertical-align: bottom; } #submitBtn div { font-size: 18pt; font-variant: small-caps; } #reset { width: 6em; height: 3em; margin-right: 6em; margin-bottom: 1em; vertical-align: bottom; } #candidatesBox { display: inline-block; width: 20em; border: 1em solid #2759AB; border-radius: 6px; padding: 0.5em 0em 0.5em 1em; margin: 5em 0em; text-align: left; } #alreadyVoted { color: green; margin-top: 2em; } #connector { width: 10em; display: inline-block; vertical-align: top; margin: 0em; } #connectorL { display: table-cell; width: 2em; height: inherit; vertical-align: top; margin: 0em; background-color: #2759AB; } #connectorL1 { height: 9.5em; border-radius: 0px 0px 0px 6px; border-left: 2em solid #f4f4fc; border-right: 2em solid #f4f4fc; } #connectorL2 { height: 1em; } #connectorL3 { height: 9.5em; border-radius: 6px 0px 0px 0px; border-left: 2em solid #f4f4fc; border-right: 2em solid #f4f4fc; } #connectorM { display: table-cell; vertical-align: top; width: inherit; margin: 0em; } #connectorM1, #connectorR1 { height: 8em; } #connectorM2 { border-top: 1em solid #2759AB; border-left: 1em solid #2759AB; height: 0.5em; border-radius: 6px 0px 0px 0px; } #connectorM3 { height: 0em; width: 0em; border-bottom: 1em solid #2759AB; border-right: 1em solid #2759AB; border-radius: 0px 0px 6px 0px; } #connectorR { display: table-cell; width: 1.5em; height: inherit; vertical-align: top; margin: 0em; } #connectorR2 { border-top: 0.25em solid #f4f4fc; border-left: 0.75em solid #2759AB; border-bottom: 0.25em solid #2759AB; border-right: 0.75em solid #f4f4fc; } #connectorR3 { border-top: 0.25em solid #2759AB; border-left: 0.75em solid #2759AB; border-bottom: 0.25em solid #f4f4fc; border-right: 0.75em solid #f4f4fc; } button.ui-dialog-titlebar-close { display: none !important; } #loginDialog fieldset { padding-top: 10pt; padding-bottom: 10pt; } #loginDialog input { margin-top: 5pt; margin-bottom: 5t; } #loginDialogMsg { color: red; } button { padding: 4pt 8pt; font-size: large; } button[disabled] { color: white; border: 1px solid white; } #myNominations, #coNominations, .SectionNomination{ margin-bottom: 30pt; } .SubmittedSection { font-style: italic; display:block; margin-top: 8pt; } .SectionNominationList, #myNominationList, #coNominationList { width: auto; margin-left: auto; margin-right: auto; margin-bottom: 12pt; margin-top:6pt; } .SectionNominationList td , #myNominationList td , #coNominationList td { /* padding-left: 6pt; */ /* padding-right: 6pt; */ padding: 3pt 6pt;background-color: white;} .Nominee { font-size:large; } .NominationStatus { } .CoNominator { } .Submission { font-weight: bold; } .Hidden { display:none; } .NoFun { font-weight: bold; } </style> </head> <body> <div id="page_head"> <div id="logo"> <a href="/ae/%22Acad_Main%22"> <img style="height: 92px; width: 850px;" src="https://www.ae-info.org/templates/default/skins/Smart/images/acadlogo.png" alt="Home"> </a> </div> <div id="ikey"> <span id="memberName">Not logged in!</span> <span id="memberType"></span> </div> <div> <h2 style="display:inline-block; margin-right: 20pt;">Nominations for the Academia Europaea</h2> <a href="/" class="HeadLink"> AE Website </a> <span style="display:inline-block; width:20pt;"> </span> <a id="logoutButton" class="HeadLink" href="user/logout?return=/Logout.jsp">Logout</a> </div> <!-- div id="detailedInstructions"> Instructions: <p>TBD …</p> </div --> </div> <form id="nomination_management" name="nomination_management_2024" action=""> <div id="myNominations"> <h3>Nominated by me</h3> <table id="myNominationList"> <tr> <td > <div class="Nominee"></div> </td> <td> <div class="CoNominator"><span class="State">pending authorization by </span> <span class="Name"></span></div> <div class="NominationStatus"><span class="State"></span> on <span class="Date"></span></div> <div class="Submission"></div> </td> <td class="Functions"> <button class="Edit" type="button">Edit</button> <button class="Delete" type="button">Delete</button> <span class="NoFun"></span> </td> </tr> </table> <button class="New" type="button">New Nomination</button> </div> <div id="coNominations"> <h3>Co-nominator of</h3> <table id="coNominationList"> <tr> <td class="Nominee"></td> <td> <div class="Nominator">Nominated by <span class="Name"></span></div> <div class="NominationStatus"><span class="State"></span> on <span class="Date"></span></div> </td> <td class="Functions"> <button class="Accept" type="button">Accept co-nomination</button> <button class="Decline" type="button">Decline co-nomination</button> <button class="View" type="button">View nomination</button> <button class="Edit" type="button">Edit</button> <span class="NoFun"></span> </td> </tr> </table> <!-- ul> <li><a href="">N.N. Noinee3</a> (unsubmitted draft, suggest by N.N. Academymember2) <a href="">Accept co-nomination</a> </li> </ul--> </div> <div class="SectionNomination"> <hr> <h3> <span style="font-weight: normal;">Nominations <b>submitted</b> for section</span> <span class="SubmittedSection">History and archaeology</span> </h3> <table class="SectionNominationList"> <tr> <td class="Nominee"></td> <td class="NominationStatus"><span class="State"></span> on <span class="Date"></span></td> <td class="Functions"> <button class="Download" type="button">Download nomination and attachments</button> <span class="NoFun"></span> </td> </tr> </table> </div> <div id="adminTableBox"> <table id="adminTable"> <thead> <tr> <th>ikey</th> <th>Section</th> <th>Nominee</th> <th>Nominator1</th> <th>Nominator2</th> <th>Working Copy</th> <th>Submitted</th> <th>Actions</th> </tr> </thead> </table> </div> </form> <div id="deleteDialog" title="Confirm Deletion" style="display: none"> <div id="deleteDialogMsg">Please confirm to delete the nomination. You cannot undo the deletion.</div> </div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10