fine ie8 compatability

remotes/origin/stable6
Jörn Friedrich Dreyer 11 years ago
parent 673e0c01a7
commit ce03501646
  1. 4
      apps/files/css/files.css
  2. 6
      apps/files/js/file-upload.js
  3. 16
      core/js/oc-dialogs.js

@ -380,6 +380,10 @@ table.dragshadow td.size {
float: left;
width: 235px;
}
html.lte9 .oc-dialog .fileexists .original {
float: left;
width: 225px;
}
.oc-dialog .fileexists .conflicts {
overflow-y:scroll;
max-height: 225px;

@ -197,7 +197,11 @@ OC.Upload = {
},
onAutorename:function(data){
this.logStatus('autorename', null, data);
data.data.append('resolution', 'autorename');
if (data.data) {
data.data.append('resolution', 'autorename');
} else {
data.formData.push({name:'resolution',value:'autorename'}); //hack for ie8
}
data.submit();
},
logStatus:function(caption, e, data) {

@ -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?

Loading…
Cancel
Save