// }, {\r
// preserve: true\r
// });\r
- var h = 40 + ($("#horizontalNav a[data-tooltip]").length - 1) * 25;\r
+ var h = 20 + ($("#horizontalNav a[data-tooltip]").length - 1) * 25;\r
var ww = $(window).width();\r
\r
$("#horizontalNav a[data-tooltip]").each(function() {\r
if (text == null || text == undefined || text == '' || $(this).hasClass('hidden')) {\r
return;\r
}\r
- var offset = $(this).offset();\r
+\r
+ var icon = $(this).find('.svg-icon');\r
+ var offset = icon.offset();\r
var left;\r
\r
if ($this.fluidbook.l10n.dir == 'ltr') {\r
- left = offset.left + ($(this).outerWidth() / 2);\r
+ left = offset.left + (icon.outerWidth() / 2);\r
} else {\r
- left = (ww - offset.left - ($(this).outerWidth() / 2)) * -1;\r
+ left = (ww - offset.left - (icon.outerWidth() / 2)) * -1;\r
}\r
\r
var c = 'nav';\r
help += '<div class="last">' + this.fluidbook.l10n.__('last page') + '</div>';\r
help += '<div class="previous">' + previous + '</div>';\r
help += '<div class="first">' + this.fluidbook.l10n.__('frontpage') + '</div>';\r
+ help += '<div class="slider"><span>' + this.fluidbook.l10n.__('drag handle to switch page') + '</span></div>';\r
help += '</div>';\r
\r
if (this.fluidbook.pad.enabled) {\r
},\r
initEvents: function() {\r
var $this = this;\r
- if (!this.fluidbook.support.isMobile) {\r
- $(document).on('click', '.icon-help', function(e) {\r
- $this.show();\r
- if (fluidbook.nav.menuIsOpen) {\r
- fluidbook.nav.menuAPI.close();\r
- }\r
- e.preventDefault();\r
- }/*, function() {\r
- $this.hide();\r
- }).click(function() {\r
- return false;\r
- }*/);\r
- } else {\r
- $(document).on('click', '.icon-help', function() {\r
- $this.show();\r
- return false;\r
- });\r
- }\r
+\r
+ $(document).on('click', '.icon-help', function(e) {\r
+ $this.show();\r
+ if (fluidbook.nav.menuIsOpen) {\r
+ fluidbook.nav.menuAPI.close();\r
+ }\r
+ e.preventDefault();\r
+ });\r
\r
// Click handler on main helpView div to hide it\r
$this.view.click(function(e) {\r
\r
var $this = this;\r
\r
+ resize(); // Main resize function that later calls local resize() here...\r
this.view.show();\r
- $("#previous,#next").addClass('help');\r
+\r
+ $("body,#previous,#next").addClass('help');\r
this.fluidbook.showAllButtons();\r
\r
if (time != 0) {\r
var $this = this;\r
if (this.isVisible()) {\r
this.view.hide();\r
- $("#previous,#next").removeClass('help');\r
+ $("body,#previous,#next").removeClass('help');\r
this.fluidbook.hideUnnecessaryButtons();\r
if (this.fluidbook.support.isMobile) {\r
$("*").unbind('click', function() {\r
}\r
},\r
resize: function(ww, hh, interfaceScale, navScale) {\r
- var menuHeightScaled = (this.fluidbook.datas.menuHeight) * navScale\r
- this.view.css({\r
- width: ww,\r
- minHeight: hh - menuHeightScaled,\r
- top: menuHeightScaled\r
- });\r
+\r
+ // ToDo: access variables from fluidbook.resize.* if they're not passed to the function. So resize function can be called directly...\r
+\r
+ var $this = this;\r
+ var menuHeightScaled = (this.fluidbook.datas.menuHeight) * navScale;\r
+\r
+ // this.view.css({\r
+ // width: ww,\r
+ // minHeight: hh - menuHeightScaled,\r
+ // top: menuHeightScaled\r
+ // });\r
\r
\r
this.interfaceTop = (hh - 100 * interfaceScale) / 2 + 30 * interfaceScale;\r
- this.view.find(".interface>div").css({\r
- top: this.interfaceTop - menuHeightScaled\r
+ this.view.find(".interface > div").css({\r
+ top: this.interfaceTop\r
});\r
\r
- $("#helpView #icons").transform({\r
+ // Slider label - delay slightly to make sure co-ordinates are correct\r
+ setTimeout(function () {\r
+ var sliderHelp = $this.view.find('.slider');\r
+ var sliderCursor = $('#slidercursor .visible');\r
+ sliderHelp.css({\r
+ top: 'auto',\r
+ bottom: hh - sliderCursor.offset().top,\r
+ left: sliderCursor.offset().left + (sliderCursor.width() / 2)\r
+ });\r
+ }, 250);\r
+\r
+ $("#helpView #icons")\r
+ .css('top', menuHeightScaled)\r
+ .transform({\r
scale: [navScale, navScale],\r
origin: ['0%', '0%']\r
});\r
preserve: true\r
});\r
\r
- this.view.find('.illustration').css('margin-top', (hh - 400 * interfaceScale) / 2);\r
+ this.view.find('.illustration').css('margin-top', (hh - 200 * interfaceScale) / 2);\r
},\r
clearTimeout: function() {\r
clearTimeout(this.autoTimeout);\r
-o-transition: all @zoomtransition ease-out;
transition: all @zoomtransition ease-out;
}
+
+ // Add a slight blur below the help overlay
+ .help & {
+ filter: blur(7px);
+ }
}
#cache {
header {
position: relative;
z-index: 12;
+
+ // Header should sit above help overlay when it is open
+ .help & {
+ z-index: 21;
+ }
}
#nav > a {
#helpView {
background-color: rgba(0, 0, 0, 0.7);
position: absolute;
+ top: 0;
+ height: 100%;
+ width: 100%;
z-index: 20;
display: none;
color: #ffffff;
#icons {
position: absolute;
- top: 0px;
@media all and (max-width: @menu-breakpoint) {
display: none;
top: 0px;
display: inline-block;
border-left: 1px solid #ffffff;
- padding-left: 5px;
+ padding-left: 0.5em;
white-space: nowrap;
}
.icon span {
+ position: relative;
+ bottom: -0.5em;
+
& .rtl {
position: absolute;
right: 1em;
- display: block;
margin-top: -1em;
}
}
vertical-align: middle;
}
+#helpView .interface .slider {
+ position: absolute;
+ display: inline-block;
+ border-left: 1px solid #fff;
+ padding: 0 0 20px 0.5em;
+ white-space: nowrap;
+
+ span {
+ position: relative;
+ top: -0.5em;
+ }
+}
+
.ltr #helpView .interface .next,
.ltr #helpView .interface .last,
.rtl #helpView .interface .first,