From 9326378bbf6e4f8bd32233d0d1c0dec62729ceec Mon Sep 17 00:00:00 2001 From: intellisense Date: Tue, 31 Mar 2015 03:26:34 +0500 Subject: [PATCH 1/3] Only add loading indicator if not already present If for some reason the xhr request failed, the loading indicator cloned again upon new request. This pull request makes sure that the loading indicator should only be cloned into page container if not already present. --- share/pdf2htmlEX.js.in | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/share/pdf2htmlEX.js.in b/share/pdf2htmlEX.js.in index 636c94a..ae6a688 100644 --- a/share/pdf2htmlEX.js.in +++ b/share/pdf2htmlEX.js.in @@ -361,10 +361,13 @@ Viewer.prototype = { if (url) { this.pages_loading[idx] = true; // set semaphore - // add a copy of the loading indicator - var new_loading_indicator = this.loading_indicator.cloneNode(); - new_loading_indicator.classList.add('active'); - cur_page_ele.appendChild(new_loading_indicator); + // add a copy of the loading indicator if not already present + var new_loading_indicator = cur_page_ele.getElementsByClassName(this.config['loading_indicator_cls'])[0]; + if (typeof new_loading_indicator === 'undefined'){ + new_loading_indicator = this.loading_indicator.cloneNode(true); + new_loading_indicator.classList.add('active'); + cur_page_ele.appendChild(new_loading_indicator); + } // load data { From 23ad7f1fa66820e5a4186da32015526412989f0a Mon Sep 17 00:00:00 2001 From: intellisense Date: Tue, 31 Mar 2015 22:51:03 +0500 Subject: [PATCH 2/3] Adding my self into contributors --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 0d5c84b..2f869c2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -18,6 +18,7 @@ Michele Redolfi Mick Giles Ryan Morlok Wanmin Liu +Aamir Adnan Packagers: Arthur Titeica From 1bc48dd658d1d69aefc1dda377cc4b8171aafcc4 Mon Sep 17 00:00:00 2001 From: intellisense Date: Thu, 2 Apr 2015 10:03:47 +0500 Subject: [PATCH 3/3] Fixed alphabetical order of contributors --- AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 2f869c2..efd9552 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,6 +2,7 @@ pdf2htmlEX is created and maintained by Lu Wang Contributors: (alphabetical order) +Aamir Adnan Chris Cinelli Daniel Bonniot de Ruisselet Deepak @@ -18,7 +19,6 @@ Michele Redolfi Mick Giles Ryan Morlok Wanmin Liu -Aamir Adnan Packagers: Arthur Titeica