From 00623b1c73eccc4a30e21af0d35a2dd496653507 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 29 Sep 2015 18:11:47 +0200 Subject: [IE8] Rescale PNG icons to 32x32 --- core/img/filetypes/application-pdf.png | Bin 1022 -> 892 bytes core/img/filetypes/application.png | Bin 614 -> 805 bytes core/img/filetypes/audio.png | Bin 781 -> 640 bytes core/img/filetypes/file.png | Bin 251 -> 306 bytes core/img/filetypes/folder-drag-accept.png | Bin 188 -> 283 bytes core/img/filetypes/folder-external.png | Bin 549 -> 595 bytes core/img/filetypes/folder-public.png | Bin 602 -> 693 bytes core/img/filetypes/folder-shared.png | Bin 726 -> 655 bytes core/img/filetypes/folder-starred.png | Bin 683 -> 655 bytes core/img/filetypes/folder.png | Bin 215 -> 276 bytes core/img/filetypes/image.png | Bin 394 -> 486 bytes core/img/filetypes/package-x-generic.png | Bin 210 -> 302 bytes core/img/filetypes/text-calendar.png | Bin 572 -> 570 bytes core/img/filetypes/text-code.png | Bin 314 -> 591 bytes core/img/filetypes/text-vcard.png | Bin 1098 -> 889 bytes core/img/filetypes/text.png | Bin 270 -> 382 bytes core/img/filetypes/video.png | Bin 239 -> 318 bytes core/img/filetypes/x-office-document.png | Bin 270 -> 380 bytes core/img/filetypes/x-office-presentation.png | Bin 179 -> 259 bytes core/img/filetypes/x-office-spreadsheet.png | Bin 266 -> 362 bytes 20 files changed, 0 insertions(+), 0 deletions(-) diff --git a/core/img/filetypes/application-pdf.png b/core/img/filetypes/application-pdf.png index 4029f8aead1..c215094eaa7 100644 Binary files a/core/img/filetypes/application-pdf.png and b/core/img/filetypes/application-pdf.png differ diff --git a/core/img/filetypes/application.png b/core/img/filetypes/application.png index 9be7361d1b6..d9db3b9114c 100644 Binary files a/core/img/filetypes/application.png and b/core/img/filetypes/application.png differ diff --git a/core/img/filetypes/audio.png b/core/img/filetypes/audio.png index 4eb8ab78e3f..3d52756341a 100644 Binary files a/core/img/filetypes/audio.png and b/core/img/filetypes/audio.png differ diff --git a/core/img/filetypes/file.png b/core/img/filetypes/file.png index 3bd7463cfc9..74add13f276 100644 Binary files a/core/img/filetypes/file.png and b/core/img/filetypes/file.png differ diff --git a/core/img/filetypes/folder-drag-accept.png b/core/img/filetypes/folder-drag-accept.png index 80ab53b72b9..1124a02982f 100644 Binary files a/core/img/filetypes/folder-drag-accept.png and b/core/img/filetypes/folder-drag-accept.png differ diff --git a/core/img/filetypes/folder-external.png b/core/img/filetypes/folder-external.png index 5262d72e627..dd8343d245a 100644 Binary files a/core/img/filetypes/folder-external.png and b/core/img/filetypes/folder-external.png differ diff --git a/core/img/filetypes/folder-public.png b/core/img/filetypes/folder-public.png index 17c3ee2a8d9..3da67f85f79 100644 Binary files a/core/img/filetypes/folder-public.png and b/core/img/filetypes/folder-public.png differ diff --git a/core/img/filetypes/folder-shared.png b/core/img/filetypes/folder-shared.png index be5e59cbf28..d24e1d7af4e 100644 Binary files a/core/img/filetypes/folder-shared.png and b/core/img/filetypes/folder-shared.png differ diff --git a/core/img/filetypes/folder-starred.png b/core/img/filetypes/folder-starred.png index b083a9d2d11..4b847bf69ea 100644 Binary files a/core/img/filetypes/folder-starred.png and b/core/img/filetypes/folder-starred.png differ diff --git a/core/img/filetypes/folder.png b/core/img/filetypes/folder.png index 1dbb1154100..e811e9cdfdc 100644 Binary files a/core/img/filetypes/folder.png and b/core/img/filetypes/folder.png differ diff --git a/core/img/filetypes/image.png b/core/img/filetypes/image.png index 0feaecf2830..8ff5e6c119f 100644 Binary files a/core/img/filetypes/image.png and b/core/img/filetypes/image.png differ diff --git a/core/img/filetypes/package-x-generic.png b/core/img/filetypes/package-x-generic.png index 287a1f18869..68117e0d070 100644 Binary files a/core/img/filetypes/package-x-generic.png and b/core/img/filetypes/package-x-generic.png differ diff --git a/core/img/filetypes/text-calendar.png b/core/img/filetypes/text-calendar.png index ff3ced62531..f21c3a9951d 100644 Binary files a/core/img/filetypes/text-calendar.png and b/core/img/filetypes/text-calendar.png differ diff --git a/core/img/filetypes/text-code.png b/core/img/filetypes/text-code.png index 5505102f60e..69744e499e6 100644 Binary files a/core/img/filetypes/text-code.png and b/core/img/filetypes/text-code.png differ diff --git a/core/img/filetypes/text-vcard.png b/core/img/filetypes/text-vcard.png index 77ac138fe1c..087eadaabd1 100644 Binary files a/core/img/filetypes/text-vcard.png and b/core/img/filetypes/text-vcard.png differ diff --git a/core/img/filetypes/text.png b/core/img/filetypes/text.png index 5fca7cb69d7..d6bec70cf43 100644 Binary files a/core/img/filetypes/text.png and b/core/img/filetypes/text.png differ diff --git a/core/img/filetypes/video.png b/core/img/filetypes/video.png index 308e81cca83..7cc1ecdc46a 100644 Binary files a/core/img/filetypes/video.png and b/core/img/filetypes/video.png differ diff --git a/core/img/filetypes/x-office-document.png b/core/img/filetypes/x-office-document.png index d9c5b890583..3bc2f08d1f9 100644 Binary files a/core/img/filetypes/x-office-document.png and b/core/img/filetypes/x-office-document.png differ diff --git a/core/img/filetypes/x-office-presentation.png b/core/img/filetypes/x-office-presentation.png index 5b3733b7121..644fb852009 100644 Binary files a/core/img/filetypes/x-office-presentation.png and b/core/img/filetypes/x-office-presentation.png differ diff --git a/core/img/filetypes/x-office-spreadsheet.png b/core/img/filetypes/x-office-spreadsheet.png index 5a20026ebdd..8f79c32fe01 100644 Binary files a/core/img/filetypes/x-office-spreadsheet.png and b/core/img/filetypes/x-office-spreadsheet.png differ -- cgit v1.2.3 From dbb669246898c2a8bee22624df3a8816df8a0fcd Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 29 Sep 2015 18:15:15 +0200 Subject: [IE8] Fix filetype icon sizes Added hack that uses a "filter" CSS with explicit URL to fix the "New" menu by scaling down icons and also fix the folder/filetype icon in the sidebar by scaling it up. --- apps/files/js/mainfileinfodetailview.js | 2 ++ apps/files/js/newfilemenu.js | 1 + core/js/js.js | 40 +++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index 82cca0d0fb3..bdec9c08509 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -131,6 +131,7 @@ } else { // TODO: special icons / shared / external $iconDiv.css('background-image', 'url("' + OC.MimeType.getIconUrl('dir') + '")'); + OC.Util.scaleFixForIE8($iconDiv); } this.$el.find('[title]').tooltip({placement: 'bottom'}); } else { @@ -193,6 +194,7 @@ $iconDiv.css({ 'background-image': 'url("' + $iconDiv.previewImg + '")' }); + OC.Util.scaleFixForIE8($iconDiv); }.bind(this) }); } diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js index 4c021e6b873..10ddf706d74 100644 --- a/apps/files/js/newfilemenu.js +++ b/apps/files/js/newfilemenu.js @@ -210,6 +210,7 @@ fileType: 'folder' }] })); + OC.Util.scaleFixForIE8(this.$('.svg')); }, /** diff --git a/core/js/js.js b/core/js/js.js index 397fea8e3c5..e40141ac617 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1596,6 +1596,46 @@ OC.Util = { }); }, + /** + * Fix image scaling for IE8, since background-size is not supported. + * + * This scales the image to the element's actual size, the URL is + * taken from the "background-image" CSS attribute. + * + * @param {Object} $el image element + */ + scaleFixForIE8: function($el) { + if (!this.isIE8()) { + return; + } + var self = this; + $($el).each(function() { + var url = $(this).css('background-image'); + var r = url.match(/url\(['"]?([^'")]*)['"]?\)/); + if (!r) { + return; + } + url = r[1]; + url = self.replaceSVGIcon(url); + // TODO: escape + url = url.replace(/'/g, '%27'); + $(this).css({ + 'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + url + '\', sizingMethod=\'scale\')', + 'background-image': '' + }); + }); + return $el; + }, + + /** + * Returns whether this is IE8 + * + * @return {bool} true if this is IE8, false otherwise + */ + isIE8: function() { + return $('html').hasClass('ie8'); + }, + /** * Remove the time component from a given date * -- cgit v1.2.3 From 97bfc20ac874416dc1de509abc46799da49ba58c Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 29 Sep 2015 18:27:42 +0200 Subject: [IE8] Fix popover menu borders for IE8 - fixes "New" menu - fixes file actions menu --- apps/files/css/files.css | 3 +++ core/css/apps.css | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/apps/files/css/files.css b/apps/files/css/files.css index c0701fb18b8..24f7a3e5a98 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -574,6 +574,9 @@ a.action > img { #fileList .popovermenu { margin-right: 21px; } +.ie8 #fileList .popovermenu { + margin-top: -10px; +} .ie8 #fileList a.action img, #fileList tr:hover a.action, diff --git a/core/css/apps.css b/core/css/apps.css index 23e0c519d00..3122a2b48a1 100644 --- a/core/css/apps.css +++ b/core/css/apps.css @@ -308,6 +308,13 @@ -o-filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); } +.ie8 .bubble { + border: 1px solid #eee; + margin-top: 18px; +} +.ie8 .bubble:after { + display: none; +} /* miraculous border arrow stuff */ .bubble:after, #app-navigation .app-navigation-entry-menu:after { -- cgit v1.2.3