Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed img/app.png
Binary file not shown.
Binary file removed img/dateasc.png
Binary file not shown.
Binary file removed img/datedes.png
Binary file not shown.
Binary file removed img/folder.png
Binary file not shown.
Binary file removed img/gallery-dark.png
Binary file not shown.
Binary file removed img/nameasc.png
Binary file not shown.
Binary file removed img/namedes.png
Binary file not shown.
Binary file removed img/toggle.png
Binary file not shown.
2 changes: 1 addition & 1 deletion js/galleryutility.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ window.Gallery = window.Gallery || {};
if ($('html').is('.ie8')) {
return 'unsupportedIe';
} else if (navigator.userAgent.indexOf("MSIE") > 0) {
return 'oldIe';
return 'unsupportedIe';
} else if (!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)) {
return 'modernIe';
} else if (navigator.userAgent.indexOf("Edge/") > 0) {
Expand Down
5 changes: 0 additions & 5 deletions js/slideshow.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@

this._initControlsAutoFader();

// Replace all Owncloud svg images with png images for ancient browsers
if (!OC.Util.hasSVGSupport()) {
OC.Util.replaceSVG(this.$el);
}

// Only modern browsers can manipulate history
if (history && history.pushState) {
// Stop the slideshow when backing out.
Expand Down
24 changes: 3 additions & 21 deletions js/thumbnail.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global $, DOMPurify, Gallery */
/* global $, DOMPurify, OC, Gallery */
/**
* A thumbnail is the actual image attached to the GalleryImage object
*
Expand Down Expand Up @@ -132,7 +132,7 @@ function Thumbnail (fileId, square) {
};
thumb.image.onerror = function () {
thumb.valid = false;
var icon = Thumbnails._getMimeIcon(preview.mimetype);
var icon = OC.MimeType.getIconUrl(preview.mimetype);
setTimeout(function () {
thumb.image.src = icon;
}, 0);
Expand All @@ -147,7 +147,7 @@ function Thumbnail (fileId, square) {
'data:' + preview.mimetype + ';base64,' + imageData;
} else {
thumb.valid = false;
thumb.image.src = Thumbnails._getMimeIcon(preview.mimetype);
thumb.image.src = OC.MimeType.getIconUrl(preview.mimetype);
}
}
});
Expand All @@ -156,24 +156,6 @@ function Thumbnail (fileId, square) {
return batch;
},

/**
* Returns the link to the media type icon
*
* Modern browsers get an SVG, older ones a PNG
*
* @param mimeType
*
* @returns {*|string}
* @private
*/
_getMimeIcon: function (mimeType) {
var icon = OC.MimeType.getIconUrl(mimeType);
if (Gallery.ieVersion !== false) {
icon = icon.substr(0, icon.lastIndexOf(".")) + ".png";
}
return icon;
},

/**
* Sanitises SVGs
*
Expand Down