Browse Source

Fix default filepicker style and gridview

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
tags/v16.0.0alpha1
John Molakvoæ (skjnldsv) 5 years ago
parent
commit
d526ab55fb
No account linked to committer's email address

+ 1
- 1
apps/files/lib/Controller/ApiController.php View File

@@ -286,7 +286,7 @@ class ApiController extends Controller {
* @NoAdminRequired
*/
public function getGridView() {
$status = $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_grid', '1') === '1';
$status = $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_grid', '0') === '1';
return new JSONResponse(['gridview' => $status]);
}


+ 2
- 3
core/css/styles.scss View File

@@ -767,12 +767,10 @@ code {
background-color: var(--color-main-background);
width: 100%;
}
#filestable.filelist {
#picker-filestable.filelist {
/* prevent the filepicker to overflow */
min-width: initial;
margin-bottom: 50px;
}
.filelist {
thead {
tr {
border-bottom: 1px solid var(--color-border);
@@ -872,6 +870,7 @@ code {
background-position: center top;
background-size: contain;
line-height: $name-height;
max-width: none;
}
&.filesize {
line-height: $name-height / 3;

+ 2
- 2
core/js/oc-dialogs.js View File

@@ -242,7 +242,7 @@ var OCdialogs = {
// No grid for IE!
if (OC.Util.isIE()) {
self.$filePicker.find('#picker-view-toggle').remove();
self.$filePicker.find('#filestable').removeClass('view-grid');
self.$filePicker.find('#picker-filestable').removeClass('view-grid');
}

$('body').append(self.$filePicker);
@@ -808,7 +808,7 @@ var OCdialogs = {
_getGridSettings: function() {
var self = this;
$.get(OC.generateUrl('/apps/files/api/v1/showgridview'), function(response) {
self.$showGridView.checked = response.gridview;
self.$showGridView.get(0).checked = response.gridview;
self.$showGridView.next('#picker-view-toggle')
.removeClass('icon-toggle-filelist icon-toggle-pictures')
.addClass(response.gridview ? 'icon-toggle-filelist' : 'icon-toggle-pictures')

+ 1
- 1
core/templates/filepicker.html View File

@@ -7,7 +7,7 @@
<div class="icon-folder"></div>
<h2>{emptytext}</h2>
</div>
<table id="filestable" class="filelist list-container view-grid">
<table id="picker-filestable" class="filelist list-container view-grid">
<thead>
<tr>
<th id="headerName" class="column-name">

Loading…
Cancel
Save