Merge pull request #20201 from rmanibus/issue_20130

display file list in flexbox
This commit is contained in:
John Molakvoæ 2020-04-17 09:45:13 +02:00 committed by GitHub
commit 2a51a320ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 32 additions and 18 deletions

View File

@ -718,6 +718,8 @@ code {
/* ---- DIALOGS ---- */ /* ---- DIALOGS ---- */
#oc-dialog-filepicker-content { #oc-dialog-filepicker-content {
position: relative; position: relative;
display: flex;
flex-direction:column;
.dirtree { .dirtree {
flex-wrap: wrap; flex-wrap: wrap;
@ -778,7 +780,9 @@ code {
border: 1px solid var(--color-border-dark); border: 1px solid var(--color-border-dark);
border-radius: var(--border-radius-pill); border-radius: var(--border-radius-pill);
position: relative; position: relative;
top: -5px; left: 15px;
top:3px;
order:1;
.icon.icon-add{ .icon.icon-add{
background-image: var(--icon-add-000); background-image: var(--icon-add-000);
@ -811,7 +815,8 @@ code {
box-sizing: border-box; box-sizing: border-box;
display: inline-block; display: inline-block;
overflow-y: auto; overflow-y: auto;
height: 100%; flex: 1;
/*height: 100%;*/
/* overflow under the button row */ /* overflow under the button row */
width: 100%; width: 100%;
overflow-x: hidden; overflow-x: hidden;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1218,8 +1218,12 @@ const Dialogs = {
* fills the tree list with directories * fills the tree list with directories
*/ */
_fillSlug: function() { _fillSlug: function() {
var addButton = this.$dirTree.find('.actions.creatable').detach()
this.$dirTree.empty() this.$dirTree.empty()
var self = this var self = this
self.$dirTree.append(addButton)
var dir var dir
var path = this.$filePicker.data('path') var path = this.$filePicker.data('path')
var $template = $('<div data-dir="{dir}"><a>{name}</a></div>').addClass('crumb') var $template = $('<div data-dir="{dir}"><a>{name}</a></div>').addClass('crumb')
@ -1236,10 +1240,12 @@ const Dialogs = {
})) }))
}) })
} }
$template.octemplate({ $template.octemplate({
dir: '', dir: '',
name: '' // Ugly but works ;) name: '' // Ugly but works ;)
}, { escapeFunction: null }).prependTo(this.$dirTree) }, { escapeFunction: null }).prependTo(this.$dirTree)
}, },
/** /**
* handle selection made in the tree list * handle selection made in the tree list

View File

@ -1,15 +1,18 @@
<div id="{dialog_name}" title="{title}"> <div id="{dialog_name}" title="{title}">
<span class="dirtree breadcrumb"></span> <span class="dirtree breadcrumb">
<span class="actions creatable"><a href="#" class="icon icon-add button button-add"></a> <span class="actions creatable"><a href="#" class="icon icon-add button button-add"></a>
<nav class="menu popovermenu bubble menu-left newFolderMenu"> <nav class="menu popovermenu bubble menu-left newFolderMenu">
<ul><li> <ul><li>
<form class="filenameform"> <form class="filenameform">
<input type="text" value={newtext}> <input type="text" value={newtext}>
<input class="icon-confirm" type="submit" value=""> <input class="icon-confirm" type="submit" value="">
</form> </form>
</li></ul> </li></ul>
</nav> </nav>
</span>
</span> </span>
<input type="checkbox" class="hidden-visually" id="picker-showgridview" checked="checked" /> <input type="checkbox" class="hidden-visually" id="picker-showgridview" checked="checked" />
<label id="picker-view-toggle" for="picker-showgridview" class="button icon-toggle-filelist"></label> <label id="picker-view-toggle" for="picker-showgridview" class="button icon-toggle-filelist"></label>
<div class="filelist-container"> <div class="filelist-container">