Merge branch 'spidev' into 'master'
Kalender See merge request fronk/thetool!816
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
.fc-event {
|
.fc-event {
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: move;
|
cursor: no-drop;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
margin: 3px 7px;
|
margin: 3px 7px;
|
||||||
padding: 1px 5px;
|
padding: 1px 5px;
|
||||||
@@ -671,3 +671,6 @@ thead .fc-day-today .fc-scrollgrid-sync-inner .fc-col-header-cell-cushion {
|
|||||||
margin-left: -28px;
|
margin-left: -28px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
.cursor-alias{
|
||||||
|
cursor: alias;
|
||||||
|
}
|
||||||
@@ -87,6 +87,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
var duration = null;
|
var duration = null;
|
||||||
var rruleflag = false;
|
var rruleflag = false;
|
||||||
let allDAy;
|
let allDAy;
|
||||||
|
let cursorclass = "";
|
||||||
$.each($('.calendar-check'), function (index, value) {
|
$.each($('.calendar-check'), function (index, value) {
|
||||||
if ($(this).prop('checked')) {
|
if ($(this).prop('checked')) {
|
||||||
rights = true;
|
rights = true;
|
||||||
@@ -109,7 +110,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
duration = null;
|
duration = null;
|
||||||
rruleflag = false;
|
rruleflag = false;
|
||||||
category = value.ccategory.ccategory;
|
category = value.ccategory.ccategory;
|
||||||
|
cursorclass = "";
|
||||||
|
|
||||||
if (value.calendar_id.calendar_id in calendarRights) {
|
if (value.calendar_id.calendar_id in calendarRights) {
|
||||||
if (calendarRights[value.calendar_id.calendar_id] == 'all') {
|
if (calendarRights[value.calendar_id.calendar_id] == 'all') {
|
||||||
@@ -125,6 +126,10 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
|
|
||||||
if (value.isorganizer.isorganizer == '1' && rights) {
|
if (value.isorganizer.isorganizer == '1' && rights) {
|
||||||
movable = true;
|
movable = true;
|
||||||
|
|
||||||
|
} else if (rights) {
|
||||||
|
movable = false;
|
||||||
|
cursorclass = "cursor-alias";
|
||||||
} else {
|
} else {
|
||||||
movable = false;
|
movable = false;
|
||||||
}
|
}
|
||||||
@@ -154,7 +159,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
attachments: value.attachments.attachments,
|
attachments: value.attachments.attachments,
|
||||||
calendar_id: value.calendar_id,
|
calendar_id: value.calendar_id,
|
||||||
event_type: value.event_type.event_type,
|
event_type: value.event_type.event_type,
|
||||||
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id],
|
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id, cursorclass],
|
||||||
textColor: value.txtColor.txtColor,
|
textColor: value.txtColor.txtColor,
|
||||||
backgroundColor: value.bgColor.bgColor,
|
backgroundColor: value.bgColor.bgColor,
|
||||||
privateflag: value.privateflag.privateflag,
|
privateflag: value.privateflag.privateflag,
|
||||||
@@ -191,7 +196,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
attachments: value.attachments.attachments,
|
attachments: value.attachments.attachments,
|
||||||
calendar_id: value.calendar_id,
|
calendar_id: value.calendar_id,
|
||||||
event_type: value.event_type.event_type,
|
event_type: value.event_type.event_type,
|
||||||
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id],
|
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id, cursorclass],
|
||||||
textColor: value.txtColor.txtColor,
|
textColor: value.txtColor.txtColor,
|
||||||
backgroundColor: value.bgColor.bgColor,
|
backgroundColor: value.bgColor.bgColor,
|
||||||
privateflag: value.privateflag.privateflag,
|
privateflag: value.privateflag.privateflag,
|
||||||
@@ -839,6 +844,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
var rrule = null;
|
var rrule = null;
|
||||||
var duration = null;
|
var duration = null;
|
||||||
var rruleflag = false;
|
var rruleflag = false;
|
||||||
|
let cursorclass = '';
|
||||||
if (event.rrule) {
|
if (event.rrule) {
|
||||||
rrule = event.rrule;
|
rrule = event.rrule;
|
||||||
duration = event.duration;
|
duration = event.duration;
|
||||||
@@ -852,6 +858,9 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
}
|
}
|
||||||
if (event.isorganizer == '1' && rights) {
|
if (event.isorganizer == '1' && rights) {
|
||||||
movable = true;
|
movable = true;
|
||||||
|
} else if (rights) {
|
||||||
|
cursorclass = "cursor-alias"
|
||||||
|
movable = false;
|
||||||
} else {
|
} else {
|
||||||
movable = false;
|
movable = false;
|
||||||
}
|
}
|
||||||
@@ -877,7 +886,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
backgroundColor: event.bgColor,
|
backgroundColor: event.bgColor,
|
||||||
location: event.location,
|
location: event.location,
|
||||||
event_type: event.event_type,
|
event_type: event.event_type,
|
||||||
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id],
|
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id, cursorclass],
|
||||||
attachment: event.attachment,
|
attachment: event.attachment,
|
||||||
attachments: event.attachments,
|
attachments: event.attachments,
|
||||||
editable: movable,
|
editable: movable,
|
||||||
@@ -907,7 +916,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
editable: false,
|
editable: false,
|
||||||
location: event.location,
|
location: event.location,
|
||||||
event_type: event.event_type,
|
event_type: event.event_type,
|
||||||
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id],
|
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id, cursorclass],
|
||||||
attachment: event.attachment,
|
attachment: event.attachment,
|
||||||
attachments: event.attachments,
|
attachments: event.attachments,
|
||||||
calendar_id: event.calendar_id_check,
|
calendar_id: event.calendar_id_check,
|
||||||
@@ -939,7 +948,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
location: event.location,
|
location: event.location,
|
||||||
privateflag: event.privateflag,
|
privateflag: event.privateflag,
|
||||||
event_type: event.event_type,
|
event_type: event.event_type,
|
||||||
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id],
|
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id, cursorclass],
|
||||||
attachment: event.attachment,
|
attachment: event.attachment,
|
||||||
attachments: event.attachments,
|
attachments: event.attachments,
|
||||||
editable: movable,
|
editable: movable,
|
||||||
@@ -966,7 +975,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
location: event.location,
|
location: event.location,
|
||||||
privateflag: event.privateflag,
|
privateflag: event.privateflag,
|
||||||
event_type: event.event_type,
|
event_type: event.event_type,
|
||||||
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id],
|
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id, cursorclass],
|
||||||
attachment: event.attachment,
|
attachment: event.attachment,
|
||||||
attachments: event.attachments,
|
attachments: event.attachments,
|
||||||
calendar_id: event.calendar_id_check,
|
calendar_id: event.calendar_id_check,
|
||||||
@@ -1646,6 +1655,11 @@ Xinon GMbH`;
|
|||||||
|
|
||||||
let groupname = $.trim($(this).text());
|
let groupname = $.trim($(this).text());
|
||||||
$(this).html('<input type="text" data-oldname="' + groupname + '" class="form-control cal-group-name-input" value="' + groupname + '">');
|
$(this).html('<input type="text" data-oldname="' + groupname + '" class="form-control cal-group-name-input" value="' + groupname + '">');
|
||||||
|
var strLength = $(this).find('.cal-group-name-input').val().length * 2;
|
||||||
|
|
||||||
|
|
||||||
|
$(this).find('.cal-group-name-input')[0].setSelectionRange(strLength, strLength);
|
||||||
|
$(this).find('.cal-group-name-input').focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").on("click", ".group-checkbox", function () {
|
$("body").on("click", ".group-checkbox", function () {
|
||||||
@@ -1741,11 +1755,26 @@ Xinon GMbH`;
|
|||||||
$(this).closest('div').find('.move-group-div').show();
|
$(this).closest('div').find('.move-group-div').show();
|
||||||
$(this).closest('div').find('.group-checkbox-div').show();
|
$(this).closest('div').find('.group-checkbox-div').show();
|
||||||
$(this).closest('.cal-group-name').text($(this).data('oldname'));
|
$(this).closest('.cal-group-name').text($(this).data('oldname'));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("body").on("blur", ".cal-group-name-input", function (e) {
|
||||||
|
let groupname = $.trim($(this).val());
|
||||||
|
if (groupname.length > 3) {
|
||||||
|
|
||||||
|
$(this).closest('div').find('.dropdown-group-div').show();
|
||||||
|
$(this).closest('div').find('.move-group-div').show();
|
||||||
|
$(this).closest('div').find('.group-checkbox-div').show();
|
||||||
|
$(this).closest('.cal-group-name').text(groupname);
|
||||||
|
$(".color-input").eq(0).trigger("change", 1);
|
||||||
|
} else {
|
||||||
|
$(this).closest('div').find('.dropdown-group-div').show();
|
||||||
|
$(this).closest('div').find('.move-group-div').show();
|
||||||
|
$(this).closest('div').find('.group-checkbox-div').show();
|
||||||
|
$(this).closest('.cal-group-name').text($(this).data('oldname'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
function getGroups() {
|
function getGroups() {
|
||||||
const groups = [];
|
const groups = [];
|
||||||
@@ -1887,6 +1916,7 @@ Xinon GMbH`;
|
|||||||
var duration = null;
|
var duration = null;
|
||||||
var rruleflag = false;
|
var rruleflag = false;
|
||||||
let allDAy = false;
|
let allDAy = false;
|
||||||
|
let cursorclass = "";
|
||||||
$.each($('.calendar-check'), function (index, value) {
|
$.each($('.calendar-check'), function (index, value) {
|
||||||
if ($(this).prop('checked')) {
|
if ($(this).prop('checked')) {
|
||||||
rights = true;
|
rights = true;
|
||||||
@@ -1908,6 +1938,7 @@ Xinon GMbH`;
|
|||||||
duration = null;
|
duration = null;
|
||||||
rruleflag = false;
|
rruleflag = false;
|
||||||
allDAy = false;
|
allDAy = false;
|
||||||
|
cursorclass = "";
|
||||||
category = value.ccategory.ccategory;
|
category = value.ccategory.ccategory;
|
||||||
if (value.rrule.rrule) {
|
if (value.rrule.rrule) {
|
||||||
rrule = value.rrule.rrule;
|
rrule = value.rrule.rrule;
|
||||||
@@ -1923,9 +1954,13 @@ Xinon GMbH`;
|
|||||||
}
|
}
|
||||||
if (value.isorganizer.isorganizer == '1' && rights) {
|
if (value.isorganizer.isorganizer == '1' && rights) {
|
||||||
movable = true;
|
movable = true;
|
||||||
|
} else if (rights) {
|
||||||
|
movable = false;
|
||||||
|
cursorclass = "cursor-alias";
|
||||||
} else {
|
} else {
|
||||||
movable = false;
|
movable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.privateflag.privateflag == '1' && mycalendar_id != value.calendar_id.calendar_id) {
|
if (value.privateflag.privateflag == '1' && mycalendar_id != value.calendar_id.calendar_id) {
|
||||||
rights = false;
|
rights = false;
|
||||||
movable = false;
|
movable = false;
|
||||||
@@ -1958,7 +1993,7 @@ Xinon GMbH`;
|
|||||||
attachments: value.attachments.attachments,
|
attachments: value.attachments.attachments,
|
||||||
calendar_id: value.calendar_id,
|
calendar_id: value.calendar_id,
|
||||||
event_type: value.event_type.event_type,
|
event_type: value.event_type.event_type,
|
||||||
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id],
|
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id, cursorclass],
|
||||||
textColor: value.txtColor.txtColor,
|
textColor: value.txtColor.txtColor,
|
||||||
backgroundColor: value.bgColor.bgColor,
|
backgroundColor: value.bgColor.bgColor,
|
||||||
editable: rights,
|
editable: rights,
|
||||||
@@ -1995,7 +2030,7 @@ Xinon GMbH`;
|
|||||||
attachments: value.attachments.attachments,
|
attachments: value.attachments.attachments,
|
||||||
calendar_id: value.calendar_id,
|
calendar_id: value.calendar_id,
|
||||||
event_type: value.event_type.event_type,
|
event_type: value.event_type.event_type,
|
||||||
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id],
|
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id, cursorclass],
|
||||||
textColor: value.txtColor.txtColor,
|
textColor: value.txtColor.txtColor,
|
||||||
backgroundColor: value.bgColor.bgColor,
|
backgroundColor: value.bgColor.bgColor,
|
||||||
editable: rights,
|
editable: rights,
|
||||||
|
|||||||
Reference in New Issue
Block a user