[Pkg-owncloud-commits] [owncloud] 99/129: Disable app icon preview in apps page for IE

David Prévot taffit at moszumanska.debian.org
Thu Nov 5 01:04:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 54ad29c3ed999f35cdedc5929209fd75b0b00e5e
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Wed Oct 21 10:50:06 2015 +0200

    Disable app icon preview in apps page for IE
    
    All IE versions are not able to properly upscale SVG icons unless the
    said SVG files contain a "viewBox" attribute, which is not always the
    case. Also we cannot guarantee that all third party apps will have this
    attribute in their icons.
    
    So for now, app icons will not be displayed in IE instead of broken
    ones.
---
 core/js/js.js       | 9 +++++++++
 settings/js/apps.js | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/core/js/js.js b/core/js/js.js
index 00a775b..3eafb3d 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1633,6 +1633,15 @@ OC.Util = {
 	},
 
 	/**
+	 * Returns whether this is IE
+	 *
+	 * @return {bool} true if this is IE, false otherwise
+	 */
+	isIE: function() {
+		return $('html').hasClass('ie');
+	},
+
+	/**
 	 * Returns whether this is IE8
 	 *
 	 * @return {bool} true if this is IE8, false otherwise
diff --git a/settings/js/apps.js b/settings/js/apps.js
index d51c642..987153b 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -161,8 +161,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
 
 		var page = $('#app-' + app.id);
 
-		// image loading kung-fu
-		if (app.preview) {
+		// image loading kung-fu (IE doesn't properly scale SVGs, so disable app icons)
+		if (app.preview && !OC.Util.isIE()) {
 			var currentImage = new Image();
 			currentImage.src = app.preview;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list