[Pkg-javascript-commits] [pdf.js] 03/139: Small refactoring of the loadingBar hiding code

David Prévot taffit at moszumanska.debian.org
Fri Jan 9 21:18:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit cfeb4c101931bbfffc225ec2287345bbf1a31627
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Sun Aug 17 00:22:05 2014 +0200

    Small refactoring of the loadingBar hiding code
---
 web/ui_utils.js | 2 +-
 web/viewer.html | 4 ++--
 web/viewer.js   | 2 --
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/web/ui_utils.js b/web/ui_utils.js
index 6ed4c2d..46ca293 100644
--- a/web/ui_utils.js
+++ b/web/ui_utils.js
@@ -329,7 +329,7 @@ var ProgressBar = (function ProgressBarClosure() {
 
     hide: function ProgressBar_hide() {
       this.bar.classList.add('hidden');
-      this.bar.removeAttribute('style');
+      document.body.classList.remove('loadingInProgress');
     }
   };
 
diff --git a/web/viewer.html b/web/viewer.html
index b89d9ae..2805fa5 100644
--- a/web/viewer.html
+++ b/web/viewer.html
@@ -96,8 +96,8 @@ http://sourceforge.net/adobe/cmap/wiki/License/
 
   </head>
 
-  <body tabindex="1">
-    <div id="outerContainer" class="loadingInProgress">
+  <body tabindex="1" class="loadingInProgress">
+    <div id="outerContainer">
 
       <div id="sidebarContainer">
         <div id="toolbarSidebar">
diff --git a/web/viewer.js b/web/viewer.js
index d4b449d..705eb07 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -873,8 +873,6 @@ var PDFViewerApplication = {
     var downloadedPromise = pdfDocument.getDownloadInfo().then(function() {
       self.downloadComplete = true;
       self.loadingBar.hide();
-      var outerContainer = document.getElementById('outerContainer');
-      outerContainer.classList.remove('loadingInProgress');
     });
 
     var pagesCount = pdfDocument.numPages;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list