keep color button active if its menu is open
This commit is contained in:
parent
effb313d3c
commit
8194f3e7ea
2 changed files with 9 additions and 4 deletions
|
@ -89,7 +89,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#cb-toolbar button.cb-color:hover,
|
#cb-toolbar button.cb-color:hover,
|
||||||
#cb-toolbar button.cb-color:active {
|
#cb-toolbar button.cb-color:active,
|
||||||
|
#cb-toolbar button.cb-color.active {
|
||||||
background-image: url(../img/iconic/green/cog_alt_32x32.png);
|
background-image: url(../img/iconic/green/cog_alt_32x32.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ function ComicBook(id, srcs, opts) {
|
||||||
)
|
)
|
||||||
.append(
|
.append(
|
||||||
$(document.createElement("button"))
|
$(document.createElement("button"))
|
||||||
.addClass("cb-color")
|
.addClass("cb-color cb-menu-button")
|
||||||
.click(function(){
|
.click(function(){
|
||||||
ComicBook.prototype.toggleControl("color");
|
ComicBook.prototype.toggleControl("color");
|
||||||
})
|
})
|
||||||
|
@ -212,7 +212,7 @@ function ComicBook(id, srcs, opts) {
|
||||||
*/
|
*/
|
||||||
color: $(document.createElement("div"))
|
color: $(document.createElement("div"))
|
||||||
.attr("id", "cb-color")
|
.attr("id", "cb-color")
|
||||||
.addClass("cb-control cb-floating")
|
.addClass("cb-control")
|
||||||
.append("<label for='cb-sharpen'>Brightness</label>")
|
.append("<label for='cb-sharpen'>Brightness</label>")
|
||||||
.append(
|
.append(
|
||||||
$("<div id='cb-brightness' class='cb-option'></div>").slider({
|
$("<div id='cb-brightness' class='cb-option'></div>").slider({
|
||||||
|
@ -284,7 +284,11 @@ function ComicBook(id, srcs, opts) {
|
||||||
.after(this.getControl("navigation").left)
|
.after(this.getControl("navigation").left)
|
||||||
.after(this.getControl("navigation").right)
|
.after(this.getControl("navigation").right)
|
||||||
.after(this.getControl("color").hide());
|
.after(this.getControl("color").hide());
|
||||||
|
|
||||||
|
$(".cb-menu-button").click(function(e) {
|
||||||
|
$(this).toggleClass("active");
|
||||||
|
});
|
||||||
|
|
||||||
$("#cb-desaturate").click(function(){
|
$("#cb-desaturate").click(function(){
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
ComicBook.prototype.enhance.desaturate();
|
ComicBook.prototype.enhance.desaturate();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue