From bdb40891393f8c30fdfe15711b1417692521117f Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Fri, 6 Mar 2015 16:28:38 +0100 Subject: [PATCH] collapse app descriptions by default, make expandable, fix #13112 --- settings/css/settings.css | 15 +++++++++++++++ settings/js/apps.js | 11 +++++++++++ settings/templates/apps.php | 38 +++++++++++++++++++++---------------- 3 files changed, 48 insertions(+), 16 deletions(-) diff --git a/settings/css/settings.css b/settings/css/settings.css index 0ed0e60ee6..0716cd2493 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -217,6 +217,21 @@ span.version { margin-left:1em; margin-right:1em; color:#555; } .recommendedapp { display: inline-block; } + +.app-description-toggle-show, +.app-description-toggle-hide { + clear: both; + padding: 7px 0; + cursor: pointer; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + opacity: .5; +} +.app-description-container { + clear: both; + position: relative; + top: 7px; +} + .app-description { clear: both; } diff --git a/settings/js/apps.js b/settings/js/apps.js index 7330f426af..bb52aa3a15 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -369,6 +369,17 @@ OC.Settings.Apps = OC.Settings.Apps || { OC.Settings.Apps.loadCategory(categoryId); }); + $(document).on('click', '.app-description-toggle-show', function () { + $(this).addClass('hidden'); + $(this).siblings('.app-description-toggle-hide').removeClass('hidden'); + $(this).siblings('.app-description-container').slideDown(); + }); + $(document).on('click', '.app-description-toggle-hide', function () { + $(this).addClass('hidden'); + $(this).siblings('.app-description-toggle-show').removeClass('hidden'); + $(this).siblings('.app-description-container').slideUp(); + }); + $(document).on('click', '#apps-list input.enable', function () { var appId = $(this).data('appid'); var element = $(this); diff --git a/settings/templates/apps.php b/settings/templates/apps.php index e749b33027..7465992b3b 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -33,24 +33,30 @@
{{internallabel}}
{{/if}}
-
{{description}}
- - {{#if documentation}} -

- t("Documentation:"));?> - {{#if documentation.user}} - - t("User Documentation"));?> - - {{/if}} - {{#if documentation.admin}} - - t("Admin Documentation"));?> - +

+
t("Show description …"));?>
+ + {{#unless canInstall}}

t('This app cannot be installed because the following dependencies are not fulfilled:')); ?>