Browse Source

progress bar matches new UI

Artur Adib 13 years ago
parent
commit
f06ca00e1c
  1. 27
      web/viewer.css
  2. 3
      web/viewer.js

27
web/viewer.css

@ -572,6 +572,8 @@ canvas {
#loadingBox { #loadingBox {
margin: 100px 0; margin: 100px 0;
text-align: center; text-align: center;
color: #ddd;
font-size: 14px;
} }
#loadingBar { #loadingBar {
@ -580,24 +582,24 @@ canvas {
border: 1px solid black; border: 1px solid black;
clear: both; clear: both;
margin: 0px; margin: 0px;
margin-top: 5px;
line-height: 0; line-height: 0;
border-radius: 4px; border-radius: 4px;
width: 15em; width: 200px;
height: 1.5em; height: 25px;
} }
#loadingBar .progress { #loadingBar .progress {
background-color: green;
display: inline-block; display: inline-block;
float: left; float: left;
background: #b4e391; background: #666;
background: -moz-linear-gradient(top, #b4e391 0%, #61c419 50%, #b4e391 100%); background: -moz-linear-gradient(top, #999 0%, #666 50%, #999 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b4e391), color-stop(50%,#61c419), color-stop(100%,#b4e391)); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#999), color-stop(50%,#666), color-stop(100%,#999));
background: -webkit-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%); background: -webkit-linear-gradient(top, #999 0%,#666 50%,#999 100%);
background: -o-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%); background: -o-linear-gradient(top, #999 0%,#666 50%,#999 100%);
background: -ms-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%); background: -ms-linear-gradient(top, #999 0%,#666 50%,#999 100%);
background: linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%); background: linear-gradient(top, #999 0%,#666 50%,#999 100%);
border-top-left-radius: 3px; border-top-left-radius: 3px;
border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
@ -606,6 +608,11 @@ canvas {
height: 100%; height: 100%;
} }
#loadingBar .progress.full {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
.textLayer { .textLayer {
position: absolute; position: absolute;
left: 0; left: 0;

3
web/viewer.js

@ -62,6 +62,9 @@ var ProgressBar = (function ProgressBarClosure() {
updateBar: function ProgressBar_updateBar() { updateBar: function ProgressBar_updateBar() {
var progressSize = this.width * this._percent / 100; var progressSize = this.width * this._percent / 100;
if (this._percent > 95)
this.div.classList.add('full');
this.div.style.width = progressSize + this.units; this.div.style.width = progressSize + this.units;
}, },

Loading…
Cancel
Save