Merge pull request #24492 from nextcloud/backport/24376/stable19

[stable19] fix loading mtime of new file in conflict dialog in firefox
This commit is contained in:
John Molakvoæ 2020-12-03 07:44:33 +01:00 committed by GitHub
commit 769f4daece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -789,9 +789,9 @@ const Dialogs = {
$originalDiv.find('.size').text(OC.Util.humanFileSize(original.size)) $originalDiv.find('.size').text(OC.Util.humanFileSize(original.size))
$originalDiv.find('.mtime').text(OC.Util.formatDate(original.mtime)) $originalDiv.find('.mtime').text(OC.Util.formatDate(original.mtime))
// ie sucks // ie sucks
if (replacement.size && replacement.lastModifiedDate) { if (replacement.size && replacement.lastModified) {
$replacementDiv.find('.size').text(OC.Util.humanFileSize(replacement.size)) $replacementDiv.find('.size').text(OC.Util.humanFileSize(replacement.size))
$replacementDiv.find('.mtime').text(OC.Util.formatDate(replacement.lastModifiedDate)) $replacementDiv.find('.mtime').text(OC.Util.formatDate(replacement.lastModified))
} }
var path = original.directory + '/' + original.name var path = original.directory + '/' + original.name
var urlSpec = { var urlSpec = {
@ -822,9 +822,9 @@ const Dialogs = {
// set more recent mtime bold // set more recent mtime bold
// ie sucks // ie sucks
if (replacement.lastModifiedDate && replacement.lastModifiedDate.getTime() > original.mtime) { if (replacement.lastModified > original.mtime) {
$replacementDiv.find('.mtime').css('font-weight', 'bold') $replacementDiv.find('.mtime').css('font-weight', 'bold')
} else if (replacement.lastModifiedDate && replacement.lastModifiedDate.getTime() < original.mtime) { } else if (replacement.lastModified < original.mtime) {
$originalDiv.find('.mtime').css('font-weight', 'bold') $originalDiv.find('.mtime').css('font-weight', 'bold')
} else { } else {
// TODO add to same mtime collection? // TODO add to same mtime collection?