This commit is contained in:
syuilo 2017-12-09 02:11:48 +09:00
parent b12c4a0611
commit 23e4674966
3 changed files with 9 additions and 4 deletions

View File

@ -248,6 +248,7 @@
};
this.move = ev => {
ev.preventDefault();
this.cd(ev.item.folder);
return false;
};
@ -333,7 +334,9 @@
this.prependFile = file => this.addFile(file, true);
this.prependFolder = file => this.addFolder(file, true);
this.goRoot = () => {
this.goRoot = ev => {
ev.preventDefault();
if (this.folder || this.file) {
this.update({
file: null,

View File

@ -138,7 +138,8 @@
this.isSelected = selections.some(f => f.id == this.file.id);
});
this.onclick = () => {
this.onclick = ev => {
ev.preventDefault();
this.browser.chooseFile(this.file);
return false;
};

View File

@ -1,4 +1,4 @@
<mk-drive-folder onclick={ onclick }>
<mk-drive-folder>
<a onclick={ onclick } href="/i/drive/folder/{ folder.id }">
<div class="container">
<p class="name">%fa:folder%{ folder.name }</p>%fa:angle-right%
@ -44,7 +44,8 @@
this.browser = this.parent;
this.folder = this.opts.folder;
this.onclick = () => {
this.onclick = ev => {
ev.preventDefault();
this.browser.cd(this.folder);
return false;
};