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
|
* @NoAdminRequired
|
||||||
*/
|
*/
|
||||||
public function getGridView() {
|
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]);
|
return new JSONResponse(['gridview' => $status]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -767,12 +767,10 @@ code {
|
||||||
background-color: var(--color-main-background);
|
background-color: var(--color-main-background);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
#filestable.filelist {
|
#picker-filestable.filelist {
|
||||||
/* prevent the filepicker to overflow */
|
/* prevent the filepicker to overflow */
|
||||||
min-width: initial;
|
min-width: initial;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
}
|
|
||||||
.filelist {
|
|
||||||
thead {
|
thead {
|
||||||
tr {
|
tr {
|
||||||
border-bottom: 1px solid var(--color-border);
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
@ -872,6 +870,7 @@ code {
|
||||||
background-position: center top;
|
background-position: center top;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
line-height: $name-height;
|
line-height: $name-height;
|
||||||
|
max-width: none;
|
||||||
}
|
}
|
||||||
&.filesize {
|
&.filesize {
|
||||||
line-height: $name-height / 3;
|
line-height: $name-height / 3;
|
||||||
|
|
|
@ -242,7 +242,7 @@ var OCdialogs = {
|
||||||
// No grid for IE!
|
// No grid for IE!
|
||||||
if (OC.Util.isIE()) {
|
if (OC.Util.isIE()) {
|
||||||
self.$filePicker.find('#picker-view-toggle').remove();
|
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);
|
$('body').append(self.$filePicker);
|
||||||
|
@ -808,7 +808,7 @@ var OCdialogs = {
|
||||||
_getGridSettings: function() {
|
_getGridSettings: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
$.get(OC.generateUrl('/apps/files/api/v1/showgridview'), function(response) {
|
$.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')
|
self.$showGridView.next('#picker-view-toggle')
|
||||||
.removeClass('icon-toggle-filelist icon-toggle-pictures')
|
.removeClass('icon-toggle-filelist icon-toggle-pictures')
|
||||||
.addClass(response.gridview ? 'icon-toggle-filelist' : 'icon-toggle-pictures')
|
.addClass(response.gridview ? 'icon-toggle-filelist' : 'icon-toggle-pictures')
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="icon-folder"></div>
|
<div class="icon-folder"></div>
|
||||||
<h2>{emptytext}</h2>
|
<h2>{emptytext}</h2>
|
||||||
</div>
|
</div>
|
||||||
<table id="filestable" class="filelist list-container view-grid">
|
<table id="picker-filestable" class="filelist list-container view-grid">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th id="headerName" class="column-name">
|
<th id="headerName" class="column-name">
|
||||||
|
|
Loading…
Reference in a new issue