From ff65e0cf9b7bf0c2fdb0b60b112e8596733e6a6a Mon Sep 17 00:00:00 2001 From: Raghu Nayyar Date: Mon, 15 Aug 2016 00:49:33 +0530 Subject: [PATCH] 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 d2411197c9..f8ad9c7918 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; },