mirror of https://github.com/xwiki-labs/cryptpad
Fix calendar issues
This commit is contained in:
parent
1d062c98f2
commit
acd7d9654d
|
@ -124,7 +124,6 @@ define([
|
|||
};
|
||||
|
||||
var getDateLanguage = function () {
|
||||
console.error(Messages._languageUsed);
|
||||
try {
|
||||
new Date().toLocaleDateString(Messages._languageUsed, { weekday: 'long' });
|
||||
return Messages._languageUsed;
|
||||
|
|
|
@ -21,10 +21,12 @@ define([
|
|||
meta.calendarOpts = Utils.Hash.decodeDataOptions(parsed.hashData.newPadOpts);
|
||||
}
|
||||
}
|
||||
meta.calendarHash = Boolean(window.location.hash);
|
||||
meta.calendarHash = hash;
|
||||
};
|
||||
SFCommonO.start({
|
||||
addData: addData,
|
||||
hash: hash,
|
||||
href: href,
|
||||
noRealtime: true,
|
||||
cache: true,
|
||||
});
|
||||
|
|
|
@ -913,14 +913,14 @@ define([
|
|||
cleanKeys(update.one);
|
||||
}
|
||||
|
||||
if (changes.start && (!type.which || type.which === "all")) {
|
||||
if (changes.start && update && (!type.which || type.which === "all")) {
|
||||
var diff = changes.start - ev.start;
|
||||
var newOne = {};
|
||||
var newFrom = {};
|
||||
Object.keys(update.one).forEach(function (time) {
|
||||
Object.keys(update.one || {}).forEach(function (time) {
|
||||
newOne[Number(time)+diff] = update.one[time];
|
||||
});
|
||||
Object.keys(update.from).forEach(function (time) {
|
||||
Object.keys(update.from || {}).forEach(function (time) {
|
||||
newFrom[Number(time)+diff] = update.from[time];
|
||||
});
|
||||
update.one = newOne;
|
||||
|
|
Loading…
Reference in New Issue