Commit cc5d8f60 authored by Benjamin Fischer's avatar Benjamin Fischer

file2.BrowserVue: added a loading semaphore

parent e5073a5e
......@@ -20,6 +20,7 @@ define([
data: function(){return {
path: "",
loading: false,
loadsem: 0,
items: [],
filterActive: false,
filterText: "",
......@@ -177,6 +178,7 @@ define([
path = path.replace(/\/+/g, "/");
path = path.replace(/\/$/, "") || "/";
this.loading = true;
var sem = ++this.loadsem;
this.$dispatch("ajax", "GET", "/ajax/fs/filelist", {
path: path,
watch_id: "0",
......@@ -184,6 +186,7 @@ define([
}, function(err, data) {
this.loading = false;
if (err) return;
if (this.loadsem !== sem) return;
if (this.path !== data.path)
this.filterActive = false;
this.path = data.path;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment