Former-commit-id: 4f063734c4cfafd1f8c33bff31e56e3387bbf100
This commit is contained in:
Henrique Dias
2016-12-30 11:53:46 +00:00
parent 44672d713f
commit 7d9fb5995a
5 changed files with 38 additions and 48 deletions

View File

@@ -115,6 +115,15 @@
<main>
{{ template "content" . }}
{{ if and (.User.AllowNew) (.IsDir) }}
<input id="newdir" type="text" placeholder="Name. End with a trailing slash to create a dir.">
<div class="floating">
<div class="action" id="new">
<i class="material-icons" title="New file or directory. End name with a trailing slash to create a directory.">add</i>
</div>
</div>
{{ end }}
</main>
<footer>Served with <a rel="noopener noreferrer" href="https://caddyserver.com">Caddy</a> and <a rel="noopener noreferrer" href="https://github.com/hacdias/caddy-filemanager">File Manager</a>.</footer>

View File

@@ -8,8 +8,8 @@
{{ if .IsDir}}ondragover="itemDragOver(event)" ondrop="itemDrop(event)"{{ end }}
draggable="true"
class="item"
onclick="selectItem(event)"
ondblclick="openItem(event)"
onclick="selectItemEvent(event)"
ondblclick="openItemEvent(event)"
data-dir="{{ .IsDir }}"
data-url="{{ .URL }}"
id="{{ EncodeBase64 .Name }}">
@@ -39,13 +39,4 @@
<input style="display:none" type="file" id="upload-input" onchange="handleFiles(this.files, '')" value="Upload" multiple>
{{ end }}
{{ if .User.AllowNew }}
<input id="newdir" type="text" placeholder="Name. End with a trailing slash to create a dir.">
<div class="floating">
<div class="action" id="new">
<i class="material-icons" title="New file or directory. End name with a trailing slash to create a directory.">add</i>
</div>
</div>
{{ end }}
{{ end }}