include mixins doctype strict html include header script(src='/javascripts/pfiswebsocket.js') script(src='/templates/pcalimport_changes.js') script(src='/templates/pcal/pentry_clone_move_parishday.js') script(src='/javascripts/runtime.js') link(href="/stylesheets/style_week.css", rel="stylesheet") style. .cell_element { display: table-cell; } .td_new_celebration { padding-top: 10px; } .give_margin_left { padding-left: 10px; } @media only screen and (max-width: 768px) { .cell_element { display: block; margin-bottom: 15px; } .td_new_celebration { padding-top: 0px; } .give_margin_left { padding-left: 0px; } } .changes_details { /*max-height: 300px; overflow-y: scroll;*/ margin-top: 10px; } .day_details { max-height: 300px; min-height: 200px; overflow-y: scroll; } body .modal.fade(id="collectUserDataDialog", role="dialog", aria-labelledby="collectUserDataDialogLabel", aria-hidden="true") .modal-dialog(role="document") .modal-content .modal-header h4(class="modal-title", id="collectUserDataDialogLabel") Benutzer-Einträge auslesen .modal-body p(style="font-weight: bold; font-style: italic;") Bitte warten Sie, während die Einträge der Benutzer von PfIS zusammengestellt werden ... .modal.fade(id="fileUploadDialog", role="dialog", aria-labelledby="fileUploadDialogLabel", aria-hidden="true") .modal-dialog(role="document") .modal-content .modal-header h4(class="modal-title", id="fileUploadDialogLabel") Datei hochladen und auswerten .modal-body p(style="font-weight: bold; font-style: italic;") Bitte warten Sie, während die Datei hochgeladen und die Einträge ausgewertet werden ... .modal.fade(id="compileDialog", role="dialog", aria-labelledby="compileDialogLabel", aria-hidden="true") .modal-dialog(role="document") .modal-content .modal-header h4(class="modal-title", id="compileDialogLabel") Pfarrkalender kompilieren .modal-body p(style="font-weight: bold; font-style: italic;") Bitte warten Sie, während der Pfarrkalender neu kompiliert wird ... .modal.fade(id="messagesDialog", role="dialog", aria-labelledby="messagesDialogLabel", aria-hidden="true") .modal-dialog(role="document") .modal-content .modal-header button(type="button", class="close", data-dismiss="modal", aria-hidden="true") × h4(class="modal-title", id="confirmRejectLabel") Meldungen .modal-body(style="overflow-y: auto; max-height: calc(100vh - 210px);") p b Bitte beachten Sie folgende Meldungen! #messages .modal-footer button(type="button", class="btn btn-primary", data-dismiss="modal") Schließen .modal.fade(id="confirmReject", role="dialog", aria-labelledby="confirmRejectLabel", aria-hidden="true") .modal-dialog(role="document") .modal-content .modal-header button(type="button", class="close", data-dismiss="modal", aria-hidden="true") × h4(class="modal-title", id="confirmRejectLabel") Ablehnung bestätigen .modal-body p Sind Sie sicher, dass Sie diese Änderung verwerfen wollen? br span Die entsprechende Datei wird vom Datenträger gelöscht! .modal-footer button(type="button", class="btn btn-default", data-dismiss="modal") Abbrechen button(type="button", class="btn btn-danger", id="confirm_reject") Änderung tatsächlich ablehnen .modal.fade(id="confirmRemove", role="dialog", aria-labelledby="confirmRemoveLabel", aria-hidden="true") .modal-dialog(role="document") .modal-content .modal-header button(type="button", class="close", data-dismiss="modal", aria-hidden="true") × h4(class="modal-title", id="confirmRemoveLabel") Löschen bestätigen .modal-body p Sind Sie sicher, dass Sie den aktuellen Kalendereintrag löschen wollen? br span Er wird unwiederbringlich gelöscht! .modal-footer button(type="button", class="btn btn-default", data-dismiss="modal") Abbrechen button(type="button", class="btn btn-danger", id="confirm_remove") Kalendereintrag tatsächlich löschen .root .new_flex_zero +nav("PfarrInfoSystem", "mainmenu") .container-fluid h1 Elemente in den Pfarrkalender importieren p Lesen sie alle von den Nutzern von PfIS erstellten Kalender-Einträge aus bzw. importieren Sie eine Datei und entscheiden Sie, welche Einträge übernommen werden sollen. .btn-toolbar(style="margin-bottom: 20px;") .btn-group.btn-group-xs button.btn.btn-primary.button-import-userdata Einträge der Nutzer auslesen .btn-group.btn-group-xs button.btn.btn-primary.button-import-file(onclick="$('#fileinput').click();") Datei importieren input(type="file", id="fileinput", style="display: block; visibility: hidden; width: 0; height: 0;") .btn-group.btn-group-xs(style="margin-left: 25px;") button.btn.btn-warning#button_compile_calendar Pfarrkalender neu kompilieren .subroot#changes_parent(style="flex-direction: row; flex: 1;") //- height: 100%; //- var parishid = 0; //-each parish in parishes //- - var my_uid = generateUID(); //- if(parish.volunteergroups.length > 0) //- .panel.panel-default.parish-marker(style="border-width: 3px;", data-parishid=parishid) //- .panel-heading //- h4.panel-title(data-toggle="collapse", data-target="#PANEL_#{my_uid}", aria-expanded="false", aria-controls="PANEL_#{my_uid}", style="cursor: pointer;") #{parish.name} //- .panel-collapse.collapse(id="PANEL_#{my_uid}") //- .panel-body(style="padding: 10px;") //- .container-fluid //- .row //- button.btn.btn-primary.btn-xs.button-select-all Alle auswählen //- button.btn.btn-default.btn-xs.button-deselect-all Alle abwählen //- table(width='100%', class='table table-condensed', style='margin-bottom: 10px;') //- thead //- tr //- td Name //- tbody //- for grp in parish.volunteergroups //- tr(onclick="$(this).toggleClass('group_is_selected'); update_button_volunteergroupsselected();", style="cursor: pointer;", data-dn="#{grp.dn}", data-group) //- td #{grp.name} //- - parishid++; script. var ws = new PfISWebSocket("#{sessionuuid}", "#{taskuuid}"); ws.bind_standard_close_handler(); $(".button-import-userdata").on('click', function(event) { $('#collectUserDataDialog').modal({ backdrop: 'static', keyboard: false }); ws.send('collect_userdata', {}); }); $("#fileinput").on('change', function(event) { var files=$("#fileinput").prop('files'); if(files.length === 0) return console.log(files); console.log(files.length); $('#fileUploadDialog').modal({ backdrop: 'static', keyboard: false }); for (var i = 0, numFiles = files.length; i < numFiles; i++) { var file = files[i]; var reader = new FileReader(); reader.onload = (function(aFile) { return function(e) { var data = { name : aFile.name, size : aFile.size, type : aFile.type, content : e.target.result }; $("#fileinput").val(""); ws.send('fileupload', data); }})(file); reader.readAsDataURL(file); } }); ws.bind("collected_changes", function(data) { var html = pcalimport_changes_template(data); if(data.source==="user-data") $('#collectUserDataDialog').modal('hide'); else $('#fileUploadDialog').modal('hide'); $("#changes_parent").empty(); if(data.messages.length > 0) { var msg_elem = $('#messagesDialog').find('#messages'); msg_elem.empty(); $.each(data.messages, function(idx, elem){ msg_elem.append('