fixed hiding JSObserver info box when unused
This commit is contained in:
@@ -142,25 +142,25 @@ overviewer.views.ProgressView = Backbone.View.extend({
|
|||||||
this.el.id = 'progressDiv';
|
this.el.id = 'progressDiv';
|
||||||
this.el.innerHTML = 'Current Render Progress';
|
this.el.innerHTML = 'Current Render Progress';
|
||||||
overviewer.map.controls[google.maps.ControlPosition.BOTTOM_RIGHT].push(this.el);
|
overviewer.map.controls[google.maps.ControlPosition.BOTTOM_RIGHT].push(this.el);
|
||||||
this.el.hidden = true;
|
$(this.el).hide();
|
||||||
$.ajaxSetup({cache: false});
|
$.ajaxSetup({cache: false});
|
||||||
},
|
},
|
||||||
updateProgress: function() {
|
updateProgress: function() {
|
||||||
e = this;
|
e = this;
|
||||||
$.getJSON('progress.json', null, function(d){
|
$.getJSON('progress.json', null, function(d){
|
||||||
if (!(d == null||d=='')) {
|
if (!(d == null||d=='')) {
|
||||||
e.el.hidden = false;
|
$(e.el).show();
|
||||||
e.el.innerHTML = d['message'];
|
e.el.innerHTML = d['message'];
|
||||||
if (d.update > 0) {
|
if (d.update > 0) {
|
||||||
setTimeout("e.updateProgress()", d.update);
|
setTimeout("e.updateProgress()", d.update);
|
||||||
} else {
|
} else {
|
||||||
setTimeout("e.updateProgress()", 60000);
|
setTimeout("e.updateProgress()", 60000);
|
||||||
e.el.innerHTML="Hidden - d.update < 0";
|
e.el.innerHTML="Hidden - d.update < 0";
|
||||||
e.el.hidden = true;
|
$(e.el).hide();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
e.el.innerHTML="Hidden - !!d==false";
|
e.el.innerHTML="Hidden - !!d==false";
|
||||||
e.el.hidden = true;
|
$(e.el).hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user