loading progress bar
This commit is contained in:
parent
3ebe8bb8f0
commit
e116917d78
3 changed files with 21 additions and 7 deletions
|
@ -8,7 +8,6 @@
|
|||
- trigger preload if requesting valid but not loaded images (can happen if network was interupted)
|
||||
- check for html5 feature support where used: diveintohtml5.org/everything.html or www.modernizr.com
|
||||
- when applying enhancements reading position gets lost
|
||||
- loading bar
|
||||
- full browser test - IE9 / FF3.6+ / Chrome / Safari / Opera
|
||||
- don't inlcude the closure compiler, expect it (or similar) to be installed instead
|
||||
|
||||
|
@ -184,9 +183,14 @@ function ComicBook(id, srcs, opts) {
|
|||
*/
|
||||
ComicBook.prototype.control = {
|
||||
|
||||
status: $(document.createElement("p"))
|
||||
status: $(document.createElement("div"))
|
||||
.attr("id", "cb-status")
|
||||
.addClass("cb-control cb-always-on"),
|
||||
.addClass("cb-control cb-always-on")
|
||||
.append(
|
||||
$(document.createElement("div"))
|
||||
.attr("id", "cb-progress-bar")
|
||||
.progressbar()
|
||||
),
|
||||
|
||||
toolbar: $(document.createElement("div"))
|
||||
.attr("id", "cb-toolbar")
|
||||
|
@ -466,7 +470,7 @@ function ComicBook(id, srcs, opts) {
|
|||
|
||||
var percentage_loaded = Math.floor((loaded.length / no_pages) * 100);
|
||||
|
||||
$("#cb-status").text("loading " + percentage_loaded + "%");
|
||||
$("#cb-progress-bar").progressbar("value", percentage_loaded);
|
||||
|
||||
// double page mode needs an extra page added
|
||||
var buffer = (options.displayMode === "double" && pointer < srcs.length-1) ? 1 : 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue