Fluidbook.MIDDLE = 7;
Fluidbook.TOP = 8;
Fluidbook.BOTTOM = 9;
+
Fluidbook.prototype = {
init: function (datas) {
this.datas = datas;
},
_hideSplash: function () {
this.ready();
- $("#main").css('visibility', 'visible');
+ $("#main,#viewOverlay,#view").css('visibility', 'visible');
this.hideLoader(0, true);
if (this.support.transitions2d) {
var $this = this;
var page;
var args = window.location.hash.split('/');
-
+
if (args.length <= 1 || args[1] == '' || args[1] == undefined) {
return this.setCurrentPage('1');
} else if (args[1] == 'closeview') {
}, true);
}
else {
- this.menu.openView(args[1], args[2], args[3], function () {
+ var view = args[1];
+ if (this.currentPage == -1) {
+ if (view == 'multimedia' || view == 'video') {
+ var $this = this;
+ var searchURL = args.join('/');
+ $.each(this.datas.links, function (pageNr, links) {
+ var hl = $('<root>' + links + '</root>');
+ if ($(hl).find('[href="' + searchURL + '"]').length > 0) {
+ $this.currentPage = pageNr;
+ return false;
+ }
+ });
+ if (this.currentPage == -1) {
+ this.currentPage = 0;
+ }
+ } else {
+ this.currentPage = 0;
+ }
+ $this.pageTransition(this.currentPage);
+ }
+ this.menu.openView(view, args[2], args[3], function () {
$this.hideSplash();
});
this.zoom.resetZoom();