Mercurial > hg > fapweb
diff admin.js @ 916:42c3fbca0d86
Possibly address concurrency / switching tabs while uploading.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 27 Nov 2014 12:01:38 +0200 |
parents | 920e33605102 |
children | 054b612df423 |
line wrap: on
line diff
--- a/admin.js Thu Nov 27 11:50:53 2014 +0200 +++ b/admin.js Thu Nov 27 12:01:38 2014 +0200 @@ -66,6 +66,7 @@ // Set active tab and refresh contents activeTabs[tabset] = id; setTimeout("refreshDispatch"+ tabset +"('"+ id +"');", 10); + jsCancelUploadCBS(); } else { @@ -435,6 +436,8 @@ if (activeEntry != id || force) { + jsCancelUploadCBS(); + prevEntry = activeEntry; activeEntry = id; @@ -451,6 +454,8 @@ { var args = jsMakePostArgs({"name":1, "author":1, "filename":1, "info":1, "notes":1, "evalue":2}, "ne", id, true); + jsCancelUploadCBS(); + var msuccess = function(txt) { setTimeout("refreshDispatchCM("+ id +");", 50); @@ -469,6 +474,8 @@ var has_id = "compo_id" in lastPostArgs; var compo_id = lastPostArgs["compo_id"]; + jsCancelUploadCBS(); + if (!("compo_id" in lastPostArgs)) { args += "&compo_id=" + cid; @@ -512,6 +519,7 @@ function deleteEntry(cid, id) { + jsCancelUploadCBS(); jsDeleteItem(id, "entry", "entries", "refreshDispatchCM("+ cid +");", "entry"); }