Make sure process widget doesn't get stuck.

Enforce maximum height on process widget.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@136 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-02-24 19:48:11 +00:00
parent bb83dcda1c
commit c81913c6f8
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,6 @@ ProcessWidget.prototype._render = function() {
this._div.show(); this._div.show();
var hasPending = false;
var renderProcess = function(process) { var renderProcess = function(process) {
var div = $('<div></div>').addClass("process-panel-entry").appendTo(bodyDiv); var div = $('<div></div>').addClass("process-panel-entry").appendTo(bodyDiv);
@ -49,7 +48,6 @@ ProcessWidget.prototype._render = function() {
div.text(process.description + " (pending)"); div.text(process.description + " (pending)");
} else { } else {
div.text(process.description + " (" + process.progress + "%)"); div.text(process.description + " (" + process.progress + "%)");
hasPending = true;
} }
}; };
@ -58,7 +56,7 @@ ProcessWidget.prototype._render = function() {
renderProcess(processes[i]); renderProcess(processes[i]);
} }
if (hasPending && this._timerID == null) { if (processes.length > 0 && this._timerID == null) {
this._timerID = window.setTimeout(function() { this._timerID = window.setTimeout(function() {
self._timerID = null; self._timerID = null;
self.update(); self.update();

View File

@ -8,6 +8,8 @@
.process-panel-inner { .process-panel-inner {
border: 1px solid #ccc; border: 1px solid #ccc;
width: 500px; width: 500px;
max-height: 70px;
overflow: auto;
padding: 10px; padding: 10px;
background: #fffee0; background: #fffee0;
margin: 0 auto; margin: 0 auto;