summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-09-06 23:44:40 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-09-06 23:44:40 +0200
commitce035016460d8285d5511e67b389d494eb78c1ce (patch)
tree30a9a60b0e90622802984a860b050134e3fff430 /core/js
parent673e0c01a79927359319ff15411a33f460d85ac5 (diff)
downloadnextcloud-server-ce035016460d8285d5511e67b389d494eb78c1ce.tar.gz
nextcloud-server-ce035016460d8285d5511e67b389d494eb78c1ce.zip
fine ie8 compatability
Diffstat (limited to 'core/js')
-rw-r--r--core/js/oc-dialogs.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index bc460798350..82bf49fc3a7 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -229,8 +229,11 @@ var OCdialogs = {
conflict.find('.filename').text(original.name);
conflict.find('.original .size').text(humanFileSize(original.size));
conflict.find('.original .mtime').text(formatDate(original.mtime*1000));
- conflict.find('.replacement .size').text(humanFileSize(replacement.size));
- conflict.find('.replacement .mtime').text(formatDate(replacement.lastModifiedDate));
+ // ie sucks
+ if (replacement.size && replacement.lastModifiedDate) {
+ conflict.find('.replacement .size').text(humanFileSize(replacement.size));
+ conflict.find('.replacement .mtime').text(formatDate(replacement.lastModifiedDate));
+ }
var path = getPathForPreview(original.name);
lazyLoadPreview(path, original.type, function(previewpath){
conflict.find('.original .icon').css('background-image','url('+previewpath+')');
@@ -242,18 +245,19 @@ var OCdialogs = {
conflicts.append(conflict);
//set more recent mtime bold
- if (replacement.lastModifiedDate.getTime() > original.mtime*1000) {
+ // ie sucks
+ if (replacement.lastModifiedDate && replacement.lastModifiedDate.getTime() > original.mtime*1000) {
conflict.find('.replacement .mtime').css('font-weight', 'bold');
- } else if (replacement.lastModifiedDate.getTime() < original.mtime*1000) {
+ } else if (replacement.lastModifiedDate && replacement.lastModifiedDate.getTime() < original.mtime*1000) {
conflict.find('.original .mtime').css('font-weight', 'bold');
} else {
//TODO add to same mtime collection?
}
// set bigger size bold
- if (replacement.size > original.size) {
+ if (replacement.size && replacement.size > original.size) {
conflict.find('.replacement .size').css('font-weight', 'bold');
- } else if (replacement.size < original.size) {
+ } else if (replacement.size && replacement.size < original.size) {
conflict.find('.original .size').css('font-weight', 'bold');
} else {
//TODO add to same size collection?