mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
ALPHA 3.0.1d
This commit is contained in:
26
public/assets/admin/assets/scss/style.css
vendored
26
public/assets/admin/assets/scss/style.css
vendored
@@ -2238,3 +2238,29 @@ header .form-inline {
|
||||
padding: 5px; } }
|
||||
|
||||
/*# sourceMappingURL=style.css.map */
|
||||
|
||||
.calendar{
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.calendar-body-column {
|
||||
display: flex;
|
||||
}
|
||||
.calendar-container{
|
||||
height: 7.5rem;
|
||||
text-align: center;
|
||||
vertical-align: middle !important;
|
||||
border: none !important;
|
||||
}
|
||||
.btn-calendar{
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
border-radius: 50%;
|
||||
background-color: #949CA0;
|
||||
}
|
||||
.thead-dark {
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-color: #32383e;
|
||||
text-align: center;
|
||||
}
|
||||
111
public/assets/js/calendar/calendar.js
vendored
Normal file
111
public/assets/js/calendar/calendar.js
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
init();
|
||||
|
||||
function init() {
|
||||
|
||||
var lastid = 99;
|
||||
|
||||
(function($) {
|
||||
$( document ).ajaxError(function() {
|
||||
$( ".log" ).text( "Triggered ajaxError handler." );
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
(function($) {
|
||||
var mycalendar = $('.calendar');
|
||||
|
||||
$.post('/api/calendar/generate', { month: "7", year: "2018" } , function(data) {
|
||||
mycalendar.replaceWith(data);
|
||||
|
||||
console.log('Calendar Initialised');
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
|
||||
}
|
||||
|
||||
function calsetactive(myid) {
|
||||
if (lastid != 99) {
|
||||
document.getElementById(lastid).classList.toggle("calendar-btn-active");
|
||||
}
|
||||
var myDate = document.getElementById(myid);
|
||||
myDate.classList.toggle("calendar-btn-active");
|
||||
lastid = myid;
|
||||
|
||||
if (myDate.classList.contains("calendar-nothing")) {
|
||||
calendarEmptyDay(myid);
|
||||
} else {
|
||||
calendarOpen(myid);
|
||||
}
|
||||
}
|
||||
|
||||
function calendarOpen(myid) {
|
||||
var mydate = document.getElementById(myid).name;
|
||||
$(function() {
|
||||
var loadingDiv = $('#calendarmodalload');
|
||||
$.get('/adminV2/assets/lib/calendar/calendarmodal.php?date='+mydate, function(data) {
|
||||
loadingDiv.replaceWith(data);
|
||||
console.log("Loading day: "+mydate);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function calendarEmptyDay(myid) {
|
||||
var mydate = document.getElementById(myid).name;
|
||||
$(function() {
|
||||
var loadingDiv = $('#calendarmodalload');
|
||||
$.get('/adminV2/assets/lib/calendar/calendarEmptyDay.php?date='+mydate, function(data) {
|
||||
loadingDiv.replaceWith(data);
|
||||
console.log("Loading empty day: "+mydate);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Modal Calendar
|
||||
// When the user clicks on <span> (x), close the modal
|
||||
function calendarmodalClose() {
|
||||
document.getElementById('calendar-modal').style.display = "none";
|
||||
}
|
||||
|
||||
// When the user clicks anywhere outside of the modal, close it
|
||||
window.onclick = function(event) {
|
||||
if (event.target == document.getElementById('calendar-modal')) {
|
||||
document.getElementById('calendar-modal').style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
// Boutton Back and Next on calendar Head
|
||||
function calendarback() {
|
||||
console.log("click detect");
|
||||
lastid = 99;
|
||||
$(function() {
|
||||
var mycalendar = $('.calendar');
|
||||
varmonth = varmonth - 1;
|
||||
if (varmonth < 1) {
|
||||
varyear = varyear - 1;
|
||||
varmonth = 12;
|
||||
}
|
||||
$.get('/adminV2/assets/lib/calendar/calendar.php?month='+varmonth+'&year='+varyear, function(data) {
|
||||
mycalendar.replaceWith(data);
|
||||
console.log("Going next");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function calendarnext(){
|
||||
console.log("click detect");
|
||||
lastid = 99;
|
||||
$(function() {
|
||||
var mycalendar = $('.calendar');
|
||||
varmonth = varmonth + 1;
|
||||
if (varmonth > 12) {
|
||||
varyear = varyear + 1;
|
||||
varmonth = 1;
|
||||
}
|
||||
$.get('/adminV2/assets/lib/calendar/calendar.php?month='+varmonth+'&year='+varyear, function(data) {
|
||||
mycalendar.replaceWith(data);
|
||||
console.log("Going next");
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user