summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-11-05 17:27:09 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-11-05 17:27:09 +0100
commite0de0a122f477d1e445f4f36c85c7462c5c66eb1 (patch)
tree660c1f119d7db105b28971c44b49401ecfdfacc2
parent934d08b2e8b0f6f8616882b9c08d1bec4db22eb2 (diff)
downloadnextcloud-server-e0de0a122f477d1e445f4f36c85c7462c5c66eb1.tar.gz
nextcloud-server-e0de0a122f477d1e445f4f36c85c7462c5c66eb1.zip
Disable grid for ie
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r--apps/files/list.php5
-rw-r--r--apps/files/templates/list.php3
-rw-r--r--core/css/styles.scss1
-rw-r--r--core/js/oc-dialogs.js10
4 files changed, 17 insertions, 2 deletions
diff --git a/apps/files/list.php b/apps/files/list.php
index f18dc5964b8..23b94d9be20 100644
--- a/apps/files/list.php
+++ b/apps/files/list.php
@@ -26,10 +26,13 @@ $userSession = \OC::$server->getUserSession();
// TODO: move this to the generated config.js
$publicUploadEnabled = $config->getAppValue('core', 'shareapi_allow_public_upload', 'yes');
$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', true);
+$isIE = \OCP\Util::isIE();
// renders the controls and table headers template
$tmpl = new OCP\Template('files', 'list', '');
$tmpl->assign('publicUploadEnabled', $publicUploadEnabled);
-$tmpl->assign('showgridview', $showgridview);
+// gridview not available for ie
+$tmpl->assign('showgridview', $showgridview && !$isIE);
+$tmpl->assign('isIE', $isIE);
$tmpl->printPage();
diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php
index 27403594368..2bc94ca7afb 100644
--- a/apps/files/templates/list.php
+++ b/apps/files/templates/list.php
@@ -24,10 +24,13 @@
<?php endif;?>
<input type="hidden" class="max_human_file_size"
value="(max <?php isset($_['uploadMaxHumanFilesize']) ? p($_['uploadMaxHumanFilesize']) : ''; ?>)">
+ <!-- IF NOT IE, SHOW GRIDVIEW -->
+ <?php if (!$_['isIE']) { ?>
<input type="checkbox" class="hidden-visually" id="showgridview"
<?php if($_['showgridview']) { ?>checked="checked" <?php } ?>/>
<label id="view-toggle" for="showgridview" class="button <?php p($_['showgridview'] ? 'icon-toggle-filelist' : 'icon-toggle-pictures') ?>"
title="<?php p($l->t('Toggle grid view'))?>"></label>
+ <?php } ?>
</div>
<div id="emptycontent" class="hidden">
diff --git a/core/css/styles.scss b/core/css/styles.scss
index f23f4c2dead..9b7da393698 100644
--- a/core/css/styles.scss
+++ b/core/css/styles.scss
@@ -196,6 +196,7 @@ body {
display: flex;
height: 36px;
width: 36px;
+ padding: 9px; // width - border - icon width = 18px
align-items: center;
justify-content: center;
}
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index 5231a94f333..dee74502a6f 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -236,12 +236,20 @@ var OCdialogs = {
multiselect = false;
}
+ // No grid for IE!
+ if (OC.Util.isIE()) {
+ self.$filePicker.find('#picker-view-toggle').remove();
+ self.$filePicker.find('#filestable').removeClass('view-grid');
+ }
+
$('body').append(self.$filePicker);
self.$showGridView = $('input#picker-showgridview');
self.$showGridView.on('change', _.bind(self._onGridviewChange, self));
- self._getGridSettings();
+ if (!OC.Util.isIE()) {
+ self._getGridSettings();
+ }
self.$filePicker.ready(function() {
self.$filelist = self.$filePicker.find('.filelist tbody');