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

View file

@ -138,7 +138,8 @@
this.isSelected = selections.some(f => f.id == this.file.id); this.isSelected = selections.some(f => f.id == this.file.id);
}); });
this.onclick = () => { this.onclick = ev => {
ev.preventDefault();
this.browser.chooseFile(this.file); this.browser.chooseFile(this.file);
return false; 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 }"> <a onclick={ onclick } href="/i/drive/folder/{ folder.id }">
<div class="container"> <div class="container">
<p class="name">%fa:folder%{ folder.name }</p>%fa:angle-right% <p class="name">%fa:folder%{ folder.name }</p>%fa:angle-right%
@ -44,7 +44,8 @@
this.browser = this.parent; this.browser = this.parent;
this.folder = this.opts.folder; this.folder = this.opts.folder;
this.onclick = () => { this.onclick = ev => {
ev.preventDefault();
this.browser.cd(this.folder); this.browser.cd(this.folder);
return false; return false;
}; };