Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix default filepicker style and gridview
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv committed Nov 29, 2018
commit d526ab55fb501ae8940ea370dbfe773679b95d38
2 changes: 1 addition & 1 deletion apps/files/lib/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public function showGridView($show) {
* @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]);
}

Expand Down
5 changes: 2 additions & 3 deletions core/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions core/js/oc-dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion core/templates/filepicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down