remeber whether menus were open or not and show them when the toolbar is shown

This commit is contained in:
Bala Clark 2011-09-03 07:49:24 +02:00
parent 8194f3e7ea
commit b3443a93fc

View file

@ -319,22 +319,22 @@ function ComicBook(id, srcs, opts) {
}; };
ComicBook.prototype.showControl = function(control) { ComicBook.prototype.showControl = function(control) {
this.getControl(control).show(); this.getControl(control).show().addClass("open");
}; };
ComicBook.prototype.hideControl = function(control) { ComicBook.prototype.hideControl = function(control) {
this.getControl(control).hide(); this.getControl(control).removeClass("open").hide();
}; };
ComicBook.prototype.toggleControl = function(control) { ComicBook.prototype.toggleControl = function(control) {
this.getControl(control).toggle(); this.getControl(control).toggle().toggleClass("open");
}; };
ComicBook.prototype.toggleToolbar = function() { ComicBook.prototype.toggleToolbar = function() {
if ($("#cb-toolbar").is(":visible")) { if ($("#cb-toolbar").is(":visible")) {
$(".cb-control").not(".cb-navigate").hide(); $(".cb-control").not(".cb-navigate").hide();
} else { } else {
$("#cb-toolbar").show(); $("#cb-toolbar, .cb-control.open").show();
} }
}; };