Skip to content

Commit

Permalink
updated to v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbaseman committed Apr 13, 2018
1 parent 7ec383a commit 0cb8d37
Show file tree
Hide file tree
Showing 95 changed files with 8,291 additions and 1,697 deletions.
54 changes: 43 additions & 11 deletions add.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

if (!defined('WB_PATH')) exit("Cannot access this file directly");
if (!defined('SYSTEM_RUN')) {header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found'); echo '404 File not found'; flush(); exit;}


$ct1 = '<div class="field_line">
Expand All @@ -47,7 +47,20 @@
';

$ct5 = '[[[CUSTOM_CONTENT]]]';
$header = '[CALENDAR]';

$ct6 = '
<div class="field_line">
<div class="field_title">[CUSTOM_NAME]</div>
<a href="mailto:[CUSTOM_CONTENT]">[CUSTOM_NAME]</a>
</div>
';

$header = '
<div style="font-size:80%; text-align:right;">
[NEW_ENTRY]
</div>
[CALENDAR]';
$footer = '';
$posttempl = '<div class="event_details">
<h2>[NAME]</h2>
<div class="info_block">
Expand All @@ -58,6 +71,9 @@
[CUSTOM4]
[CUSTOM5]
[CUSTOM6]
[CUSTOM7]
[CUSTOM8]
[CUSTOM9]
[CATEGORY]
</div>
[CONTENT]
Expand All @@ -66,27 +82,43 @@
';

// insert data into pages table
$database->query("INSERT INTO ".TABLE_PREFIX."mod_procalendar_settings SET page_id = '$page_id',
$database->query(
"INSERT INTO ".TABLE_PREFIX."mod_procalendar_settings SET page_id = '$page_id',
section_id = '$section_id',
settings = '',
startday = 0,
usetime = 0,
useformat = 'yyyy-mm-dd',
useifformat = 'Y-m-d',
customtemplate1 = '$ct1',
usecustom1 = 1,
custom1 = 'Text field',
customtemplate2 = '$ct2',
customtemplate1 = '$ct1',
usecustom2 = 2,
custom2 = 'Text area',
customtemplate3 = '$ct3',
customtemplate2 = '$ct2',
usecustom3 = 3,
custom3 = 'WB link',
customtemplate4 = '$ct4',
customtemplate3 = '$ct3',
usecustom4 = 4,
custom4 = 'Image',
customtemplate5 = '$ct5',
usecustom5 = 1,
customtemplate4 = '$ct4',
usecustom5 = 0,
custom5 = 'Droplet',
posttempl = '$posttempl',
header = '$header'
customtemplate5 = '$ct5',
usecustom6 = 0,
custom6 = 'E-Mail',
customtemplate6 = '$ct6',
usecustom7 = 0,
custom7 = '',
customtemplate7 = '',
usecustom8 = 0,
custom8 = '',
customtemplate8 = '',
usecustom9 = 0,
custom9 = '',
customtemplate9 = '',
resize = 0,
header = '$header',
footer = '$footer',
posttempl = '$posttempl'
");
131 changes: 4 additions & 127 deletions backend.css
Original file line number Diff line number Diff line change
@@ -1,128 +1,5 @@
.procal code {font-weight:bold;}
.procal h3 {font-weight:bold;font-size:1.2em;letter-spacing:-1px;}
.procal hr {height:0;line-height:0;border:0;border-top:1px solid #bbb;width:100%;margin:10px 0;padding:0;}

.modify_content {color:#333;border:1px solid #000;}
.procal .show_calendar {float:right;width:215px;margin-bottom:20px;}
.procal .calendarmod {border-collapse:collapse;background:#fff;width:100%;font-size:12px;font-family:arial,helvetica,sans-serif;border:1px solid #bbb;}
.procal .calendarmod a {text-decoration:none;display:block;}
.procal .calendarmod td {height:20px;text-align:center;line-height:20px;border:1px solid #bbb;}

.procal .arrows {float:left;width:50%;}
.procal tr.calendarmod-header td {text-align:center;font-weight:bold;background:#f0f0f0;}
.procal tr.calendarmod-header td a {display:block;height:20px;line-height:20px;background:#c7e5c7;}
.procal tr.calendarmod-header td a:hover {background:#a5d5a5 !important;}
.procal td.calendar_weekday {background:#f0f0f0;width:30px;}
.procal td.calendar_emptyday:hover {background:#c7e5c7;}
.procal td.calendar_markday {background:#ffdfe0;font-weight:bold;}
.procal td.calendar_markday:hover {background:#ffc3c5;}
.procal td.calendar_noday {background:#fff;}
.procal td.procal_today {border:2px solid #ff0000;}

.procal .actionlist { margin:20px 0;}
.procal .actionlist_table {width:100%;background:#f0f0f0;}
.procal .actionlist tr {background:#f0f0f0;height:22px;line-height:1.8;width:100%;}
.procal .actionlist tr:hover {background:#eaeff6;}
.procal .actionlist td {border-top:1px solid #f9f9f9;border-bottom:1px solid #f9f9f9;padding:0 10px;height:22px;line-height:22px;}
.procal .actionlist h2 {font-size:14px;text-align:center;font-weight:bold;margin:0;letter-spacing:normal;}
.procal .actionlist_header {font-weight:bold;background:none !important;}

.procal .event_details {width:100%;border-top:1px solid #ccc;padding-top:15px;clear:both;}

.procal input {font-size:11px;padding:2px;}

.procal .double_field_line {height:60px;line-height:1.5;}
.procal .triple_field_line {height:90px;line-height:1.5;}
.procal .line_box {height:30px;width:212px;float:left;}
.procal .edit_label td {width:10px;}

.procal .edit_field,
.procal .edit_description {width: 50%;}
.procal .edit_select {width: 50%;padding:0 0 0 2px;}
.procal .edit_select_short {width:290px;padding:0 0 0 2px;}
.procal .edit_field_short {width:280px;}
.procal .edit_date,
.procal .edit_time {width:80px;}

.procal #buttonrow {width:100%;margin-bottom:15px;}
.procal .edit_button,
.procal .mod_procalendar_edit_css {padding:1px 5px;width:125px;font-size:11px;}
.procal .float_right {float:right;}

.procal .customfields textarea {width:98%;height:80px;margin-bottom:20px;}

/*
Needed css for DatePicker calendar.
DON'T CONVERT CaPITaLS TO LOWERCaSE! Datepicker will not function if set to lowercase!
*/
table.jCalendar {border-bottom:#000 1px solid;border-left:#000 1px solid;border-spacing:2px;border-collapse:separate;background:#aaa;border-top:#000 1px solid;border-right:#000 1px solid;}
table.jCalendar TH {background:#333;color:#fff;font-weight:bold;padding:3px 5px;}
table.jCalendar td {text-align:center;background:#ccc;color:#000;padding:3px 5px;}
table.jCalendar td.other-month {background:#ddd;color:#aaa;}
table.jCalendar td.today {background:#666;color:#fff;}
table.jCalendar td.dp-hover.selected {background:#f33;color:#fff;}

div.dp-popup {position:relative;line-height:1.2em;width:186px;font-family:arial, sans-serif;background:#ccc;font-size:10px;padding:2px;}
div#dp-popup {z-index:199;position:absolute;}
div.dp-popup H2 {text-align:center;font-size:12px;margin:2px 0;padding:0;}

a#dp-close {text-align:center;display:block;font-size:11px;padding:4px 0;}
a#dp-close:hover {text-decoration:underline;}

div.dp-popup a {color:#000;text-decoration:none;padding:3px 2px 0;}
div.dp-popup div.dp-nav-prev {position:absolute;width:100px;top:2px;left:4px;}
div.dp-popup div.dp-nav-prev a {float:left;cursor:pointer;}
div.dp-popup div.dp-nav-next a {cursor:pointer;float:right;}
div.dp-popup div.dp-nav-next {position:absolute;width:100px;top:2px;right:4px;}
div.dp-popup a.disabled {color:#aaa;cursor:default;}
div.dp-popup td {cursor:pointer;}

input.dp-applied {width:120px;float:left;}

a.dp-choose-date {text-indent:-2000px;width:16px;display:block;background:url('./js/calendar.png') no-repeat;float:left;height:16px;overflow:hidden;margin:3px;padding:0;}
a.dp-disabled.dp-choose-date {cursor:default;}

#calendar-me {margin:20px;}

table.jCalendar td.selected,
table.jCalendar tr.selectedWeek td {background:#f66;color:#fff;}
table.jCalendar td.dp-hover,
table.jCalendar tr.activeWeekHover td {background:#fff;color:#000;}
table.jCalendar td.disabled,
table.jCalendar td.dp-hover.disabled,table.jCalendar td.unselectable,
table.jCalendar td.unselectable:hover,
table.jCalendar td.dp-hover.unselectable {background:#bbb;color:#888;}

div.dp-popup div.dp-nav-prev a.disabled,
div.dp-popup div.dp-nav-next a.disabled,
div.dp-popup td.disabled {cursor:default;}
/*----------------------------------------------------------------------------------------*/
.procal #start_time,
.procal #end_time {vertical-align:top;}

.procal .procal_hidden {display:none;}
.procal .rec_rep_count {vertical-align:top;}

.procal .field_area,
.procal .field_line,
.procal .field_link { margin: 0.225em 0; position: relative; }
/*
.field_line {min-height: 2.125em; line-height: 1.5;}
.field_area {min-height:4.525em; line-height:2.5;}
*/
.procal .field_title { float:left; width:20%; font-weight: bold; text-align: right; padding-right: 0.925rem; white-space-collapsing: discard; }

.clearfix::before,
.clearfix::after {
content: " ";
display: table;
}

.clearfix::after {
clear: both;
}

.clearfix {
*zoom: 1; /* Für den IE6 und IE7 */
}
@charset "utf-8";
@import url('themes/default/css/default.css');
@import url('themes/default/css/3/w3.css');

select {width:initial;}
78 changes: 62 additions & 16 deletions backend_body.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,99 @@
if (typeof MODULE_URL != 'undefined') {

// Variables are set in functions.php from line 1292-ish
// Include datepicker files:
$.insert(MODULE_URL + '/js/date.js');
$.insert(MODULE_URL + '/js/jquery.datePicker.js');
// Include datepicker files: datePicker
$.insert(MODULE_URL + '/themes/default/js/TimePicki/css/timepicki.css');
$.insert(MODULE_URL + '/themes/default/js/DatePicker/styles/datePicker.css');
$.insert(MODULE_URL + '/themes/default/js/TimePicki/js/timepicki.js');
$.insert(MODULE_URL + '/themes/default/js/DatePicker/scripts/date.js');
$.insert(MODULE_URL + '/themes/default/js/DatePicker/scripts/jquery.datePicker.js');

// This is only needed for ie 6 and smaller
if ($.browser.msie && $.browser.version.substr(0,1)<7) {
$.insert(MODULE_URL + '/js/jquery.bgiframe.js');
$.insert(MODULE_URL + '/themes/default/js/DatePicker/scripts/jquery.bgiframe.js');
}
// Insert language file if it is not none!
if (datelang !== "none") {
$.insert(MODULE_URL + '/js/lang/'+ datelang);
$.insert(MODULE_URL + '/themes/default/js/DatePicker/lang/'+ datelang);
}
// firstday 0=sunday, 1=monday
// Fomat = datefomat yyyy/mm/dd or dd mm yyy or ...
Date.firstDayOfWeek = firstDay;
Date.format = format;

// set up the calendars and make them work together, date from first will be minimum date for second
$(function()
{
$(function(){
$('.date-pick').datePicker({
clickInput:true,
clickInput:false,
autoFocusNextInput: true,
startDate:datefrom
});

$('#date1').bind(
// Update date2 when date changes, set starting date to date1
'dpClosed',
function(e, selectedDates)
{
var d = selectedDates[0];
if (d) {
d = new Date(d);
$('#date2').dpSetStartDate(d.addDays(0).asString());
$('#date2').dpSetStartDate(d.addDays(1).asString());
}
}
).datestart; // datestart!!
console.info(datestart);
$('#date2').datePicker().dpSetStartDate(datestart).dateend; // dateend!!
});
);

$('#date2').bind(
'dpClosed',
function(e, selectedDates)
{
var d = selectedDates[0];
if (d) {
d = new Date(d);
$('#date1').dpSetEndDate(d.addDays(-1).asString());
}
}
);

begin = document.getElementById('start_time');
t1 = (begin ? begin.value : '');
time = t1.split(":");
$('#start_time').timepicki({
start_time:time,
show_meridian:false,
min_hour_value:0,
max_hour_value:23,
step_size_minutes:1,
overflow_minutes:true,
increase_direction:'up',
disable_keyboard_mobile: false
});
end = document.getElementById('end_time');
t2 = (end ? end.value : '');
time = t2.split(":");
$('#end_time').timepicki({
start_time:time,
show_meridian:false,
min_hour_value:0,
max_hour_value:23,
step_size_minutes:1,
overflow_minutes:true,
increase_direction:'up',
disable_keyboard_mobile: false
});
});

// End of MODULE_URL test
};

// load the ColorPicker for editing categories only when needed
if (location.href.search(/modify_settings/) > -1)
$.insert(MODULE_URL + 'js/mColorPicker/javascripts/mColorPicker.js');
$.insert('js/mColorPicker/javascripts/mColorPicker.js');

$(document).ready(function () {
// functions for colors in actionlist
$('.edit_field_short').bind('colorpicked', function (e,color) {
$('input[name="action_background"]').attr('value', color);
});

$('.rec_select input').bind("change myinit", function(event){
if ($(this).attr('id') == 'rec_exceptions'){
if (event.type != "myinit")
Expand Down Expand Up @@ -91,15 +130,19 @@ $(document).ready(function () {
$('.rec_rep_select input').bind("click change",function(){
$('.rec_rep_select input').not($(this)).attr('value',"");
$('.rec_rep_select input').not($(this)).prop("checked", false);
/*
$('#date2').attr('value',"");
$('#end_time').attr('value',"");
*/
});
$('#date2').bind("click change",function(){
$('.rec_rep_select input').attr('value',"");
$('.rec_rep_select input').prop("checked", false);
/*
if ($('#end_time').val() == '') {
$('#end_time').attr('value',"00:00");
$('#end_time').attr('value',"00:00");
}
*/
});
$('.rec_day input').bind("click change",function(){
if (isNaN($(this).attr('value'))) $(this).attr('value',"");
Expand Down Expand Up @@ -183,11 +226,14 @@ $(document).ready(function () {
$('.edit_button').click(function(){
$('#date1, #date2').prop("disabled", false);
});

$('.rec_select input').prop("checked", false);
$('.rec_select input').prop("disabled", true);
$('.procal_hidden').hide();
$('#delete').hide();
$('#date1, #date2').attr('value',$('#rec_day_called').attr('value'));
$('#date1, #date2').prop("disabled", true);

};
};
};
Expand Down
Loading

0 comments on commit 0cb8d37

Please sign in to comment.