initInterfaceShortcuts: function () {
var $this = this;
- this.keyShortcut('pageup,pagedown,home,end', function (e, handler) {
+ this.keyShortcut('pageup,pagedown,home,end,left,right', function (e, handler) {
if ($this.fluidbook.zoom.zoom > 1) {
return;
}
- if (handler.key === 'pageup' || handler.key === 'pagedown') {
+ if (handler.key === 'pageup' || handler.key === 'pagedown' || handler.key === 'left' || handler.key === 'right') {
var dir = 'Next';
- if (handler.key === 'pageup') {
+ if (handler.key === 'pageup' || handler.key === 'left') {
dir = 'Previous';
}
var func = 'go' + dir;
display: inline-block;
width: 23px;
height: 23px;
- background-color: @menu-button-background;
+ .button-hover();
position: relative;
top: 1px;
left: -5px;
display: inline-block;
height: 44px;
width: 44px;
- background-color: @menu-button-background;
+ .button-hover();
text-align: center;
font-weight: 700;
font-size: 30px;
width: 50px;
height: 50px;
border-radius: 50%;
- background-color: @menu-button-background;
+ .button-hover();
color: @menu-text;
&.minus {
height: 40px;
display: inline-block;
padding: 7px 17px 7px 7px;
- background-color: @menu-button-background;
+ .button-hover();
width: auto;
white-space: nowrap;
height: @zoom-close-button-size;
padding: unit((@zoom-close-button-size/30)*11, px);
z-index: 103;
- background-color: @menu-button-background;
+ .button-hover();
color: @menu-text;
opacity: 1;
transition: opacity 500ms;
.fonctions {
a {
- background-color: @button;
+ .button-hover();
}
}
.caption {
div.button, a {
&.back {
- background-color: @button;
+ .button-hover();
}
}
}
}
}
+.button-hover() {
+ @dark:darken(@menu-button-background,7%);
+ background-color: @menu-button-background;
+ transition: background-color 250ms;
+
+ &:hover {
+ background-color: @dark;
+ }
+
+ &:focus {
+ .keyboard-navigating & {
+ background-color: @dark;
+ }
+ }
+}
+
.menu-hover-item() {
background-color: transparent;
transition: background-color 250ms;
height: 60px;
padding: 21px 21px 23px 23px !important; // Controls size of icon and position within the element
color: @menu-text;
- background-color: @menu-button-background;
+ .button-hover();
.rtl & {
right: auto;
bottom: 0;
left: 0;
width: 100%;
- background-color: @menu-button-background;
+ .button-hover();
line-height: 1;
padding: 20px 0;