From 92b928fbfb47922bc6b3aef21b89019e494fa68e Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 13 Feb 2014 05:46:46 +0400 Subject: [PATCH] minor changes to scrollbars -- found bug I'm not sure how to fix, so here's a stub... Signed-off-by: Alex A. Naanou --- ui/ui.js | 7 ++++++- ui/workers.js | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ui/ui.js b/ui/ui.js index 773a6611..76007177 100755 --- a/ui/ui.js +++ b/ui/ui.js @@ -511,7 +511,7 @@ function getProgressContainer(mode, parent){ // Shorthand: // resetProgressBar(name) // -function progressBar(name, container, close, hide_timeout){ +function progressBar(name, container, close, hide_timeout, auto_remove){ container = container == null ? getProgressContainer() : container @@ -523,6 +523,7 @@ function progressBar(name, container, close, hide_timeout){ : hide_timeout < 0 ? 0 : hide_timeout > 3000 ? 3000 : hide_timeout + auto_remove = auto_remove == null ? true : auto_remove var widget = getProgressBar(name) @@ -568,6 +569,10 @@ function progressBar(name, container, close, hide_timeout){ setTimeout(function(){ widget.hide() + + if(auto_remove){ + widget.remove() + } }, hide_timeout) }) .on('progressReset', function(){ diff --git a/ui/workers.js b/ui/workers.js index dfbecbc1..1a705a31 100755 --- a/ui/workers.js +++ b/ui/workers.js @@ -34,7 +34,9 @@ function getWorkerProgressBar(name, worker, container){ container, function(){ WORKERS[name].dropQueue() - }) + }, + null, + true) worker .progress(function(done, total){ @@ -57,7 +59,7 @@ function getWorkerProgressBar(name, worker, container){ // get/create a named worker queue... // // XXX rename this to something task-related.... (???) -function getWorkerQueue(name, pool_size, container, no_auto_start, no_progress){ +function getWorkerQueue(name, pool_size, container, no_auto_start, no_progress, auto_clear){ pool_size = pool_size == null ? 1 : pool_size // create a new worker queue...