moved loading status out of toolbar
This commit is contained in:
parent
f080bf88e5
commit
4c1df0f1ea
2 changed files with 23 additions and 12 deletions
|
@ -66,15 +66,22 @@
|
|||
box-shadow: none;
|
||||
}
|
||||
|
||||
#cb-status {
|
||||
z-index: 101;
|
||||
font-size: 12px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: 8px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#cb-toolbar {
|
||||
top: 0;
|
||||
border-bottom: 2px solid #444;
|
||||
}
|
||||
|
||||
#cb-toolbar #cb-status {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#cb-toolbar button {
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
|
|
|
@ -183,6 +183,10 @@ function ComicBook(id, srcs, opts) {
|
|||
*/
|
||||
ComicBook.prototype.control = {
|
||||
|
||||
status: $(document.createElement("p"))
|
||||
.attr("id", "cb-status")
|
||||
.addClass("cb-control cb-always-on"),
|
||||
|
||||
toolbar: $(document.createElement("div"))
|
||||
.hide()
|
||||
.attr("id", "cb-toolbar")
|
||||
|
@ -235,8 +239,7 @@ function ComicBook(id, srcs, opts) {
|
|||
options.zoomMode = "fitWidth"
|
||||
ComicBook.prototype.drawPage();
|
||||
})
|
||||
)
|
||||
.append("<p id='cb-status'></p>"),
|
||||
),
|
||||
|
||||
/**
|
||||
* Image enhancements
|
||||
|
@ -293,13 +296,13 @@ function ComicBook(id, srcs, opts) {
|
|||
navigation: {
|
||||
|
||||
left: $(document.createElement("div"))
|
||||
.addClass("cb-control cb-navigate left")
|
||||
.addClass("cb-control cb-navigate cb-always-on left")
|
||||
.click(function(e){
|
||||
ComicBook.prototype.drawPrevPage();
|
||||
}),
|
||||
|
||||
right: $(document.createElement("div"))
|
||||
.addClass("cb-control cb-navigate right")
|
||||
.addClass("cb-control cb-navigate cb-always-on right")
|
||||
.click(function(e) {
|
||||
ComicBook.prototype.drawNextPage();
|
||||
})
|
||||
|
@ -316,7 +319,8 @@ function ComicBook(id, srcs, opts) {
|
|||
ComicBook.prototype.renderControls = function() {
|
||||
|
||||
$(canvas)
|
||||
.before(this.getControl("loadingIndicator").hide())
|
||||
.before(this.getControl("loadingIndicator"))
|
||||
.before(this.getControl("status"))
|
||||
.after(this.getControl("toolbar"))
|
||||
.after(this.getControl("navigation").left)
|
||||
.after(this.getControl("navigation").right)
|
||||
|
@ -369,7 +373,7 @@ function ComicBook(id, srcs, opts) {
|
|||
|
||||
ComicBook.prototype.toggleToolbar = function() {
|
||||
if ($("#cb-toolbar").is(":visible")) {
|
||||
$(".cb-control").not(".cb-navigate").hide();
|
||||
$(".cb-control").not(".cb-always-on").hide();
|
||||
} else {
|
||||
$("#cb-toolbar, .cb-control.open").show();
|
||||
}
|
||||
|
@ -497,7 +501,7 @@ function ComicBook(id, srcs, opts) {
|
|||
ComicBook.prototype.drawPage();
|
||||
ComicBook.prototype.hideControl("loadingIndicator");
|
||||
}
|
||||
if (loaded.length === no_pages) { $("#cb-status").remove(); }
|
||||
if (loaded.length === no_pages) { ComicBook.prototype.hideControl("status") }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue