fix indentations and style nits

This commit is contained in:
Muhammad Fikri 2011-09-21 19:25:29 +07:00
parent f08aafa72a
commit 34b6416017
3 changed files with 7 additions and 7 deletions

View File

@ -273,6 +273,6 @@ canvas {
}
#loading {
margin:100px 0;
text-align:center;
margin: 100px 0;
text-align: center;
}

View File

@ -90,7 +90,7 @@
</div>
</div>
<div id="loading">Loading... 0%</div>
<div id="loading">Loading... 0%</div>
<div id="viewer"></div>
</body>
</html>

View File

@ -111,14 +111,14 @@ var PDFView = {
xhr.open('GET', url);
xhr.mozResponseType = xhr.responseType = 'arraybuffer';
xhr.expected = (document.URL.indexOf('file:') === 0) ? 0 : 200;
xhr.onprogress=PDFView.progressLevel;
xhr.onprogress = PDFView.progressLevel;
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === xhr.expected) {
var data = (xhr.mozResponseArrayBuffer || xhr.mozResponse ||
xhr.responseArrayBuffer || xhr.response);
document.getElementById('loading').style.display="none";
document.getElementById('loading').style.display = "none";
PDFView.load(data, scale);
}
};
@ -127,8 +127,8 @@ var PDFView = {
},
progressLevel: function(evt) {
var p=Math.round((evt.loaded / evt.total)*100);
document.getElementById('loading').innerHTML = 'Loading... '+p+'%';
var p = Math.round((evt.loaded / evt.total) * 100);
document.getElementById('loading').innerHTML = 'Loading... ' + p + '%';
},
navigateTo: function(dest) {