summaryrefslogtreecommitdiffstats
path: root/dist/js/gradings.js
diff options
context:
space:
mode:
authorAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-06-03 22:05:47 +0200
committerGitHub <noreply@github.com>2020-06-03 22:05:47 +0200
commit07ff5e29f0c460cd541a1bc6d65b5290ed94de61 (patch)
treede1754a37aa2bf1587a305f8d8a549737ddf3f17 /dist/js/gradings.js
parentMerge branch 'dev' of https://github.com/beziapp/beziapp.github.io into dev (diff)
parentMerge pull request #21 from beziapp/github-actions-fix (diff)
downloadbeziapp-07ff5e29f0c460cd541a1bc6d65b5290ed94de61.tar
beziapp-07ff5e29f0c460cd541a1bc6d65b5290ed94de61.tar.gz
beziapp-07ff5e29f0c460cd541a1bc6d65b5290ed94de61.tar.bz2
beziapp-07ff5e29f0c460cd541a1bc6d65b5290ed94de61.tar.lz
beziapp-07ff5e29f0c460cd541a1bc6d65b5290ed94de61.tar.xz
beziapp-07ff5e29f0c460cd541a1bc6d65b5290ed94de61.tar.zst
beziapp-07ff5e29f0c460cd541a1bc6d65b5290ed94de61.zip
Diffstat (limited to '')
-rw-r--r--dist/js/gradings.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/dist/js/gradings.js b/dist/js/gradings.js
index c644562..de5f21b 100644
--- a/dist/js/gradings.js
+++ b/dist/js/gradings.js
@@ -14,4 +14,5 @@ async function validateInputs(){if($("#input-grading-name").val()!=null&&$("#inp
function gradingClickHandler(eventClickInfo){let grading_id=parseInt(eventClickInfo.event.id);let grading_subject=gradings[grading_id]["subject"];let grading_date_obj=gradings[grading_id]["date"];let grading_date=dateString.longFormatted(grading_date_obj);let grading_description=gradings[grading_id]["description"];$("#grading-subject").text(grading_subject);$("#grading-date").text(grading_date);$("#grading-description").text(grading_description);const modal=document.querySelectorAll(".side-modal")[0];M.Sidenav.getInstance(modal).open();}
function setupPickers(){var date_object=new Date();let elems=document.querySelectorAll('#datepicker-add');let options={autoClose:true,format:"dd.mm.yyyy",defaultDate:date_object,setDefaultDate:true,firstDay:1}
instances=M.Datepicker.init(elems,options);}
-document.addEventListener("DOMContentLoaded",()=>{checkLogin();var calendarEl=document.getElementById("calendar");calendar_obj=new FullCalendar.Calendar(calendarEl,{firstDay:1,plugins:["dayGrid"],defaultDate:getDateString(),navLinks:false,editable:false,events:[],eventClick:gradingClickHandler,height:"parent"});calendar_obj.render();setupPickers();const modal_elems=document.querySelectorAll('.modal');const modal_options={onOpenStart:()=>{$("#fab-new").hide()},onCloseEnd:()=>{$("#fab-new").show()},dismissible:false};$("#input-grading-name").on("blur",validateInputs);$("#input-grading-description").on("blur",validateInputs);M.Modal.init(modal_elems,modal_options);loadGradings(true);$("#refresh-icon").click(()=>{loadGradings(true);});const menus=document.querySelectorAll(".side-menu");M.Sidenav.init(menus,{edge:"right",draggable:true});const modals=document.querySelectorAll('.side-modal');M.Sidenav.init(modals,{edge:'left',draggable:false});}); \ No newline at end of file
+
+document.addEventListener("DOMContentLoaded",()=>{checkLogin();var calendarEl=document.getElementById("calendar");calendar_obj=new FullCalendar.Calendar(calendarEl,{firstDay:1,plugins:["dayGrid"],defaultDate:getDateString(),navLinks:false,editable:false,events:[],eventClick:gradingClickHandler,height:"parent"});calendar_obj.render();loadGradings(true);$("#refresh-icon").click(()=>{loadGradings(true);});const menus=document.querySelectorAll(".side-menu");M.Sidenav.init(menus,{edge:"right",draggable:true});const modals=document.querySelectorAll('.side-modal');M.Sidenav.init(modals,{edge:'left',draggable:false});});