summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js
diff options
context:
space:
mode:
authorMichael Scherle2016-11-26 20:35:01 +0100
committerMichael Scherle2016-11-26 20:35:01 +0100
commit96c7437d5522295edfc95cadd308352e2ffa7a56 (patch)
tree40abdf333fe7fc905af79445b776c455bd6eba21 /modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js
parentFixed a coordination bug which caused rotation bugs. Deleted the locationinfo... (diff)
downloadslx-admin-96c7437d5522295edfc95cadd308352e2ffa7a56.tar.gz
slx-admin-96c7437d5522295edfc95cadd308352e2ffa7a56.tar.xz
slx-admin-96c7437d5522295edfc95cadd308352e2ffa7a56.zip
fixes, support for time over config...
Diffstat (limited to 'modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js')
-rwxr-xr-xmodules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js23
1 files changed, 16 insertions, 7 deletions
diff --git a/modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js b/modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js
index 4e6017ef..897437e7 100755
--- a/modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js
+++ b/modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js
@@ -19,8 +19,18 @@
* If you're after a monthly calendar plugin, check out this one :
* http://arshaw.com/fullcalendar/
*/
+var startdate;
+
+function SetUpDate(d) {
+ startdate = d.getTime()-new Date().getTime();
+}
+
+function myDate() {
+ return new Date(startdate +new Date().getTime());
+}
(function($) {
+
// check the jquery version
var _v = $.fn.jquery.split('.'),
_jQuery14OrLower = (10 * _v[0] + _v[1]) < 15;
@@ -29,7 +39,7 @@
return {
options: {
- date: new Date(),
+ date: new myDate(),
timeFormat: null,
dateFormat: 'M d, Y',
alwaysDisplayTimeMinutes: true,
@@ -325,7 +335,7 @@
*/
today: function() {
this._clearCalendar();
- this._loadCalEvents(new Date());
+ this._loadCalEvents(new myDate());
},
/*
@@ -509,7 +519,7 @@
this._loadCalEvents(newDate);
},
getCurrentFirstDay: function() {
- return this._dateFirstDayOfWeek(this.options.date || new Date());
+ return this._dateFirstDayOfWeek(this.options.date || new myDate());
},
getCurrentLastDay: function() {
return this._addDays(this.getCurrentFirstDay(), this.options.daysToShow - 1);
@@ -1256,7 +1266,7 @@
* Draws a thin line which indicates the current time.
*/
_drawCurrentHourLine: function() {
- var d = new Date(),
+ var d = new myDate(),
options = this.options,
businessHours = options.businessHours;
@@ -1273,7 +1283,6 @@
var nbHours = d.getHours() - paddingStart + d.getMinutes() / 60;
var positionTop = nbHours * options.timeslotHeight * options.timeslotsPerHour;
var lineWidth = $('.wc-scrollable-grid .wc-today', this.element).width() + 3;
-
$('.wc-scrollable-grid .wc-today', this.element).append(
$('<div>', {
'class': 'wc-hourline',
@@ -1984,7 +1993,7 @@
_isToday: function(date) {
var clonedDate = this._cloneDate(date);
this._clearTime(clonedDate);
- var today = new Date();
+ var today = new myDate();
this._clearTime(today);
return today.getTime() === clonedDate.getTime();
},
@@ -2940,5 +2949,5 @@
return this;
}
});
-
})(jQuery);
+