Fix default filepicker style and gridview
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
80b3452da2
commit
d526ab55fb
4 changed files with 6 additions and 7 deletions
|
@ -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]);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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…
Reference in a new issue