Real initial commit

Set real eMail-Address
This commit is contained in:
2019-12-02 13:38:49 +01:00
parent 56e8d0c48f
commit 4736ddeb82
170 changed files with 20857 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
[Dolphin]
Timestamp=2016,9,3,17,56,47
Version=3
ViewMode=1

View File

@@ -0,0 +1 @@
!function(a){a.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",monthsTitle:"Monate",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);

File diff suppressed because one or more lines are too long

7
public/javascripts/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
/*
* jquery-easy-loading - v1.2.0
* Easily add and manipulate loading states of any element on the page
* http://github.com/CarlosBonetti/jquery-loading
*
* Made by Carlos Bonetti <carlosb_bc@hotmail.com>
* Under MIT License
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){var d;return void 0===c&&("undefined"!=typeof window?(c=require("jquery"),d=window):(c=require("jquery")(b),d=b)),a(c,d),c}:a(jQuery,window)}(function(a,b,c){var d=function(b,c){this.element=b,this.settings=a.extend({},d.defaults,c),this.settings.fullPage=this.element.is("body"),this.init(),this.settings.start&&this.start()};d.defaults={overlay:c,zIndex:c,message:"Loading...",theme:"light",shownClass:"loading-shown",hiddenClass:"loading-hidden",stoppable:!1,start:!0,onStart:function(a){a.overlay.fadeIn(150)},onStop:function(a){a.overlay.fadeOut(150)},onClick:function(){}},d.setDefaults=function(b){d.defaults=a.extend({},d.defaults,b)},a.extend(d.prototype,{init:function(){this.isActive=!1,this.overlay=this.settings.overlay||this.createOverlay(),this.resize(),this.attachMethodsToExternalEvents(),this.attachOptionsHandlers()},createOverlay:function(){var b=a('<div class="loading-overlay loading-theme-'+this.settings.theme+'"><div class="loading-overlay-content">'+this.settings.message+"</div></div>").addClass(this.settings.hiddenClass).hide().appendTo("body"),c=this.element.attr("id");return c&&b.attr("id",c+"_loading-overlay"),b},attachMethodsToExternalEvents:function(){var c=this;c.element.on("loading.start",function(){c.overlay.removeClass(c.settings.hiddenClass).addClass(c.settings.shownClass)}),c.element.on("loading.stop",function(){c.overlay.removeClass(c.settings.shownClass).addClass(c.settings.hiddenClass)}),c.settings.stoppable&&c.overlay.on("click",function(){c.stop()}),c.overlay.on("click",function(){c.element.trigger("loading.click",c)}),a(b).on("resize",function(){c.resize()}),a(function(){c.resize()})},attachOptionsHandlers:function(){var a=this;a.element.on("loading.start",function(b,c){a.settings.onStart(c)}),a.element.on("loading.stop",function(b,c){a.settings.onStop(c)}),a.element.on("loading.click",function(b,c){a.settings.onClick(c)})},calcZIndex:function(){return this.settings.zIndex!==c?this.settings.zIndex:(parseInt(this.element.css("z-index"))||0)+1+this.settings.fullPage},resize:function(){var a=this,b=a.element,c=b.outerWidth(),d=b.outerHeight();this.settings.fullPage&&(d="100%",c="100%"),this.overlay.css({position:a.settings.fullPage?"fixed":"absolute",zIndex:a.calcZIndex(),top:b.offset().top,left:b.offset().left,width:c,height:d})},start:function(){this.isActive=!0,this.element.trigger("loading.start",this)},stop:function(){this.isActive=!1,this.element.trigger("loading.stop",this)},active:function(){return this.isActive},toggle:function(){this.active()?this.stop():this.start()}});var e="jquery-loading";a.fn.loading=function(b){return this.each(function(){var f=a.data(this,e);f?b===c?f.start():"string"==typeof b?f[b].apply(f):a.data(this,e,new d(a(this),b)):(b===c||"object"==typeof b||"start"===b||"toggle"===b)&&a.data(this,e,new d(a(this),b))})},a.fn.Loading=function(b){var f=a(this).data(e);return f&&b===c||a(this).data(e,f=new d(a(this),b)),f},a.expr[":"].loading=function(b){var c=a.data(b,e);return c?c.active():!1},a.Loading=d});

View File

@@ -0,0 +1,176 @@
var pcalPentryCloneMoveManager = function(websocket, pcalview) {
var _ws = websocket;
var _pcalview = pcalview;
var _date;
var _pentrytype;
var _uuid;
var _clone_or_move;
var _is_active = false;
_ws.bind('pcal_clone_move_get_parishday_result',function(data){
console.log('got_parishday');
console.log(data);
var html = pentry_clone_move_parishday_template({day: data.day } );
$("#pcal_pentry_clone_move_dayinfo").html(html);
$("#pcal_pentry_clone_move_scroll_parent").scrollTop(0);
});
_ws.bind('pentry_clone_move_result', function(data){
var message = errorview_inlay_template({ messages: data.messages, is_error: (data.result === 'OK' ? false : true), session_ended: false});
saved_messages.push(message);
pcal_pentry_clone_move_manager.finish();
history.back();
});
this.get_date = function() { return _date; }
this.set_date = function(date) {
_date = date;
console.log(_date);
}
this.is_active = function() {
return _is_active;
}
this.start = function(pentrytype, uuid, clone_or_move) {
_is_active = true;
_pentrytype = pentrytype;
_uuid = uuid;
_clone_or_move = clone_or_move;
console.log('start', _date, _pentrytype, _uuid, _clone_or_move);
if(_pentrytype === "event" || history.state.direction === 'clone_move')
history.replaceState({direction: 'clone_move', pentrytype: _pentrytype, uuid: _uuid, clone_or_move: _clone_or_move, date: _date.date}, document.title, "/"+_pcalview+"/"+_date.date);
else
history.pushState({direction: 'clone_move', pentrytype: _pentrytype, uuid: _uuid, clone_or_move: _clone_or_move, date: _date.date}, document.title, "/"+_pcalview+"/"+_date.date);
var pentry = $("[data-pentryuuid="+uuid+"]");
console.log(pentry);
if(pentry.length != 1)
{
console.log('ERROR IN GETTING PENTRY!!!')
history.popState();
return;
}
var renderdata = { pentrytype : _pentrytype,
date : _date,
uuid : _uuid
};
switch(clone_or_move) {
case "clone":
renderdata["clone_or_move"] = "clone";
renderdata["clone_or_move_pretty_verb"] = "geklont";
renderdata["clone_or_move_pretty_verb2"] = "klonen";
renderdata["clone_or_move_pretty_noun"] = "Klonen";
break;
case "move":
renderdata["clone_or_move"] = "move";
renderdata["clone_or_move_pretty_verb"] = "verschoben";
renderdata["clone_or_move_pretty_verb2"] = "verschieben";
renderdata["clone_or_move_pretty_noun"] = "Verschieben";
}
var name = pentry.data('pentryname');
var addname = pentry.data("pentryaddname");
if(addname.length > 0)
name = name + " (" + addname + ")";
console.log(name);
renderdata["pentryname"] = name;
switch(_pentrytype) {
case "event":
renderdata["pentrytype_pretty"] = "Ereignis";
break;
case "away":
renderdata["pentrytype_pretty"] = "Abwesenheit";
break;
case "keep_in_mind":
renderdata["pentrytype_pretty"] = "Zu-Beachten";
break;
case "todo":
renderdata["pentrytype_pretty"] = "Zu-Tun";
break;
case "vehicle_use":
renderdata["pentrytype_pretty"] = "Fahrzeugbenutzung";
break;
}
var html = pentry_clone_move_template(renderdata);
$("#pentry_clone_move_parent").html(html);
$('#pcal_pentry_clone_move_datepicker').datepicker({format: "yyyy-mm-dd", language: "de", calendarWeeks: true, todayHighlight: true});
$("#pcal_pentry_clone_move_datepicker").on("changeDate", function(event) {
var d = $("#pcal_pentry_clone_move_datepicker").datepicker('getFormattedDate');
console.log('date: ', d);
$("#pcal_pentry_clone_move_new_date").val(d);
$("#pcal_pentry_clone_move_alert").hide();
ws.send('get_parishday', { answer_prefix: "pcal_clone_move_", date: d });
});
$("#form-clonemove").on('submit', function(e){
e.preventDefault();
var new_date = $("#pcal_pentry_clone_move_new_date").val();
console.log(new_date);
if(new_date === _date.date) {
$("#pcal_pentry_clone_move_alert").show();
return;
}
var data = {
"request" : "pentry_clone_move",
"type" : _clone_or_move,
"date" : _date.date,
"pentrytype": _pentrytype,
"uuid" : _uuid,
"new_date" : new_date
}
console.log(data);
ws.send('pentry_clone_move', data);
});
$("#pentry_clone_move_parent").show();
ws.send('get_parishday', { answer_prefix: "pcal_clone_move_", date: _date.date });
}
this.finish = function() {
$("#pentry_clone_move_parent").hide();
$("#pentry_clone_move_parent").empty();
_is_active = false;
}
}
/*$("[data-hide]").on("click", function(){
$("." + $(this).attr("data-hide")).hide();*/
/*
* The snippet above will hide all elements with the class specified in data-hide,
* i.e: data-hide="alert" will hide all elements with the alert property.
*
* Xeon06 provided an alternative solution:
* $(this).closest("." + $(this).attr("data-hide")).hide();
* Use this if are using multiple alerts with the same class since it will only find the closest element
*
* (From jquery doc: For each element in the set, get the first element that matches the selector by
* testing the element itself and traversing up through its ancestors in the DOM tree.)
*/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,133 @@
// https://gist.github.com/ismasan/299789
/*
The MIT License (MIT)
Copyright (c) 2014 Ismael Celis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-------------------------------*/
/*
Simplified WebSocket events dispatcher (no channels, no users)
var socket = new FancyWebSocket();
// bind to server events
socket.bind('some_event', function(data){
alert(data.name + ' says: ' + data.message)
});
// broadcast events to all connected users
socket.send( 'some_event', {name: 'ismael', message : 'Hello world'} );
*/
var PfISWebSocket = function(session, task) {
// location.protocol+
var url = 'wss://'+location.hostname+(location.port ? ':'+location.port: '') + "/ws";
if(typeof session !== 'undefined')
url += "/" + session;
if(typeof task !== 'undefined')
url += "/" + task;
console.log(url);
var conn = new WebSocket(url);
var callbacks = {};
this.bind = function(event_name, callback) {
callbacks[event_name] = callbacks[event_name] || [];
callbacks[event_name].push(callback);
return this;// chainable
};
this.send = function(event_name, event_data) {
/*if(conn.readyState !== WebSocket.OPEN) {
dispatch("close", null);
return;
}*/
var payload = JSON.stringify({event:event_name, data: event_data});
conn.send( payload ); // <= send JSON data to socket server
return this;
};
// dispatch to the right handlers
conn.onmessage = function(evt) {
if(evt.data === "hb::") {
console.log('got heartbeat');
return;
}
var json = JSON.parse(evt.data);
dispatch(json.event, json.data);
};
function show_errormessage(title, message, event) {
var myerrordialog = $("#pfiswebsocket_errordialog");
if(myerrordialog.length === 0) {
console.log('must append errordialog');
$("body").append("<div id='pfiswebsocket_errordialog' class='modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-header'><h4 class='modal-title'></h4></div><div class='modal-body'></div><div class='modal-footer'></div></div><!-- /.modal-content --></div><!-- /.modal-dialog --></div><!-- /.modal -->");
myerrordialog = $("#pfiswebsocket_errordialog");
}
myerrordialog.find(".modal-title").html(title);
myerrordialog.find(".modal-body").html(message);
myerrordialog.find('.modal-footer').html("<p class='small'>[code: " + event.code + "; Grund: '" + event.reason + "']</p>");
$("#pfiswebsocket_errordialog").modal({ backdrop: 'static', keyboard: false });
//$("#pfiswebsocket_errordialog").show();
//$("body").append("<div style='position: absolute; top: 0; bottom: 0; left: 0; right: 0; background-color: lightgrey;'><table width='100%' height='100%'><tr valign='center' style='hight: 100%;'><td align='center'><b>"+message+"</b></td></tr></table></div>");
}
conn.onclose = function(e) {
console.log('close:', e);
if(e.code === 1001) { // going away
console.log('WEBSOCKET: going away ...');
setTimeout(function() {
dispatch('close', {event: e});
}, 1000); // we use a timeout here, so that when we simply go to another site, nothing happens!
return;
}
if(e.code === 1011 && e.reason === "__no_session__found__") {
var url = location.protocol+ '//'+location.hostname+(location.port ? ':'+location.port: '') + "/";
console.log(url);
show_errormessage("Die Sitzung ist nicht mehr gültig!", "Bitte <a href='"+url+"'>starten Sie eine neue</a>!", e);
return;
}
dispatch('close', {event: e});
};
conn.onopen = function(){ dispatch('open',null)};
conn.onerror = function(error) { console.log('error: ', error, error.type); };
var dispatch = function(event_name, message) {
var chain = callbacks[event_name];
if(typeof chain == 'undefined') return; // no callbacks for this event
for(var i = 0; i < chain.length; i++) {
chain[i]( message );
}
};
this.bind_standard_close_handler = function() {
this.bind("close", function(data) {
console.log('CLOSED_HANDLER_CALLED');
show_errormessage("Verbindung zu PfIS abgebrochen!", "<a href='javascript: location.reload(true);'>Bitte reload.</a><br>Sollte PfIS ausgefallen sein, versuchen Sie es bitte später noch einmal!", data.event);
});
};
};
generateUID = function() {
return ("000000" + (Math.random()*Math.pow(36,6) << 0).toString(36)).slice(-6)
}

View File

@@ -0,0 +1 @@
../../node_modules/jade/runtime.js

View File

@@ -0,0 +1 @@
../../node_modules/socket.io-client/dist/socket.io.js

1
public/javascripts/tinymce Symbolic link
View File

@@ -0,0 +1 @@
../../node_modules/tinymce/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

9
public/javascripts/validator.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long