From e96e652f728755aa09cdbb61a64fff4c5b54ecab Mon Sep 17 00:00:00 2001 From: Raghu Nayyar Date: Thu, 11 Aug 2016 12:59:57 +0530 Subject: [PATCH 1/4] Uses javascript to invert the SVGs. --- settings/js/apps.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/settings/js/apps.js b/settings/js/apps.js index 66c097e125791..d2411197c9ca4 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -196,14 +196,14 @@ OC.Settings.Apps = OC.Settings.Apps || { if (app.preview && !OC.Util.isIE()) { var currentImage = new Image(); currentImage.src = app.preview; - - currentImage.onload = function() { - page.find('.app-image') - .append(this) - .fadeIn(); - }; } + currentImage.onload = function() { + page.find('.app-image') + .append(OC.Settings.Apps.imageUrl(app.preview)) + .fadeIn(); + }; + // set group select properly if(OC.Settings.Apps.isType(app, 'filesystem') || OC.Settings.Apps.isType(app, 'prelogin') || OC.Settings.Apps.isType(app, 'authentication') || OC.Settings.Apps.isType(app, 'logging') || @@ -226,6 +226,17 @@ OC.Settings.Apps = OC.Settings.Apps || { } }, + /** + * Returns the image for apps listing + */ + + imageUrl : function (url) { + var img = ''; + img += ''; + img += ''; + return img; + }, + isType: function(app, type){ return app.types && app.types.indexOf(type) !== -1; }, From bbd764399f53d8485ddc729eec1c38fbbb3fd3ab Mon Sep 17 00:00:00 2001 From: Raghu Nayyar Date: Thu, 11 Aug 2016 13:09:42 +0530 Subject: [PATCH 2/4] Removes uneeded styles. --- settings/css/settings.css | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/settings/css/settings.css b/settings/css/settings.css index 589373e14f947..ba2251482b898 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -386,16 +386,7 @@ span.version { width: 80px; height: 80px; } -.app-image img { - max-width: 80px; - max-height: 80px; -} -.app-image-icon img { - background-color: #ccc; - width: 60px; - padding: 10px; - border-radius: 3px; -} + .app-name, .app-version, .app-score, From c76f60e7337cc41d1caf62836ed6ffaf28991c00 Mon Sep 17 00:00:00 2001 From: Raghu Nayyar Date: Thu, 11 Aug 2016 15:53:39 +0530 Subject: [PATCH 3/4] Adds opacity to image container. --- settings/css/settings.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/css/settings.css b/settings/css/settings.css index ba2251482b898..5ba1dc5e23c9e 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -385,8 +385,8 @@ span.version { padding-right: 10px; width: 80px; height: 80px; + opacity: 0.8; } - .app-name, .app-version, .app-score, From ff65e0cf9b7bf0c2fdb0b60b112e8596733e6a6a Mon Sep 17 00:00:00 2001 From: Raghu Nayyar Date: Mon, 15 Aug 2016 00:49:33 +0530 Subject: [PATCH 4/4] Fixes image preview when fetched from the store. --- settings/js/apps.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/settings/js/apps.js b/settings/js/apps.js index d2411197c9ca4..f8ad9c7918cd3 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -200,7 +200,7 @@ OC.Settings.Apps = OC.Settings.Apps || { currentImage.onload = function() { page.find('.app-image') - .append(OC.Settings.Apps.imageUrl(app.preview)) + .append(OC.Settings.Apps.imageUrl(app.preview, app.detailpage)) .fadeIn(); }; @@ -228,12 +228,18 @@ OC.Settings.Apps = OC.Settings.Apps || { /** * Returns the image for apps listing + * url : the url of the image + * appfromstore: bool to check whether the app is fetched from store or not. */ - imageUrl : function (url) { + imageUrl : function (url, appfromstore) { var img = ''; - img += ''; - img += ''; + if (appfromstore) { + img += ''; + } else { + img += ''; + img += ''; + } return img; },