function Fluidbook(datas) {
- this.init(datas);
+ this.init(datas);
}
// Constantes
Fluidbook.TOP = 8;
Fluidbook.BOTTOM = 9;
Fluidbook.prototype = {
- init: function (datas) {
- this.datas = datas;
- this.junk = datas.cacheDate;
- this.cache = new FluidbookCache(datas);
- this.service = new FluidbookService(this, datas.id);
- this.support = new FluidbookSupport(this);
- this.loader = new FluidbookLoader(this);
- this.search = new FluidbookSearch(this);
- this.pad = new FluidbookPad(this);
- this.waiters = [];
- if (Modernizr.ftouch && this.support.transitions2d && this.datas.mobileTransitions != 'none') {
- this.touch = new FluidbookTouch(this);
- }
- this.background = new FluidbookBackground(this);
- this.viewport = new FluidbookViewport(this.support)
- this.l10n = new FluidbookL10N(this, $_GET['lang']);
- this.video = new FluidbookVideo(this);
- this.bookmarks = new FluidbookBookmarks(this);
- this.index = new FluidbookIndex(this);
- this.tooltip = new FluidbookTooltip(this);
- if (this.datas.form == 'bulle') {
- this.form = new FluidbookBulleForm(this);
- } else {
- this.form == false;
- }
- this.refw = 0;
- this.refh = 0;
- this.zoom = 1;
- this.searchHintXHR = null;
- this.searchString = '';
- this.termsToHighlight = '';
- this.imagesVersion = (this.datas.mobileVersion == 'html5-images' || !this.support.SVG);
- this.vectorTexts = !this.imagesVersion;
- this.displayOnePage = false;
- this.indexHTML = '';
- this.transitionning = false;
- this.gal = null;
- this.isReady = false;
- this.transitionAxis = 'x';
- if (this.support.isMobile) {
- $("body").addClass('mobile');
- }
- else {
- $("body").addClass('desktop');
- }
+ init: function (datas) {
+ this.datas = datas;
+ this.junk = datas.cacheDate;
+ this.cache = new FluidbookCache(datas);
+ this.service = new FluidbookService(this, datas.id);
+ this.support = new FluidbookSupport(this);
+ this.loader = new FluidbookLoader(this);
+ this.search = new FluidbookSearch(this);
+ this.pad = new FluidbookPad(this);
+ this.waiters = [];
+ if (Modernizr.ftouch && this.support.transitions2d && this.datas.mobileTransitions != 'none') {
+ this.touch = new FluidbookTouch(this);
+ }
+ this.background = new FluidbookBackground(this);
+ this.viewport = new FluidbookViewport(this.support)
+ this.l10n = new FluidbookL10N(this, $_GET['lang']);
+ this.video = new FluidbookVideo(this);
+ this.bookmarks = new FluidbookBookmarks(this);
+ this.index = new FluidbookIndex(this);
+ this.tooltip = new FluidbookTooltip(this);
+ if (this.datas.form == 'bulle') {
+ this.form = new FluidbookBulleForm(this);
+ } else {
+ this.form == false;
+ }
+ this.refw = 0;
+ this.refh = 0;
+ this.zoom = 1;
+ this.searchHintXHR = null;
+ this.searchString = '';
+ this.termsToHighlight = '';
+ this.imagesVersion = (this.datas.mobileVersion == 'html5-images' || !this.support.SVG);
+ this.vectorTexts = !this.imagesVersion;
+ this.displayOnePage = false;
+ this.indexHTML = '';
+ this.transitionning = false;
+ this.gal = null;
+ this.isReady = false;
+ this.transitionAxis = 'x';
+ if (this.support.isMobile) {
+ $("body").addClass('mobile');
+ }
+ else {
+ $("body").addClass('desktop');
+ }
- if (this.pad.enabled) {
- $("body").addClass('pad');
- }
- $('html').addClass(this.datas.mobileLVersion);
- this.currentPage = -1;
- this.resize = new FluidbookResize(this);
- this.coquillette = new FluidbookCoquillette(this);
- this.stats = new FluidbookStats(this);
- this.stats.track(10);
- if (!this.support.isMobile) {
- this.desktop = new FluidbookDesktop(this);
- }
- this.initLoading();
- },
- initLoading: function () {
- this.displayLoader();
- },
- reloadErrorImages: function () {
- $('img').each(function () {
+ if (this.pad.enabled) {
+ $("body").addClass('pad');
+ }
+ $('html').addClass(this.datas.mobileLVersion);
+ this.currentPage = -1;
+ this.resize = new FluidbookResize(this);
+ this.coquillette = new FluidbookCoquillette(this);
+ this.stats = new FluidbookStats(this);
+ this.stats.track(10);
+ if (!this.support.isMobile) {
+ this.desktop = new FluidbookDesktop(this);
+ }
+ this.initLoading();
+ },
+ initLoading: function () {
+ this.displayLoader();
+ },
+ reloadErrorImages: function () {
+ $('img').each(function () {
- });
- },
- hideSplash: function () {
- if ($("#splash").length == 0) {
- return;
- }
- try {
- navigator.splashscreen.hide();
- } catch (err) {
- }
+ });
+ },
+ hideSplash: function () {
+ if ($("#splash").length == 0) {
+ return;
+ }
+ try {
+ navigator.splashscreen.hide();
+ } catch (err) {
+ }
- this.loader.canPreload();
- var $this = this;
- setTimeout(function () {
- $this._hideSplash();
- }, 3000);
- },
- _hideSplash: function () {
- this.ready();
- $("#main").css('visibility', 'visible');
- this.hideLoader(0, true);
- if (this.support.transitions2d) {
- $("#splash").css('opacity', 0).one(this.support.getTransitionEndEvent(true), function () {
- $(this).remove();
- });
- } else {
- $("#splash").fadeOut(500, function () {
- $(this.remove());
- })
- }
+ this.loader.canPreload();
+ var $this = this;
+ setTimeout(function () {
+ $this._hideSplash();
+ }, 3000);
+ },
+ _hideSplash: function () {
+ this.ready();
+ $("#main").css('visibility', 'visible');
+ this.hideLoader(0, true);
+ if (this.support.transitions2d) {
+ $("#splash").css('opacity', 0).one(this.support.getTransitionEndEvent(true), function () {
+ $(this).remove();
+ });
+ } else {
+ $("#splash").fadeOut(500, function () {
+ $(this.remove());
+ })
+ }
- },
- ready: function () {
- if (this.isReady) {
- return;
- }
- this.isReady = true;
- $("#main").css('display', 'block');
- this.nav = new FluidbookNav(this);
- this.help = new FluidbookHelp(this);
- this.help.displayAtStartup();
- resize();
- $(this).trigger('fluidbookready');
- },
- loadPlugins: function () {
- $.each(this.datas.plugins, function (k, plugin) {
- try {
- var functionName = plugin.replace(/\./g, '_');
- eval(functionName + '();');
- } catch (err) {
- }
- });
- $.each(this.datas.htmlmultimedia, function (k, code) {
- try {
- eval(code);
- } catch (err) {
- }
- });
- },
- resetZoom: function () {
- var $this = this;
- if (this.support.iOS) {
- } else if (!this.support.isMobile) {
- this.desktop.updateDesktopScale(1);
- }
+ },
+ ready: function () {
+ if (this.isReady) {
+ return;
+ }
+ this.isReady = true;
+ $("#main").css('display', 'block');
+ this.nav = new FluidbookNav(this);
+ this.help = new FluidbookHelp(this);
+ this.help.displayAtStartup();
+ resize();
+ $(this).trigger('fluidbookready');
+ },
+ loadPlugins: function () {
+ $.each(this.datas.plugins, function (k, plugin) {
+ try {
+ var functionName = plugin.replace(/\./g, '_');
+ eval(functionName + '();');
+ } catch (err) {
+ }
+ });
+ $.each(this.datas.htmlmultimedia, function (k, code) {
+ try {
+ eval(code);
+ } catch (err) {
+ }
+ });
+ },
+ resetZoom: function () {
+ var $this = this;
+ if (this.support.iOS) {
+ } else if (!this.support.isMobile) {
+ this.desktop.updateDesktopScale(1);
+ }
- },
- setZoom: function (zoom) {
- if (zoom) {
- $("#pages").addClass('zoom');
- } else {
- $("#pages").removeClass('zoom');
- }
- },
- initPage: function (pageNr, doublePage, position) {
- if ($("#page_" + pageNr).length > 0) {
- return;
- }
- $(doublePage).find('.' + position).remove();
- var page = '<div class="page ' + position + '" id="page_' + pageNr + '" data-page="' + pageNr + '"><div class="background" page="' + pageNr + '"></div><div class="clinks"></div><div class="texts" highlight=""></div><div class="shade"></div></div>';
- $(doublePage).append(page);
- },
- hidePage: function (position) {
- $("#pages ." + position).hide();
- },
- initLinks: function (pageNr) {
- if (pageNr == undefined) {
- pageNr = this.currentPage;
- }
+ },
+ setZoom: function (zoom) {
+ if (zoom) {
+ $("#pages").addClass('zoom');
+ } else {
+ $("#pages").removeClass('zoom');
+ }
+ },
+ initPage: function (pageNr, doublePage, position) {
+ if ($("#page_" + pageNr).length > 0) {
+ return;
+ }
+ $(doublePage).find('.' + position).remove();
+ var page = '<div class="page ' + position + '" id="page_' + pageNr + '" data-page="' + pageNr + '"><div class="background" page="' + pageNr + '"></div><div class="clinks"></div><div class="texts" highlight=""></div><div class="shade"></div></div>';
+ $(doublePage).append(page);
+ },
+ hidePage: function (position) {
+ $("#pages ." + position).hide();
+ },
+ initLinks: function (pageNr) {
+ if (pageNr == undefined) {
+ pageNr = this.currentPage;
+ }
- var lClass = 'left';
- if (this.displayOnePage && pageNr % 2 == 1) {
- lClass = 'right';
- }
+ var lClass = 'left';
+ if (this.displayOnePage && pageNr % 2 == 1) {
+ lClass = 'right';
+ }
- if (pageNr % 2 == 1) {
- pageNr--;
- }
+ if (pageNr % 2 == 1) {
+ pageNr--;
+ }
- $("#links").removeClass('left').removeClass('right').addClass(lClass).html(this.datas.links[pageNr]).show();
- if (this.datas.bookmark) {
- $("#links").append(this.bookmarks.getBookmarkForPage(pageNr));
- }
- $("#links").prepend('<a href="#" class="nonlinkarea"></a>');
- var $this = this;
- if (this.datas.linkBlinkTime > 0) {
- ///this.animateLinks();
- }
- setTimeout(function () {
- $this.initVideos();
- }, 1000);
- },
- animateLinks: function () {
- var links = $(".link a.displayArea");
- var bookmarks = $("#links .bookmark:not([data-enabled])");
- if (Modernizr.csstransitions) {
- $(links).addClass('animating');
- $(bookmarks).css('opacity', 1).addClass('animating');
- setTimeout(function () {
- $(links).css('opacity', 0);
- $(bookmarks).css('opacity', 0);
- setTimeout(function () {
- $(links).removeClass('animating').css('opacity', 1);
- $(bookmarks).removeClass('animating').css('opacity', "");
- }, 1100);
- }, 50);
- } else {
- $(links).addClass('animating').fadeOut(1000, function () {
- $(links).removeClass('animating').show();
- }).mouseover(function () {
- $(links).stop().removeClass('animating').css('opacity', 1).show();
- return true;
- });
- }
- },
- initVideos: function () {
- var $this = this;
- $(".videoContainer").each(function () {
- $this.video.initVideo(this);
- });
- },
- getNextOffset: function () {
- var offset = 2;
- if (this.displayOnePage) {
- offset = 1;
- }
- this.transitionAxis = 'x';
- return offset;
- },
- goNextPage: function () {
- if (this.transitionning) {
- return;
- }
- this.transitionAxis = 'x';
- this.setCurrentPage(this.normalizePage(this.currentPage) + this.getNextOffset());
- },
- goFirstPage: function () {
- if (this.transitionning) {
- return;
- }
- this.transitionAxis = 'x';
- this.setCurrentPage(1);
- },
- goPreviousPage: function () {
- if (this.transitionning) {
- return;
- }
- this.transitionAxis = 'x';
- this.setCurrentPage(this.normalizePage(this.currentPage) - this.getNextOffset());
- },
- goLastPage: function () {
- if (this.transitionning) {
- return;
- }
- this.transitionAxis = 'x';
- this.setCurrentPage(this.datas.pages);
- },
- goNextChapter: function () {
- if (this.transitionning) {
- return;
- }
- var next = this.bookmarks.getNextGroupCover(this.currentPage);
- if (next === false) {
- return;
- }
- this.transitionAxis = 'x';
- this.setCurrentPage(this.normalizePage(next));
- },
- goPreviousChapter: function () {
- if (this.transitionning) {
- return;
- }
- var prev = this.bookmarks.getPreviousGroupCover(this.currentPage);
- if (prev === false) {
- return;
- }
- this.transitionAxis = 'x';
- this.setCurrentPage(this.normalizePage(prev));
- },
- goNextChapterPage: function () {
- if (this.transitionning) {
- return;
- }
+ $("#links").removeClass('left').removeClass('right').addClass(lClass).html(this.datas.links[pageNr]).show();
+ if (this.datas.bookmark) {
+ $("#links").append(this.bookmarks.getBookmarkForPage(pageNr));
+ }
+ $("#links").prepend('<a href="#" class="nonlinkarea"></a>');
+ var $this = this;
+ if (this.datas.linkBlinkTime > 0) {
+ ///this.animateLinks();
+ }
+ setTimeout(function () {
+ $this.initVideos();
+ }, 1000);
+ },
+ animateLinks: function () {
+ var links = $(".link a.displayArea");
+ var bookmarks = $("#links .bookmark:not([data-enabled])");
+ if (Modernizr.csstransitions) {
+ $(links).addClass('animating');
+ $(bookmarks).css('opacity', 1).addClass('animating');
+ setTimeout(function () {
+ $(links).css('opacity', 0);
+ $(bookmarks).css('opacity', 0);
+ setTimeout(function () {
+ $(links).removeClass('animating').css('opacity', 1);
+ $(bookmarks).removeClass('animating').css('opacity', "");
+ }, 1100);
+ }, 50);
+ } else {
+ $(links).addClass('animating').fadeOut(1000, function () {
+ $(links).removeClass('animating').show();
+ }).mouseover(function () {
+ $(links).stop().removeClass('animating').css('opacity', 1).show();
+ return true;
+ });
+ }
+ },
+ initVideos: function () {
+ var $this = this;
+ $(".videoContainer").each(function () {
+ $this.video.initVideo(this);
+ });
+ },
+ getNextOffset: function () {
+ var offset = 2;
+ if (this.displayOnePage) {
+ offset = 1;
+ }
+ this.transitionAxis = 'x';
+ return offset;
+ },
+ goNextPage: function () {
+ if (this.transitionning) {
+ return;
+ }
+ this.transitionAxis = 'x';
+ this.setCurrentPage(this.normalizePage(this.currentPage) + this.getNextOffset());
+ },
+ goFirstPage: function () {
+ if (this.transitionning) {
+ return;
+ }
+ this.transitionAxis = 'x';
+ this.setCurrentPage(1);
+ },
+ goPreviousPage: function () {
+ if (this.transitionning) {
+ return;
+ }
+ this.transitionAxis = 'x';
+ this.setCurrentPage(this.normalizePage(this.currentPage) - this.getNextOffset());
+ },
+ goLastPage: function () {
+ if (this.transitionning) {
+ return;
+ }
+ this.transitionAxis = 'x';
+ this.setCurrentPage(this.datas.pages);
+ },
+ goNextChapter: function () {
+ if (this.transitionning) {
+ return;
+ }
+ var next = this.bookmarks.getNextGroupCover(this.currentPage);
+ if (next === false) {
+ return;
+ }
+ this.transitionAxis = 'x';
+ this.setCurrentPage(this.normalizePage(next));
+ },
+ goPreviousChapter: function () {
+ if (this.transitionning) {
+ return;
+ }
+ var prev = this.bookmarks.getPreviousGroupCover(this.currentPage);
+ if (prev === false) {
+ return;
+ }
+ this.transitionAxis = 'x';
+ this.setCurrentPage(this.normalizePage(prev));
+ },
+ goNextChapterPage: function () {
+ if (this.transitionning) {
+ return;
+ }
- var next = this.bookmarks.getNextPageInGroupOfPage(this.currentPage);
- if (next === false) {
- return;
- }
- this.transitionAxis = 'y';
- this.setCurrentPage(this.normalizePage(next));
- },
- goPreviousChapterPage: function () {
- if (this.transitionning) {
- return;
- }
+ var next = this.bookmarks.getNextPageInGroupOfPage(this.currentPage);
+ if (next === false) {
+ return;
+ }
+ this.transitionAxis = 'y';
+ this.setCurrentPage(this.normalizePage(next));
+ },
+ goPreviousChapterPage: function () {
+ if (this.transitionning) {
+ return;
+ }
- var prev = this.bookmarks.getPreviousPageInGroupOfPage(this.currentPage);
- if (prev === false) {
- return;
- }
- this.transitionAxis = 'y';
- this.setCurrentPage(this.normalizePage(prev));
- },
- normalizePage: function (page) {
- page = Math.max(1, Math.min(page, this.datas.pages));
- if (!this.displayOnePage && page % 2 == 1) {
- page--;
- }
- return page;
- },
- setCurrentPage: function (page) {
- window.location.hash = "#/page/" + this.normalizePage(page);
- },
- changeAddress: function () {
- 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] == 'page') {
- page = parseInt(args[2]);
- if (isNaN(page) || page == undefined) {
- return this.setCurrentPage('1');
- }
- if (this.pad.enabled) {
- this.transitionAxis = this.pad.getTransitionAxis(this.currentPage, page);
- } else {
- this.transitionAxis = 'x';
- }
+ var prev = this.bookmarks.getPreviousPageInGroupOfPage(this.currentPage);
+ if (prev === false) {
+ return;
+ }
+ this.transitionAxis = 'y';
+ this.setCurrentPage(this.normalizePage(prev));
+ },
+ normalizePage: function (page) {
+ page = Math.max(1, Math.min(page, this.datas.pages));
+ if (!this.displayOnePage && page % 2 == 1) {
+ page--;
+ }
+ return page;
+ },
+ setCurrentPage: function (page) {
+ window.location.hash = "#/page/" + this.normalizePage(page);
+ },
+ changeAddress: function () {
+ 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] == 'page') {
+ page = parseInt(args[2]);
+ if (isNaN(page) || page == undefined) {
+ return this.setCurrentPage('1');
+ }
+ if (this.pad.enabled) {
+ this.transitionAxis = this.pad.getTransitionAxis(this.currentPage, page);
+ } else {
+ this.transitionAxis = 'x';
+ }
- $($this).trigger('changePage', [page]);
- this.closeView(function () {
- $this.pageTransition(page);
- $this.resetZoom();
- $this.stats.track(0, page);
- $this.hideSplash();
- }, true);
- }
- else {
- this.openView(args[1], args[2], args[3], function () {
- $this.hideSplash();
- });
- this.resetZoom();
- }
+ $($this).trigger('changePage', [page]);
+ this.closeView(function () {
+ $this.pageTransition(page);
+ $this.resetZoom();
+ $this.stats.track(0, page);
+ $this.hideSplash();
+ }, true);
+ }
+ else {
+ this.openView(args[1], args[2], args[3], function () {
+ $this.hideSplash();
+ });
+ this.resetZoom();
+ }
- return;
- },
- pageTransition: function (pageNr) {
- this.tooltip.hideTooltip();
- if (pageNr == undefined) {
- pageNr = this.currentPage;
- if (pageNr == -1) {
- pageNr = 1;
- }
- }
- pageNr = this.normalizePage(pageNr);
- if (pageNr == this.normalizePage(this.currentPage) || this.currentPage == -1 || !this.support.transitions2d || this.datas.mobileTransitions == 'none') {
- return this.pageTransition1D(pageNr);
- }
+ return;
+ },
+ pageTransition: function (pageNr) {
+ this.tooltip.hideTooltip();
+ if (pageNr == undefined) {
+ pageNr = this.currentPage;
+ if (pageNr == -1) {
+ pageNr = 1;
+ }
+ }
+ pageNr = this.normalizePage(pageNr);
+ if (pageNr == this.normalizePage(this.currentPage) || this.currentPage == -1 || !this.support.transitions2d || this.datas.mobileTransitions == 'none') {
+ return this.pageTransition1D(pageNr);
+ }
- if (this.displayOnePage) {
- return this.pageTransition2DPortrait(pageNr);
- }
+ if (this.displayOnePage) {
+ return this.pageTransition2DPortrait(pageNr);
+ }
- if (!this.support.transitions3d || this.datas.mobileTransitions == 'slide') {
- return this.pageTransition2D(pageNr);
- }
+ if (!this.support.transitions3d || this.datas.mobileTransitions == 'slide') {
+ return this.pageTransition2D(pageNr);
+ }
- return this.pageTransition3D(pageNr);
- },
- pageTransition3D: function (pageNr) {
+ return this.pageTransition3D(pageNr);
+ },
+ pageTransition3D: function (pageNr) {
- var $this = this;
- if ($("#pages").hasClass('_3dtransition')) {
- return;
- }
- this.transitionning = true;
- var $this = this;
- var turning = this.getTurningPages(pageNr);
- $("#pages").prepend('<div id="nextDoublePage" class="_3d doublePage ' + turning.nextFromClass + 'start"></div>');
- var doublePage = $("#nextDoublePage");
- var currentDoublePage = $("#currentDoublePage");
- this.displayLoader();
- this.loader.preloadPagesBeforeTransition([turning.currentLeft, turning.currentRight], function () {
- $("#pages").addClass('_3dtransition');
- $this.loader.setContentsInDoublePage(currentDoublePage, turning.flat, true, function () {
- $this.loader.setContentsInDoublePage(doublePage, turning.flip, true, function () {
- $this.beforeTransition(pageNr, 3);
- $(doublePage).addClass(turning.nextFromClass + 'end').one($this.support.getTransitionEndEvent(), function () {
- if ($this.transitionning == false) {
- return;
- }
- if ($("#nextDoublePage").length == 0) {
- $("#pages").removeClass('_3dtransition');
- $this.transitionning = false;
- return;
- }
+ var $this = this;
+ if ($("#pages").hasClass('_3dtransition')) {
+ return;
+ }
+ this.transitionning = true;
+ var $this = this;
+ var turning = this.getTurningPages(pageNr);
+ $("#pages").prepend('<div id="nextDoublePage" class="_3d doublePage ' + turning.nextFromClass + 'start"></div>');
+ var doublePage = $("#nextDoublePage");
+ var currentDoublePage = $("#currentDoublePage");
+ this.displayLoader();
+ this.loader.preloadPagesBeforeTransition([turning.currentLeft, turning.currentRight], function () {
+ $("#pages").addClass('_3dtransition');
+ $this.loader.setContentsInDoublePage(currentDoublePage, turning.flat, true, function () {
+ $this.loader.setContentsInDoublePage(doublePage, turning.flip, true, function () {
+ $this.beforeTransition(pageNr, 3);
+ $(doublePage).addClass(turning.nextFromClass + 'end').one($this.support.getTransitionEndEvent(), function () {
+ if ($this.transitionning == false) {
+ return;
+ }
+ if ($("#nextDoublePage").length == 0) {
+ $("#pages").removeClass('_3dtransition');
+ $this.transitionning = false;
+ return;
+ }
- // Set the flat contents with the new page
- $this.loader.setContentsInDoublePage(doublePage, turning.end, false, function () {
- $(doublePage).removeClass('_3d').removeClass(turning.nextFromClass + 'start').removeClass(turning.nextFromClass + 'end');
- // Remove former part
- $("#currentDoublePage").remove();
- $(doublePage).attr('id', 'currentDoublePage');
- $("#pages").removeClass('_3dtransition');
- $this.afterTransition(pageNr);
- });
- });
- });
- });
- });
- },
- getTurningPages: function (newPage) {
- var res = {};
- res.dir = 1;
- if (newPage < this.currentPage) {
- res.dir = -1;
- }
+ // Set the flat contents with the new page
+ $this.loader.setContentsInDoublePage(doublePage, turning.end, false, function () {
+ $(doublePage).removeClass('_3d').removeClass(turning.nextFromClass + 'start').removeClass(turning.nextFromClass + 'end');
+ // Remove former part
+ $("#currentDoublePage").remove();
+ $(doublePage).attr('id', 'currentDoublePage');
+ $("#pages").removeClass('_3dtransition');
+ $this.afterTransition(pageNr);
+ });
+ });
+ });
+ });
+ });
+ },
+ getTurningPages: function (newPage) {
+ var res = {};
+ res.dir = 1;
+ if (newPage < this.currentPage) {
+ res.dir = -1;
+ }
- if (this.l10n.dir == 'ltr') {
- res.currentLeft = this.currentPage - this.currentPage % 2;
- res.currentRight = res.currentLeft + 1;
- if (res.dir == 1) {
- res.currentToClass = 'prev';
- res.nextFromClass = 'next';
- res.flat = [res.currentLeft, newPage + 1];
- res.flip = [newPage, res.currentRight];
- } else {
- res.currentToClass = 'next';
- res.nextFromClass = 'prev';
- res.flat = [newPage, res.currentRight];
- res.flip = [res.currentLeft, newPage + 1];
- }
- res['end'] = [newPage, newPage + 1];
- } else {
- res.currentRight = this.currentPage - this.currentPage % 2;
- res.currentLeft = res.currentRight + 1;
- if (res.dir == 1) {
- res.currentToClass = 'next';
- res.nextFromClass = 'prev';
- res.flat = [newPage + 1, res.currentRight];
- res.flip = [res.currentLeft, newPage];
- } else {
- res.currentToClass = 'prev';
- res.nextFromClass = 'next';
- res.flat = [res.currentLeft, newPage];
- res.flip = [newPage + 1, res.currentRight];
- }
+ if (this.l10n.dir == 'ltr') {
+ res.currentLeft = this.currentPage - this.currentPage % 2;
+ res.currentRight = res.currentLeft + 1;
+ if (res.dir == 1) {
+ res.currentToClass = 'prev';
+ res.nextFromClass = 'next';
+ res.flat = [res.currentLeft, newPage + 1];
+ res.flip = [newPage, res.currentRight];
+ } else {
+ res.currentToClass = 'next';
+ res.nextFromClass = 'prev';
+ res.flat = [newPage, res.currentRight];
+ res.flip = [res.currentLeft, newPage + 1];
+ }
+ res['end'] = [newPage, newPage + 1];
+ } else {
+ res.currentRight = this.currentPage - this.currentPage % 2;
+ res.currentLeft = res.currentRight + 1;
+ if (res.dir == 1) {
+ res.currentToClass = 'next';
+ res.nextFromClass = 'prev';
+ res.flat = [newPage + 1, res.currentRight];
+ res.flip = [res.currentLeft, newPage];
+ } else {
+ res.currentToClass = 'prev';
+ res.nextFromClass = 'next';
+ res.flat = [res.currentLeft, newPage];
+ res.flip = [newPage + 1, res.currentRight];
+ }
- if (this.displayOnePage) {
- res.end = [newPage, newPage + 1];
- } else {
- res.end = [newPage + 1, newPage];
- }
- }
- res.loading = [res.currentLeft, res.currentRight];
- return json_parse(JSON.stringify(res));
- },
- reloadCurrentPage: function () {
- this.pageTransition(this.currentPage);
- },
- readingPage: function (side) {
- if (!this.displayOnePage) {
- var page = this.currentPage;
- var change = false;
- if (side == 'left' && page % 2 == 1) {
- page--;
- change = true;
- } else if (side == 'right' && page % 2 == 0) {
- page++;
- change = true;
- }
- if (change) {
- window.location.hash = "/page/" + page;
- }
- }
- },
- hideUnnecessaryButtons: function (page) {
- var speed = 500;
- if (page == undefined) {
- page = this.currentPage;
- speed = 0;
- }
+ if (this.displayOnePage) {
+ res.end = [newPage, newPage + 1];
+ } else {
+ res.end = [newPage + 1, newPage];
+ }
+ }
+ res.loading = [res.currentLeft, res.currentRight];
+ return json_parse(JSON.stringify(res));
+ },
+ reloadCurrentPage: function () {
+ this.pageTransition(this.currentPage);
+ },
+ readingPage: function (side) {
+ if (!this.displayOnePage) {
+ var page = this.currentPage;
+ var change = false;
+ if (side == 'left' && page % 2 == 1) {
+ page--;
+ change = true;
+ } else if (side == 'right' && page % 2 == 0) {
+ page++;
+ change = true;
+ }
+ if (change) {
+ window.location.hash = "/page/" + page;
+ }
+ }
+ },
+ hideUnnecessaryButtons: function (page) {
+ var speed = 500;
+ if (page == undefined) {
+ page = this.currentPage;
+ speed = 0;
+ }
- if (Modernizr.csstransitions) {
- if (page <= 1) {
- $("#previous").addClass('hidden');
- } else {
- $("#previous").removeClass('hidden');
- }
+ if (Modernizr.csstransitions) {
+ if (page <= 1) {
+ $("#previous").addClass('hidden');
+ } else {
+ $("#previous").removeClass('hidden');
+ }
- if (page >= this.datas.pages) {
- $("#next").addClass('hidden');
- } else {
- $("#next").removeClass('hidden');
- }
- } else {
- $("#previous,#next").removeClass('hidden');
- if (page <= 1) {
- $("#previous:visible").fadeOut(speed);
- } else {
- $("#previous:hidden").fadeIn(speed);
- }
+ if (page >= this.datas.pages) {
+ $("#next").addClass('hidden');
+ } else {
+ $("#next").removeClass('hidden');
+ }
+ } else {
+ $("#previous,#next").removeClass('hidden');
+ if (page <= 1) {
+ $("#previous:visible").fadeOut(speed);
+ } else {
+ $("#previous:hidden").fadeIn(speed);
+ }
- if (page >= this.datas.pages) {
- $("#next:visible").fadeOut(speed);
- } else {
- $("#next:hidden").fadeIn(speed);
- }
- }
- },
- updateShadows: function (page, animationDuration) {
- if (animationDuration == undefined) {
- animationDuration = 0;
- }
- animationDuration *= 1000;
- var delay, duration;
- if (animationDuration == 0) {
- delay = 0;
- duration = 0;
- } else {
- delay = animationDuration * 0.7;
- duration = animationDuration * 0.3;
- }
+ if (page >= this.datas.pages) {
+ $("#next:visible").fadeOut(speed);
+ } else {
+ $("#next:hidden").fadeIn(speed);
+ }
+ }
+ },
+ updateShadows: function (page, animationDuration) {
+ if (animationDuration == undefined) {
+ animationDuration = 0;
+ }
+ animationDuration *= 1000;
+ var delay, duration;
+ if (animationDuration == 0) {
+ delay = 0;
+ duration = 0;
+ } else {
+ delay = animationDuration * 0.7;
+ duration = animationDuration * 0.3;
+ }
- var left = true, right = true;
- if (this.displayOnePage) {
- right = false;
- } else {
- if ((page <= 1 && this.l10n.dir == 'ltr') || (page >= this.datas.pages && this.l10n.dir == 'rtl')) {
- left = false;
- } else if ((page <= 1 && this.l10n.dir == 'rtl') || (page >= this.datas.pages && this.l10n.dir == 'ltr')) {
- right = false;
- }
- }
+ var left = true, right = true;
+ if (this.displayOnePage) {
+ right = false;
+ } else {
+ if ((page <= 1 && this.l10n.dir == 'ltr') || (page >= this.datas.pages && this.l10n.dir == 'rtl')) {
+ left = false;
+ } else if ((page <= 1 && this.l10n.dir == 'rtl') || (page >= this.datas.pages && this.l10n.dir == 'ltr')) {
+ right = false;
+ }
+ }
- if (left) {
- $("#shadow>.left:hidden").delay(delay).fadeIn(duration);
- } else {
- $("#shadow>.left:visible").fadeOut(duration);
- }
+ if (left) {
+ $("#shadow>.left:hidden").delay(delay).fadeIn(duration);
+ } else {
+ $("#shadow>.left:visible").fadeOut(duration);
+ }
- if (right) {
- $("#shadow>.right:hidden").delay(delay).fadeIn(duration);
- } else {
- $("#shadow>.right:visible").fadeOut(duration);
- }
- },
- showAllButtons: function () {
- $("#next,#previous").addClass('help').show();
- },
- pageTransition2D: function (pageNr) {
- this.transitionning = true;
- var $this = this;
- var turning = this.getTurningPages(pageNr);
- $("#pages").append('<div id="nextDoublePage" class="doublePage _2d axis_' + this.transitionAxis + ' ' + turning.nextFromClass + '"></div>');
- var doublePage = $("#nextDoublePage");
- this.displayLoader();
- this.loader.preloadPagesBeforeTransition(turning.end, function () {
- $this.loader.setContentsInDoublePage(doublePage, turning.end, true, function () {
- $this.beforeTransition(pageNr, 2);
- $("#currentDoublePage").addClass('_2d').addClass('axis_' + $this.transitionAxis).addClass(turning.currentToClass);
- $(doublePage).removeClass(turning.nextFromClass).one($this.support.getTransitionEndEvent(), function (event) {
- if ($this.transitionning == false) {
- return;
- }
- $("#currentDoublePage").remove();
- $("#nextDoublePage").attr('id', 'currentDoublePage');
- $this.afterTransition(pageNr);
- });
- });
- });
- },
- pageTransition2DPortrait: function (pageNr) {
- this.transitionning = true;
- var $this = this;
- var turning = this.getTurningPages(pageNr);
- $("#pages").append('<div id="nextDoublePage" class="doublePage _2d axis_' + this.transitionAxis + ' ' + turning.nextFromClass + '"></div>');
- var doublePage = $("#nextDoublePage");
- if (this.displayOnePage) {
- this.hidePage('right');
- }
+ if (right) {
+ $("#shadow>.right:hidden").delay(delay).fadeIn(duration);
+ } else {
+ $("#shadow>.right:visible").fadeOut(duration);
+ }
+ },
+ showAllButtons: function () {
+ $("#next,#previous").addClass('help').show();
+ },
+ pageTransition2D: function (pageNr) {
+ this.transitionning = true;
+ var $this = this;
+ var turning = this.getTurningPages(pageNr);
+ $("#pages").append('<div id="nextDoublePage" class="doublePage _2d axis_' + this.transitionAxis + ' ' + turning.nextFromClass + '"></div>');
+ var doublePage = $("#nextDoublePage");
+ this.displayLoader();
+ this.loader.preloadPagesBeforeTransition(turning.end, function () {
+ $this.loader.setContentsInDoublePage(doublePage, turning.end, true, function () {
+ $this.beforeTransition(pageNr, 2);
+ $("#currentDoublePage").addClass('_2d').addClass('axis_' + $this.transitionAxis).addClass(turning.currentToClass);
+ $(doublePage).removeClass(turning.nextFromClass).one($this.support.getTransitionEndEvent(), function (event) {
+ if ($this.transitionning == false) {
+ return;
+ }
+ $("#currentDoublePage").remove();
+ $("#nextDoublePage").attr('id', 'currentDoublePage');
+ $this.afterTransition(pageNr);
+ });
+ });
+ });
+ },
+ pageTransition2DPortrait: function (pageNr) {
+ this.transitionning = true;
+ var $this = this;
+ var turning = this.getTurningPages(pageNr);
+ $("#pages").append('<div id="nextDoublePage" class="doublePage _2d axis_' + this.transitionAxis + ' ' + turning.nextFromClass + '"></div>');
+ var doublePage = $("#nextDoublePage");
+ if (this.displayOnePage) {
+ this.hidePage('right');
+ }
- this.displayLoader();
- this.loader.preloadPagesBeforeTransition(turning.end, function () {
- $this.loader.setContentsInDoublePage(doublePage, turning.end, true, function () {
- $this.beforeTransition(pageNr, 2);
- $("#currentDoublePage").addClass('axis_' + $this.transitionAxis).addClass('_2d').addClass(turning.currentToClass);
- $(doublePage).removeClass(turning.nextFromClass).one($this.support.getTransitionEndEvent(), function () {
- fb('received event');
- if ($this.transitionning == false) {
- return;
- }
- $("#currentDoublePage").remove();
- $("#nextDoublePage").attr('id', 'currentDoublePage');
- $this.afterTransition(pageNr);
- });
- });
- });
- },
- pageTransition1D: function (pageNr) {
- var page = pageNr;
- var doublePage = $("#currentDoublePage");
- var $this = this;
- if (this.displayOnePage) {
- this.hidePage('right');
- }
- var turning = this.getTurningPages(pageNr);
- this.beforeTransition(pageNr);
- this.loader.setContentsInDoublePage(doublePage, turning.end, true, function () {
- $this.afterTransition(page);
- });
- },
- beforeTransition: function (page, d) {
- if (d == undefined) {
- d = 1;
- }
- $(".axis_y").removeClass('axis_y');
- $(".axis_x").removeClass('axis_x');
- $("#links").hide();
- this.hideLoader();
- this.hideUnnecessaryButtons(page);
- var animationDuration = d <= 1 ? 0 : parseFloat(this.datas.mobileTransitionDuration);
- this.updateShadows(page, animationDuration);
- fb('beforeTransition ' + page);
- },
- afterTransition: function (page) {
- if (this.transitionning === false) {
- //return;
- }
- fb('afterTransition ' + page);
- var $this = this;
- this.currentPage = page;
- this.setPageNumbers();
- setTimeout(function () {
- $this.loader.preloadAround(page);
- }, 1000);
- this.initLinks();
- this.hideLoader();
- this.resetWaiters();
- // Clean messy stuffs
- $("#pages").removeClass('_3dtransition');
- if ($("#nextDoublePage").length > 0) {
- $("#currentDoublePage").remove();
- $("#nextDoublePage").attr('id', 'currentDoublePage');
- }
- if ($("#currentDoublePage").length > 1) {
- $("#currentDoublePage:gt(0)").remove();
- }
- this.transitionning = false;
- if (this.pad.enabled) {
- if (this.currentPage == this.datas.pages) {
- $("#down").css('opacity', 0);
- } else {
- $("#down").css('opacity', 1);
- if (!this.bookmarks.hasNextPageInGroup(this.currentPage)) {
- $("#down").addClass('right');
- } else {
- $("#down").removeClass('right');
- }
- }
- } else {
- $("#down").css('opacity', 0);
- }
+ this.displayLoader();
+ this.loader.preloadPagesBeforeTransition(turning.end, function () {
+ $this.loader.setContentsInDoublePage(doublePage, turning.end, true, function () {
+ $this.beforeTransition(pageNr, 2);
+ $("#currentDoublePage").addClass('axis_' + $this.transitionAxis).addClass('_2d').addClass(turning.currentToClass);
+ $(doublePage).removeClass(turning.nextFromClass).one($this.support.getTransitionEndEvent(), function () {
+ fb('received event');
+ if ($this.transitionning == false) {
+ return;
+ }
+ $("#currentDoublePage").remove();
+ $("#nextDoublePage").attr('id', 'currentDoublePage');
+ $this.afterTransition(pageNr);
+ });
+ });
+ });
+ },
+ pageTransition1D: function (pageNr) {
+ var page = pageNr;
+ var doublePage = $("#currentDoublePage");
+ var $this = this;
+ if (this.displayOnePage) {
+ this.hidePage('right');
+ }
+ var turning = this.getTurningPages(pageNr);
+ this.beforeTransition(pageNr);
+ this.loader.setContentsInDoublePage(doublePage, turning.end, true, function () {
+ $this.afterTransition(page);
+ });
+ },
+ beforeTransition: function (page, d) {
+ if (d == undefined) {
+ d = 1;
+ }
+ $(".axis_y").removeClass('axis_y');
+ $(".axis_x").removeClass('axis_x');
+ $("#links").hide();
+ this.hideLoader();
+ this.hideUnnecessaryButtons(page);
+ var animationDuration = d <= 1 ? 0 : parseFloat(this.datas.mobileTransitionDuration);
+ this.updateShadows(page, animationDuration);
+ fb('beforeTransition ' + page);
+ },
+ afterTransition: function (page) {
+ if (this.transitionning === false) {
+ //return;
+ }
+ fb('afterTransition ' + page);
+ var $this = this;
+ this.currentPage = page;
+ this.setPageNumbers();
+ setTimeout(function () {
+ $this.loader.preloadAround(page);
+ }, 1000);
+ this.initLinks();
+ this.hideLoader();
+ this.resetWaiters();
+ // Clean messy stuffs
+ $("#pages").removeClass('_3dtransition');
+ if ($("#nextDoublePage").length > 0) {
+ $("#currentDoublePage").remove();
+ $("#nextDoublePage").attr('id', 'currentDoublePage');
+ }
+ if ($("#currentDoublePage").length > 1) {
+ $("#currentDoublePage:gt(0)").remove();
+ }
+ this.transitionning = false;
+ if (this.pad.enabled) {
+ if (this.currentPage == this.datas.pages) {
+ $("#down").css('opacity', 0);
+ } else {
+ $("#down").css('opacity', 1);
+ if (!this.bookmarks.hasNextPageInGroup(this.currentPage)) {
+ $("#down").addClass('right');
+ } else {
+ $("#down").removeClass('right');
+ }
+ }
+ } else {
+ $("#down").css('opacity', 0);
+ }
- },
- setPageNumbers: function () {
- $("#pagesnumbers .left").html(this.getPageNumberOfSide('left'));
- $("#pagesnumbers .right").html(this.getPageNumberOfSide('right'));
- },
- getPageNumberOfSide: function (side) {
- var p = $("#currentDoublePage").find('.' + side);
- if (p.length == 0) {
- return '';
- }
- return this.physicalToVirtual($(p).data('page'));
- },
- clickLogo: function () {
- if (this.datas.url_link == '' || this.datas.url_link == 'http://') {
- return;
- }
- this.wopen(this.datas.url_link, '_blank');
- },
- viewMode: function () {
- return $("#view .mview").length > 0;
- },
- openView: function (view, param1, param2, callback) {
- var $this = this;
- this.displayLoader();
- this.resetWaiters();
- setTimeout(function () {
- $this._openView(view, param1, param2, callback);
- }, 20);
- },
- addWaiter: function (reset) {
- if (reset == undefined) {
- reset = false;
- }
- if (reset) {
- this.resetWaiters();
- }
- var rand = Math.round(Math.random() * 100000);
- this.waiters.push(rand);
- return rand;
- },
- waiterActive: function (id) {
- return this.waiters.indexOf(id) > -1;
- },
- resetWaiters: function () {
- this.waiters = [];
- },
- _openView: function (view, param1, param2, callback) {
- var $this = this;
- var preload = {index: 'thumbnails',
- search: 'thumbnails',
- bookmark: 'thumbnails',
- video: 'extras'};
- if (!OFFLINEAPP && this.gal != null && preload[view] != undefined) {
- var w = this.addWaiter(true);
- this.gal.downloadAndCall(preload[view], function () {
- if ($this.waiterActive(w)) {
- $this.__openView(view, param1, param2, callback);
- }
- });
- } else {
- this.__openView(view, param1, param2, callback);
- }
- },
- __openView: function (view, param1, param2, callback) {
- var $this = this;
- var camelView = view.charAt(0).toUpperCase() + view.substr(1);
- var cb = function () {
- $this.openingView(callback);
- };
- if (view == 'index') {
- this.openIndex(this.l10n.__('overview'), undefined, true, cb);
- } else if (view == 'search') {
- this.searchString = param1;
- var group = param2;
- $("#q").val(param1);
- this.search.find(param1, function (r) {
- $this.displayResults(r, group, cb);
- });
- if (group == undefined) {
- this.stats.track(1, 0, param1);
- }
- } else if (view == 'video') {
- this.openVideo(param1, cb);
- } else if (view == 'audio') {
- this.openAudio(param1, cb);
- } else if (view == 'webvideo') {
- this.openWebVideo(param1, param2, cb);
- } else if (view == 'multimedia') {
- this.openMultimedia(param1, cb);
- } else if (view == 'chapters') {
- this.openChapters(cb);
- } else if (view == 'archives') {
- this.openArchives($("#nav #archives").data('tooltip'), cb);
- } else {
- this['open' + camelView](param1, param2, cb);
- }
- },
- openingView: function (callback) {
- var $this = this;
- this.resize.resizeView();
- this.tooltip.hideTooltip();
- var mview = $('#view .mview:last');
- if (this.support.transitions2d) {
- var vertFrom = {
- translateY: $(window).height() + 'px'
- };
- var vertTo = {
- translateY: '0px'
- };
- var horiFrom = {
- translateX: $(window).width() + 'px'
- };
- var horiTo = {
- translateX: '0px'
- };
- var from = vertFrom;
- var to = vertTo;
- if ($(mview).hasClass('hori')) {
- from = horiFrom;
- to = horiTo;
- }
+ },
+ setPageNumbers: function () {
+ $("#pagesnumbers .left").html(this.getPageNumberOfSide('left'));
+ $("#pagesnumbers .right").html(this.getPageNumberOfSide('right'));
+ },
+ getPageNumberOfSide: function (side) {
+ var p = $("#currentDoublePage").find('.' + side);
+ if (p.length == 0) {
+ return '';
+ }
+ return this.physicalToVirtual($(p).data('page'));
+ },
+ clickLogo: function () {
+ if (this.datas.url_link == '' || this.datas.url_link == 'http://') {
+ return;
+ }
+ this.wopen(this.datas.url_link, '_blank');
+ },
+ viewMode: function () {
+ return $("#view .mview").length > 0;
+ },
+ openView: function (view, param1, param2, callback) {
+ var $this = this;
+ this.displayLoader();
+ this.resetWaiters();
+ setTimeout(function () {
+ $this._openView(view, param1, param2, callback);
+ }, 20);
+ },
+ addWaiter: function (reset) {
+ if (reset == undefined) {
+ reset = false;
+ }
+ if (reset) {
+ this.resetWaiters();
+ }
+ var rand = Math.round(Math.random() * 100000);
+ this.waiters.push(rand);
+ return rand;
+ },
+ waiterActive: function (id) {
+ return this.waiters.indexOf(id) > -1;
+ },
+ resetWaiters: function () {
+ this.waiters = [];
+ },
+ _openView: function (view, param1, param2, callback) {
+ var $this = this;
+ var preload = {
+ index: 'thumbnails',
+ search: 'thumbnails',
+ bookmark: 'thumbnails',
+ video: 'extras'
+ };
+ if (!OFFLINEAPP && this.gal != null && preload[view] != undefined) {
+ var w = this.addWaiter(true);
+ this.gal.downloadAndCall(preload[view], function () {
+ if ($this.waiterActive(w)) {
+ $this.__openView(view, param1, param2, callback);
+ }
+ });
+ } else {
+ this.__openView(view, param1, param2, callback);
+ }
+ },
+ __openView: function (view, param1, param2, callback) {
+ var $this = this;
+ var camelView = view.charAt(0).toUpperCase() + view.substr(1);
+ var cb = function () {
+ $this.openingView(callback);
+ };
+ if (view == 'index') {
+ this.openIndex(this.l10n.__('overview'), undefined, true, cb);
+ } else if (view == 'search') {
+ this.searchString = param1;
+ var group = param2;
+ $("#q").val(param1);
+ this.search.find(param1, function (r) {
+ $this.displayResults(r, group, cb);
+ });
+ if (group == undefined) {
+ this.stats.track(1, 0, param1);
+ }
+ } else if (view == 'video') {
+ this.openVideo(param1, cb);
+ } else if (view == 'audio') {
+ this.openAudio(param1, cb);
+ } else if (view == 'webvideo') {
+ this.openWebVideo(param1, param2, cb);
+ } else if (view == 'multimedia') {
+ this.openMultimedia(param1, cb);
+ } else if (view == 'chapters') {
+ this.openChapters(cb);
+ } else if (view == 'archives') {
+ this.openArchives($("#nav #archives").data('tooltip'), cb);
+ } else {
+ this['open' + camelView](param1, param2, cb);
+ }
+ },
+ openingView: function (callback) {
+ var $this = this;
+ this.resize.resizeView();
+ this.tooltip.hideTooltip();
+ var mview = $('#view .mview:last');
+ if (this.support.transitions2d) {
+ var vertFrom = {
+ translateY: $(window).height() + 'px'
+ };
+ var vertTo = {
+ translateY: '0px'
+ };
+ var horiFrom = {
+ translateX: $(window).width() + 'px'
+ };
+ var horiTo = {
+ translateX: '0px'
+ };
+ var from = vertFrom;
+ var to = vertTo;
+ if ($(mview).hasClass('hori')) {
+ from = horiFrom;
+ to = horiTo;
+ }
- $(mview).show().removeClass('animate').transform(from);
- setTimeout(function () {
- $(mview).one($this.support.getTransitionEndEvent(), function () {
- $("#main").hide();
- $('body').addClass('view');
- $(mview).removeClass('animate');
- callback();
- $this.hideLoader();
- resize();
- }).addClass('animate').transform(to);
- }, 50);
- } else {
- $("#main").hide();
- $('body').addClass('view');
- $(mview).show();
- callback();
- this.hideLoader();
- resize();
- }
- },
- displayResults: function (data, group, callback) {
- var $this = this;
- var results = data.results;
- var hideNoResults = !this.datas.searchShowNoResultsPages;
- if (data.total <= 0) {
- alert(this.l10n.__('no result found'));
- window.location = "#/page/" + this.currentPage;
- return;
- }
+ $(mview).show().removeClass('animate').transform(from);
+ setTimeout(function () {
+ $(mview).one($this.support.getTransitionEndEvent(), function () {
+ $("#main").hide();
+ $('body').addClass('view');
+ $(mview).removeClass('animate');
+ callback();
+ $this.hideLoader();
+ resize();
+ }).addClass('animate').transform(to);
+ }, 50);
+ } else {
+ $("#main").hide();
+ $('body').addClass('view');
+ $(mview).show();
+ callback();
+ this.hideLoader();
+ resize();
+ }
+ },
+ displayResults: function (data, group, callback) {
+ var $this = this;
+ var results = data.results;
+ var hideNoResults = !this.datas.searchShowNoResultsPages;
+ if (data.total <= 0) {
+ alert(this.l10n.__('no result found'));
+ window.location = "#/page/" + this.currentPage;
+ return;
+ }
- this.openIndex(this.l10n.__('search results for') + ' « ' + this.searchString + " »", group, false, function () {
- var hits = [];
- for (var i = 0; i <= $this.datas.pages; i++) {
- hits[i] = 0;
- }
+ this.openIndex(this.l10n.__('search results for') + ' « ' + this.searchString + " »", group, false, function () {
+ var hits = [];
+ for (var i = 0; i <= $this.datas.pages; i++) {
+ hits[i] = 0;
+ }
- $.each(results, function (k, v) {
- hits[k] += v;
- });
- var e = encodeURIComponent($this.searchString);
- $(".doubleThumb").each(function () {
- var pages = $(this).data('pages').toString().split(',');
- var hitsp = 0;
- var pagesWithHits = [];
- for (var i in pages) {
- var n = parseInt(pages[i]);
- if (hits[n] > 0) {
- hitsp += hits[n];
- pagesWithHits.push(pages[i]);
- }
- }
+ $.each(results, function (k, v) {
+ hits[k] += v;
+ });
+ var e = encodeURIComponent($this.searchString);
+ $(".doubleThumb").each(function () {
+ var pages = $(this).data('pages').toString().split(',');
+ var hitsp = 0;
+ var pagesWithHits = [];
+ for (var i in pages) {
+ var n = parseInt(pages[i]);
+ if (hits[n] > 0) {
+ hitsp += hits[n];
+ pagesWithHits.push(pages[i]);
+ }
+ }
- if ($(this))
- if ($(this).find('.hits').length > 0) {
- return;
- }
+ if ($(this))
+ if ($(this).find('.hits').length > 0) {
+ return;
+ }
- if (hitsp == 0) {
- if (hideNoResults) {
- $(this).remove();
- return;
- }
- $(this).append('<div class="overlay"></div>');
- $(this).append('<div class="hits no">' + $this.l10n.__('no result found') + '</div>');
- } else {
- $(this).append('<div class="hits yes">' + hitsp + ' ' + $this.l10n.__('hit(s)') + '</div>');
- if ($this.pad.enabled) {
- if (pagesWithHits.length == 1) {
- $(this).find('a').attr('href', '#/page/' + pagesWithHits[0]);
- } else {
- $(this).find('a').attr('href', '#/search/' + e + '/' + $(this).attr('page'));
- }
- } else {
- $(this).find('a').attr('href', '#/page/' + $(this).attr('page'));
- }
- }
- });
- $this.termsToHighlight = data.terms;
- if (callback != undefined) {
- callback();
- }
- });
- },
- openMultimedia: function (multimedia, callback) {
- var a = $('a[href="#/multimedia/' + multimedia + '"]');
- var markup = decodeURIComponent($(a).attr('data-multimedia'));
- var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a></div>';
- view += '<div class="content">';
- view += markup;
- view += '</div>';
- $("#view").append('<div class="mview">' + view + '</div>');
- if (callback != undefined) {
- callback();
- }
- },
- openVideo: function (video, callback) {
- var a = $('a[href="#/video/' + video + '"]');
- var markup = decodeURIComponent($(a).attr('data-video'));
- var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a></div>';
- view += '<div class="content">';
- view += markup;
- view += '</div>';
- $("#view").append('<div class="mview">' + view + '</div>');
- this.stats.track(11);
- this.initVideos();
- var $this = this;
- var times = [250, 500, 750, 1000, 1250];
- $.each(times, function (k, v) {
- setTimeout(function () {
- $this.resize.resizePopupVideos();
- }, v);
- });
- if (callback != undefined) {
- callback();
- }
- },
- openAudio: function (audio, callback) {
- var a = $('a[href="#/audio/' + audio + '"]');
- var markup = decodeURIComponent($(a).attr('data-audio'));
- var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a></div>';
- view += '<div class="content">';
- view += markup;
- view += '</div>';
- $("#view").append('<div class="mview">' + view + '</div>');
- this.stats.track(11);
- var $this = this;
- var times = [250, 500, 750, 1000, 1250];
- $.each(times, function (k, v) {
- setTimeout(function () {
- $this.resize.resizePopupAudios();
- }, v);
- });
- if (callback != undefined) {
- callback();
- }
- },
- openWebVideo: function (service, video, callback) {
+ if (hitsp == 0) {
+ if (hideNoResults) {
+ $(this).remove();
+ return;
+ }
+ $(this).append('<div class="overlay"></div>');
+ $(this).append('<div class="hits no">' + $this.l10n.__('no result found') + '</div>');
+ } else {
+ $(this).append('<div class="hits yes">' + hitsp + ' ' + $this.l10n.__('hit(s)') + '</div>');
+ if ($this.pad.enabled) {
+ if (pagesWithHits.length == 1) {
+ $(this).find('a').attr('href', '#/page/' + pagesWithHits[0]);
+ } else {
+ $(this).find('a').attr('href', '#/search/' + e + '/' + $(this).attr('page'));
+ }
+ } else {
+ $(this).find('a').attr('href', '#/page/' + $(this).attr('page'));
+ }
+ }
+ });
+ $this.termsToHighlight = data.terms;
+ if (callback != undefined) {
+ callback();
+ }
+ });
+ },
+ openMultimedia: function (multimedia, callback) {
+ var a = $('a[href="#/multimedia/' + multimedia + '"]');
+ var markup = decodeURIComponent($(a).attr('data-multimedia'));
+ var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a></div>';
+ view += '<div class="content"><div class="multimediaScale">';
+ view += markup;
+ view += '</div></div>';
+ $("#view").append('<div class="mview">' + view + '</div>');
+ if (callback != undefined) {
+ callback();
+ }
+ },
+ openVideo: function (video, callback) {
+ var a = $('a[href="#/video/' + video + '"]');
+ var markup = decodeURIComponent($(a).attr('data-video'));
+ var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a></div>';
+ view += '<div class="content">';
+ view += markup;
+ view += '</div>';
+ $("#view").append('<div class="mview">' + view + '</div>');
+ this.stats.track(11);
+ this.initVideos();
+ var $this = this;
+ var times = [250, 500, 750, 1000, 1250];
+ $.each(times, function (k, v) {
+ setTimeout(function () {
+ $this.resize.resizePopupVideos();
+ }, v);
+ });
+ if (callback != undefined) {
+ callback();
+ }
+ },
+ openAudio: function (audio, callback) {
+ var a = $('a[href="#/audio/' + audio + '"]');
+ var markup = decodeURIComponent($(a).attr('data-audio'));
+ var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a></div>';
+ view += '<div class="content">';
+ view += markup;
+ view += '</div>';
+ $("#view").append('<div class="mview">' + view + '</div>');
+ this.stats.track(11);
+ var $this = this;
+ var times = [250, 500, 750, 1000, 1250];
+ $.each(times, function (k, v) {
+ setTimeout(function () {
+ $this.resize.resizePopupAudios();
+ }, v);
+ });
+ if (callback != undefined) {
+ callback();
+ }
+ },
+ openWebVideo: function (service, video, callback) {
- var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a></div>';
- view += '<div class="content">';
- if (service == 'youtube') {
- view += '<iframe class="webvideo" type="text/html" width="100%" height="407" src="http://www.youtube.com/embed/' + video + '?autoplay=1&modestbranding=1&rel=0&html5=1" frameborder="0"></iframe>';
- } else if (service == 'dailymotion') {
- view += '<iframe class="webvideo" type="text/html" width="100%" height="407" src="http://www.dailymotion.com/embed/video/' + video + '?autoplay=1&logo=0&related=0&html5=1" width="100%" frameborder="0"></iframe>'
- }
- view += '</div>';
- $("#view").append('<div class="mview">' + view + '</div>');
- $("#view .mview:last iframe").each(function () {
- $(this).attr('height', ($(this).width() * 9) / 16);
- });
- this.stats.track(11);
- if (callback != undefined) {
- callback();
- }
- },
- openLocales: function (p1, p2, callback) {
- var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a><h2>Select language</h2></div>';
- view += '<div class="content">';
- view += '<ul class="chapters localesList">';
- var $this = this;
- $.each(this.l10n.multilang, function (k, v) {
- var url = v.url;
- if (url.substr(0, 3) == '../' && !$this.datas.standalone) {
- url = '../' + url;
- }
- /*'datas' => array(__('Langue') => 'lang',
- __('Langue') . ' (' . __('Pays') . ')' => 'lang_country',
- __('Pays') . ' (' . __('Langue') . ')' => 'country_lang'));*/
+ var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a></div>';
+ view += '<div class="content">';
+ if (service == 'youtube') {
+ view += '<iframe class="webvideo" type="text/html" width="100%" height="407" src="http://www.youtube.com/embed/' + video + '?autoplay=1&modestbranding=1&rel=0&html5=1" frameborder="0"></iframe>';
+ } else if (service == 'dailymotion') {
+ view += '<iframe class="webvideo" type="text/html" width="100%" height="407" src="http://www.dailymotion.com/embed/video/' + video + '?autoplay=1&logo=0&related=0&html5=1" width="100%" frameborder="0"></iframe>'
+ }
+ view += '</div>';
+ $("#view").append('<div class="mview">' + view + '</div>');
+ $("#view .mview:last iframe").each(function () {
+ $(this).attr('height', ($(this).width() * 9) / 16);
+ });
+ this.stats.track(11);
+ if (callback != undefined) {
+ callback();
+ }
+ },
+ openLocales: function (p1, p2, callback) {
+ var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a><h2>Select language</h2></div>';
+ view += '<div class="content">';
+ view += '<ul class="chapters localesList">';
+ var $this = this;
+ $.each(this.l10n.multilang, function (k, v) {
+ var url = v.url;
+ if (url.substr(0, 3) == '../' && !$this.datas.standalone) {
+ url = '../' + url;
+ }
+ /*'datas' => array(__('Langue') => 'lang',
+ __('Langue') . ' (' . __('Pays') . ')' => 'lang_country',
+ __('Pays') . ' (' . __('Langue') . ')' => 'country_lang'));*/
- var name = '';
- if ($this.datas.multilangDisplay == 'lang') {
- name = v.langName;
- } else if ($this.datas.multilangDisplay == 'lang_country') {
- name = v.langName + ' (' + v.countryName + ')';
- } else if ($this.datas.multilangDisplay == 'country_lang') {
- name = v.countryName + ' (' + v.langName + ')';
- }
+ var name = '';
+ if ($this.datas.multilangDisplay == 'lang') {
+ name = v.langName;
+ } else if ($this.datas.multilangDisplay == 'lang_country') {
+ name = v.langName + ' (' + v.countryName + ')';
+ } else if ($this.datas.multilangDisplay == 'country_lang') {
+ name = v.countryName + ' (' + v.langName + ')';
+ }
- var c = '';
- if ($this.datas.phonegap) {
- view += '<li data-level="0"><a href="#" data-id="' + url + '" data-locale="' + v.lang + '" class="level0 appswitchlocale"><img src="images/flags/' + v.flag + '.png" alt="' + name + '" />' + name + '</a></li>';
- } else {
- view += '<li data-level="0"><a href="' + url + '" class="level0"><img src="images/flags/' + v.flag + '.png" alt="' + name + '" />' + name + '</a></li>';
- }
- });
- view += '</ul>';
- view += '</div>';
- $("#view").append('<div class="mview">' + view + '</div>');
- if (callback != undefined) {
- callback();
- }
- },
- openShare: function (p1, p2, callback) {
- var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a><h2>' + this.l10n.__('share') + '</h2></div>';
- view += '<div class="content">';
- view += '<ul class="chapters shareList">';
- var $this = this;
- if (this.datas.friend) {
- view += '<li data-level="0"><a href="#" data-service="email" class="share level0"><img height="25" src="data/images/share-email.svg" /> E-mail</a></li>';
- }
- if (this.datas.facebook) {
- view += '<li data-level="0"><a href="#" data-service="facebook" class="share level0"><img height="25" src="data/images/share-facebook.svg" /> Facebook</a></li>';
- }
- if (this.datas.twitter) {
- view += '<li data-level="0"><a href="#" data-service="twitter" class="share level0"><img height="25" src="data/images/share-twitter.svg" /> Twitter</a></li>';
- }
- if (this.datas.googleplus) {
- view += '<li data-level="0"><a href="#" data-service="googleplus" class="share level0"><img height="25" src="data/images/share-googleplus.svg" /> Google+</a></li>';
- }
- if (this.datas.linkedin) {
- view += '<li data-level="0"><a href="#" data-service="linkedin" class="share level0"><img height="25" src="data/images/share-linkedin.svg" /> LinkedIn</a></li>';
- }
- if (this.datas.viadeo) {
- view += '<li data-level="0"><a href="#" data-service="viadeo" class="share level0"><img height="25" src="data/images/share-viadeo.svg" /> Viadeo</a></li>';
- }
- view += '</ul>';
- view += '</div>';
- $("#view").append('<div class="mview">' + view + '</div>');
- if (callback != undefined) {
- callback();
- }
- },
- openBookmark: function (p1, p2, callback) {
- var view = this.bookmarks.getView();
- if (view !== false) {
- $("#view").append('<div class="mview">' + view + '</div>');
- if (callback != undefined) {
- callback();
- }
- } else {
- var message = this.l10n.__("you don't have any bookmarks");
- if (this.datas.phonegap) {
- navigator.notification.alert(message, function () {
+ var c = '';
+ if ($this.datas.phonegap) {
+ view += '<li data-level="0"><a href="#" data-id="' + url + '" data-locale="' + v.lang + '" class="level0 appswitchlocale"><img src="images/flags/' + v.flag + '.png" alt="' + name + '" />' + name + '</a></li>';
+ } else {
+ view += '<li data-level="0"><a href="' + url + '" class="level0"><img src="images/flags/' + v.flag + '.png" alt="' + name + '" />' + name + '</a></li>';
+ }
+ });
+ view += '</ul>';
+ view += '</div>';
+ $("#view").append('<div class="mview">' + view + '</div>');
+ if (callback != undefined) {
+ callback();
+ }
+ },
+ openShare: function (p1, p2, callback) {
+ var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a><h2>' + this.l10n.__('share') + '</h2></div>';
+ view += '<div class="content">';
+ view += '<ul class="chapters shareList">';
+ var $this = this;
+ if (this.datas.friend) {
+ view += '<li data-level="0"><a href="#" data-service="email" class="share level0"><img height="25" src="data/images/share-email.svg" /> E-mail</a></li>';
+ }
+ if (this.datas.facebook) {
+ view += '<li data-level="0"><a href="#" data-service="facebook" class="share level0"><img height="25" src="data/images/share-facebook.svg" /> Facebook</a></li>';
+ }
+ if (this.datas.twitter) {
+ view += '<li data-level="0"><a href="#" data-service="twitter" class="share level0"><img height="25" src="data/images/share-twitter.svg" /> Twitter</a></li>';
+ }
+ if (this.datas.googleplus) {
+ view += '<li data-level="0"><a href="#" data-service="googleplus" class="share level0"><img height="25" src="data/images/share-googleplus.svg" /> Google+</a></li>';
+ }
+ if (this.datas.linkedin) {
+ view += '<li data-level="0"><a href="#" data-service="linkedin" class="share level0"><img height="25" src="data/images/share-linkedin.svg" /> LinkedIn</a></li>';
+ }
+ if (this.datas.viadeo) {
+ view += '<li data-level="0"><a href="#" data-service="viadeo" class="share level0"><img height="25" src="data/images/share-viadeo.svg" /> Viadeo</a></li>';
+ }
+ view += '</ul>';
+ view += '</div>';
+ $("#view").append('<div class="mview">' + view + '</div>');
+ if (callback != undefined) {
+ callback();
+ }
+ },
+ openBookmark: function (p1, p2, callback) {
+ var view = this.bookmarks.getView();
+ if (view !== false) {
+ $("#view").append('<div class="mview">' + view + '</div>');
+ if (callback != undefined) {
+ callback();
+ }
+ } else {
+ var message = this.l10n.__("you don't have any bookmarks");
+ if (this.datas.phonegap) {
+ navigator.notification.alert(message, function () {
- }, this.l10n.__('bookmarks'));
- } else {
- window.alert(message);
- window.history.back();
- }
- this.hideLoader();
- }
- },
- openChapters: function (callback) {
- if (this.chapters == undefined) {
- this.chapters = new FluidbookChapters(this, this.datas.chapters);
- }
+ }, this.l10n.__('bookmarks'));
+ } else {
+ window.alert(message);
+ window.history.back();
+ }
+ this.hideLoader();
+ }
+ },
+ openChapters: function (callback) {
+ if (this.chapters == undefined) {
+ this.chapters = new FluidbookChapters(this, this.datas.chapters);
+ }
- var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a><h2>' + this.l10n.__('chapters') + '</h2></div>';
- view += '<div class="content">';
- view += this.chapters.getView();
- view += '</div>';
- $("#view").append('<div class="mview">' + view + '</div>');
- if (callback != undefined) {
- callback();
- }
- },
- openIndex: function (title, group, closeAll, callback) {
- var c = !closeAll ? ' one' : '';
- var index = '<div class="caption"><a href="#" class="back' + c + '">' + this.l10n.__('back') + '</a><h2>' + title + '</h2></div>';
- index += this.index.getView(group);
- $("#view").append('<div class="mview">' + index + '</div>');
- this.bookmarks.updateBookmarks();
- if (callback != undefined) {
- callback();
- }
- },
- openArchives: function (title, callback) {
- var archives = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a><h2>' + title + '</h2></div>';
- archives += '<div class="image" id="archivesview"><img src="data/images/' + this.datas.externalArchives + '" /><div class="links">' + this.datas.links.archives + '</div></div>';
- $("#view").append('<div class="mview archives">' + archives + '</div>');
- if (callback != undefined) {
- callback();
- }
- },
- physicalToVirtual: function (page) {
- return this.datas.numerotation[page - 1];
- },
- virtualToPhysical: function (page) {
- return this.datas.numerotation.indexOf(page) + 1;
- },
- closeView: function (callback, all, animate) {
- var $this = this;
- if (all == undefined) {
- all = false;
- }
- if (animate == undefined) {
- animate = true;
- }
+ var view = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a><h2>' + this.l10n.__('chapters') + '</h2></div>';
+ view += '<div class="content">';
+ view += this.chapters.getView();
+ view += '</div>';
+ $("#view").append('<div class="mview">' + view + '</div>');
+ if (callback != undefined) {
+ callback();
+ }
+ },
+ openIndex: function (title, group, closeAll, callback) {
+ var c = !closeAll ? ' one' : '';
+ var index = '<div class="caption"><a href="#" class="back' + c + '">' + this.l10n.__('back') + '</a><h2>' + title + '</h2></div>';
+ index += this.index.getView(group);
+ $("#view").append('<div class="mview">' + index + '</div>');
+ this.bookmarks.updateBookmarks();
+ if (callback != undefined) {
+ callback();
+ }
+ },
+ openArchives: function (title, callback) {
+ var archives = '<div class="caption"><a href="#" class="back">' + this.l10n.__('back') + '</a><h2>' + title + '</h2></div>';
+ archives += '<div class="image" id="archivesview"><img src="data/images/' + this.datas.externalArchives + '" /><div class="links">' + this.datas.links.archives + '</div></div>';
+ $("#view").append('<div class="mview archives">' + archives + '</div>');
+ if (callback != undefined) {
+ callback();
+ }
+ },
+ physicalToVirtual: function (page) {
+ return this.datas.numerotation[page - 1];
+ },
+ virtualToPhysical: function (page) {
+ return this.datas.numerotation.indexOf(page) + 1;
+ },
+ closeView: function (callback, all, animate) {
+ var $this = this;
+ if (all == undefined) {
+ all = false;
+ }
+ if (animate == undefined) {
+ animate = true;
+ }
- $('video').each(function () {
- this.pause();
- });
+ $('video').each(function () {
+ this.pause();
+ });
- if ($('.mview').scrollTop() > 0) {
- $('.mview').scrollTo(0, 500, function () {
- $this.closeView(callback, all, animate);
- });
- return;
- }
+ if ($('.mview').scrollTop() > 0) {
+ $('.mview').scrollTo(0, 500, function () {
+ $this.closeView(callback, all, animate);
+ });
+ return;
+ }
- all = all || ($("#view .mview").length <= 1);
- if (!this.viewMode()) {
- callback();
- return;
- }
+ all = all || ($("#view .mview").length <= 1);
+ if (!this.viewMode()) {
+ callback();
+ return;
+ }
- this.video.pauseAllVideos();
+ this.video.pauseAllVideos();
- var mview = $("#view .mview:last");
- if (all) {
- var s = $("#view .mview:not(:last)");
- this.video.killVideosIn(s);
- $(s).remove();
- }
+ var mview = $("#view .mview:last");
+ if (all) {
+ var s = $("#view .mview:not(:last)");
+ this.video.killVideosIn(s);
+ $(s).remove();
+ }
- var to = {
- translateY: $(window).height() + 'px'
- };
- if ($(mview).hasClass('hori')) {
- to = {translateX: $(window).width() + 'px'}
- }
+ var to = {
+ translateY: $(window).height() + 'px'
+ };
+ if ($(mview).hasClass('hori')) {
+ to = {translateX: $(window).width() + 'px'}
+ }
- if (animate && this.support.transitions2d) {
- setTimeout(function () {
- $(mview).one($this.support.getTransitionEndEvent(), function () {
- $this.video.killVideosIn(this);
- $(this).remove();
- callback();
- }).addClass('animate').transform(to);
- }, 50);
- } else {
- this.video.killVideosIn(mview);
- $(mview).remove()
- callback();
- }
- if (all) {
- $("#main").show();
- $('body').removeClass('view');
- }
- resize();
- },
- getSearchHints: function (q) {
+ if (animate && this.support.transitions2d) {
+ setTimeout(function () {
+ $(mview).one($this.support.getTransitionEndEvent(), function () {
+ $this.video.killVideosIn(this);
+ $(this).remove();
+ callback();
+ }).addClass('animate').transform(to);
+ }, 50);
+ } else {
+ this.video.killVideosIn(mview);
+ $(mview).remove()
+ callback();
+ }
+ if (all) {
+ $("#main").show();
+ $('body').removeClass('view');
+ }
+ resize();
+ },
+ getSearchHints: function (q) {
- var $this = this;
- this.killLastSearchHint();
- this.search.getHints(q, function (r) {
- $this.displaySearchHints(r);
- });
- },
- displaySearchHints: function (hints) {
+ var $this = this;
+ this.killLastSearchHint();
+ this.search.getHints(q, function (r) {
+ $this.displaySearchHints(r);
+ });
+ },
+ displaySearchHints: function (hints) {
- this.hideSearchHints();
- if (hints.length == 0) {
- return;
- }
- $.each(hints, function (k, v) {
- $("#searchHints").append('<a class="hint" term="' + v[0] + '" href="#/search/' + v[0] + '">' + v[0] + ' <em>(' + v[1] + ')</em></a>');
- });
- var qoffset = $("#q").offset();
- var top = qoffset.top + $("#q").outerHeight() + 5;
- var left = qoffset.left;
- if (this.l10n.dir == 'rtl') {
- left = -1 * ($(window).width() - left - $("#q").outerWidth());
- }
- $("#searchHints").css({top: top, left: left}).show();
- },
- killLastSearchHint: function () {
- this.search.kill();
- },
- hideSearchHints: function () {
- this.killLastSearchHint();
- $("#searchHints").html('');
- $("#searchHints").hide();
- },
- getLocationToShare: function () {
- if (this.datas.phonegap) {
- return this.datas.offlineLink;
- } else {
- var l = window.location.toString();
- var e = l.split("#");
- return e[0];
- }
- },
- sendEmail: function () {
- window.location = 'mailto:?subject=' + this.datas.title + '&body=' + this.datas.title + ' : ' + this.getLocationToShare();
- this.stats.track(5);
- },
- sendTwitter: function () {
- this.service.open('twitterShare', {
- url: this.getLocationToShare(),
- post: this.datas.twitter_description.replace('%title%', this.datas.title)
- });
- this.stats.track(13);
- },
- sendFacebook: function () {
- this.service.open('facebookShare', {
- url: this.getLocationToShare()
- });
- this.stats.track(12);
- },
- sendGoogleplus: function () {
- this.service.open('googleplusShare', {
- url: this.getLocationToShare()
- });
- this.stats.track(12);
- },
- sendLinkedin: function () {
- this.service.open('linkedinShare', {
- url: this.getLocationToShare()
- });
- this.stats.track(12);
- },
- sendViadeo: function () {
- this.service.open('viadeoShare', {
- url: this.getLocationToShare()
- });
- this.stats.track(12);
- },
- print: function () {
- var $this = this;
- var pdf;
- var pdfName;
- if (this.datas.pdfName.substr(0, 4) == 'http') {
- pdf = this.datas.pdfName;
- } else {
- pdf = getBaseURL() + '/data/' + this.datas.pdfName;
- }
- var e = pdf.split('/');
- pdfName = e.pop();
- if (this.gal && !OFFLINEAPP) {
- this.displayLoader();
- this.gal.downloadAndCall('extras', function () {
- $this._openFile(pdf, $("#print"), 'pdf', pdfName);
- });
- } else {
- this._openFile(pdf, $("#print"), 'pdf', pdfName);
- }
- },
- _openFile: function (url, e, type, localname) {
+ this.hideSearchHints();
+ if (hints.length == 0) {
+ return;
+ }
+ $.each(hints, function (k, v) {
+ $("#searchHints").append('<a class="hint" term="' + v[0] + '" href="#/search/' + v[0] + '">' + v[0] + ' <em>(' + v[1] + ')</em></a>');
+ });
+ var qoffset = $("#q").offset();
+ var top = qoffset.top + $("#q").outerHeight() + 5;
+ var left = qoffset.left;
+ if (this.l10n.dir == 'rtl') {
+ left = -1 * ($(window).width() - left - $("#q").outerWidth());
+ }
+ $("#searchHints").css({top: top, left: left}).show();
+ },
+ killLastSearchHint: function () {
+ this.search.kill();
+ },
+ hideSearchHints: function () {
+ this.killLastSearchHint();
+ $("#searchHints").html('');
+ $("#searchHints").hide();
+ },
+ getLocationToShare: function () {
+ if (this.datas.phonegap) {
+ return this.datas.offlineLink;
+ } else {
+ var l = window.location.toString();
+ var e = l.split("#");
+ return e[0];
+ }
+ },
+ sendEmail: function () {
+ window.location = 'mailto:?subject=' + this.datas.title + '&body=' + this.datas.title + ' : ' + this.getLocationToShare();
+ this.stats.track(5);
+ },
+ sendTwitter: function () {
+ this.service.open('twitterShare', {
+ url: this.getLocationToShare(),
+ post: this.datas.twitter_description.replace('%title%', this.datas.title)
+ });
+ this.stats.track(13);
+ },
+ sendFacebook: function () {
+ this.service.open('facebookShare', {
+ url: this.getLocationToShare()
+ });
+ this.stats.track(12);
+ },
+ sendGoogleplus: function () {
+ this.service.open('googleplusShare', {
+ url: this.getLocationToShare()
+ });
+ this.stats.track(12);
+ },
+ sendLinkedin: function () {
+ this.service.open('linkedinShare', {
+ url: this.getLocationToShare()
+ });
+ this.stats.track(12);
+ },
+ sendViadeo: function () {
+ this.service.open('viadeoShare', {
+ url: this.getLocationToShare()
+ });
+ this.stats.track(12);
+ },
+ print: function () {
+ var $this = this;
+ var pdf;
+ var pdfName;
+ if (this.datas.pdfName.substr(0, 4) == 'http') {
+ pdf = this.datas.pdfName;
+ } else {
+ pdf = getBaseURL() + '/data/' + this.datas.pdfName;
+ }
+ var e = pdf.split('/');
+ pdfName = e.pop();
+ if (this.gal && !OFFLINEAPP) {
+ this.displayLoader();
+ this.gal.downloadAndCall('extras', function () {
+ $this._openFile(pdf, $("#print"), 'pdf', pdfName);
+ });
+ } else {
+ this._openFile(pdf, $("#print"), 'pdf', pdfName);
+ }
+ },
+ _openFile: function (url, e, type, localname) {
- var $this = this;
- if (this.datas.phonegap != false) {
- if (type == undefined) {
- var e = url.split('.');
- type = e.pop();
- }
+ var $this = this;
+ if (this.datas.phonegap != false) {
+ if (type == undefined) {
+ var e = url.split('.');
+ type = e.pop();
+ }
- if (url.indexOf('http') == 0) {
- return this._downloadFilePhonegap(url, localname, LocalFileSystem.TEMPORARY, this._openFilePhonegap, [url, e, type]);
- } else {
- if (this._openFilePhonegap(url, e, type)) {
- return;
- }
- }
+ if (url.indexOf('http') == 0) {
+ return this._downloadFilePhonegap(url, localname, LocalFileSystem.TEMPORARY, this._openFilePhonegap, [url, e, type]);
+ } else {
+ if (this._openFilePhonegap(url, e, type)) {
+ return;
+ }
+ }
- }
- this.wopen(url, '_blank');
- },
- _downloadFilePhonegap: function (url, localname, fs, callback, callbackArgs) {
- var $this = this;
- if (fs == undefined) {
- fs = LocalFileSystem.PERSISTENT;
- }
+ }
+ this.wopen(url, '_blank');
+ },
+ _downloadFilePhonegap: function (url, localname, fs, callback, callbackArgs) {
+ var $this = this;
+ if (fs == undefined) {
+ fs = LocalFileSystem.PERSISTENT;
+ }
- window.requestFileSystem(fs, 0, function (fileSystem) {
- fileSystem.root.getFile("dummy.html", {create: true, exclusive: false}, function (fileEntry) {
- var filePath = fileEntry.fullPath.replace("dummy.html", "") + localname;
- var fileTransfer = new FileTransfer();
- var uri = encodeURI(url);
- fileTransfer.download(
- uri,
- filePath,
- function (entry) {
- if (callback != undefined) {
- if (callbackArgs == undefined) {
- callbackArgs = [];
- }
- callbackArgs[0] = entry.toURL();
- callback.apply($this, callbackArgs);
- }
- },
- function (error) {
+ window.requestFileSystem(fs, 0, function (fileSystem) {
+ fileSystem.root.getFile("dummy.html", {create: true, exclusive: false}, function (fileEntry) {
+ var filePath = fileEntry.fullPath.replace("dummy.html", "") + localname;
+ var fileTransfer = new FileTransfer();
+ var uri = encodeURI(url);
+ fileTransfer.download(
+ uri,
+ filePath,
+ function (entry) {
+ if (callback != undefined) {
+ if (callbackArgs == undefined) {
+ callbackArgs = [];
+ }
+ callbackArgs[0] = entry.toURL();
+ callback.apply($this, callbackArgs);
+ }
+ },
+ function (error) {
- }
- );
- });
- }, function () {
+ }
+ );
+ });
+ }, function () {
- });
- },
- _openFilePhonegap: function (url, e, type) {
- var $this = this;
- var types_ios = {pdf: 'com.adobe.pdf'};
- var types_android = {pdf: 'application/pdf'};
- if (this.datas.phonegap == 'ios') {
- this.displayLoader();
- if (types_ios[type] != undefined) {
- var offset = $(e).offset();
- offset.left += ($(e).width() / 2);
- offset.top += ($(e).height());
- try {
- ExternalFileUtil.openWith(url, types_ios[type], function () {
- $this.hideLoader();
- }, function () {
- $this.wopen(url, "_blank", 'location=no');
- $this.hideLoader();
- }, offset);
- } catch (err) {
- $this.wopen(url, "_blank", 'location=no');
- $this.hideLoader();
- }
- return true;
- }
- }
- if (this.datas.phonegap == 'android') {
- if (types_android[type] != undefined) {
- this.displayLoader();
- setTimeout(function () {
- CDV.WEBINTENT.startActivity({
- action: CDV.WEBINTENT.ACTION_VIEW,
- type: types_android[type],
- url: url
- }, function (args) {
- $this.hideLoader(5);
- }, function (args) {
- $this.hideLoader(5);
- });
- }, 100);
- }
- return true;
- }
- return false;
- },
- highlightSearchTerms: function (pageNr) {
- return;
- },
- touchOffset: function (offset) {
- offset *= $("#currentDoublePage").width();
- $("#currentDoublePage").addClass('sliding');
- $("#currentDoublePage").css({
- translateX: offset
- });
- },
- displayLoader: function () {
- this.coquillette.show();
- if (!this.support.isMobile) {
- $('body').addClass('loading');
- }
- },
- hideLoader: function (delay, force) {
- if (force == undefined) {
- force = false;
- }
- if (delay == undefined) {
- delay = 0;
- }
- var $this = this;
- if (delay == 0) {
- return this._hideLoader(force);
- }
- setTimeout(function () {
- $this._hideLoader(force);
- }, delay * 1000);
- },
- _hideLoader: function (force) {
- if (force == undefined) {
- force = false;
- }
- if (!force && $('#splash').css('visibility') == 'visible') {
- return;
- }
- if (this.support.isMobile) {
- this.coquillette.hide();
- } else {
- this.coquillette.hide();
- $('body').removeClass('loading');
- }
- },
- pollZoom: function () {
- var z = this.support.getZoomLevel();
- //console.log(z);
- $('html').attr('data-zoom', z);
- if (z <= 1) {
- $("html").removeClass('pan');
- } else {
- $("html").addClass('pan');
- }
- },
- intentShare: function (subject, body) {
- if (subject == undefined) {
- subject = this.datas.title;
- }
- if (body == undefined) {
- body = this.datas.title + ' : ' + this.getLocationToShare();
- }
+ });
+ },
+ _openFilePhonegap: function (url, e, type) {
+ var $this = this;
+ var types_ios = {pdf: 'com.adobe.pdf'};
+ var types_android = {pdf: 'application/pdf'};
+ if (this.datas.phonegap == 'ios') {
+ this.displayLoader();
+ if (types_ios[type] != undefined) {
+ var offset = $(e).offset();
+ offset.left += ($(e).width() / 2);
+ offset.top += ($(e).height());
+ try {
+ ExternalFileUtil.openWith(url, types_ios[type], function () {
+ $this.hideLoader();
+ }, function () {
+ $this.wopen(url, "_blank", 'location=no');
+ $this.hideLoader();
+ }, offset);
+ } catch (err) {
+ $this.wopen(url, "_blank", 'location=no');
+ $this.hideLoader();
+ }
+ return true;
+ }
+ }
+ if (this.datas.phonegap == 'android') {
+ if (types_android[type] != undefined) {
+ this.displayLoader();
+ setTimeout(function () {
+ CDV.WEBINTENT.startActivity({
+ action: CDV.WEBINTENT.ACTION_VIEW,
+ type: types_android[type],
+ url: url
+ }, function (args) {
+ $this.hideLoader(5);
+ }, function (args) {
+ $this.hideLoader(5);
+ });
+ }, 100);
+ }
+ return true;
+ }
+ return false;
+ },
+ highlightSearchTerms: function (pageNr) {
+ return;
+ },
+ touchOffset: function (offset) {
+ offset *= $("#currentDoublePage").width();
+ $("#currentDoublePage").addClass('sliding');
+ $("#currentDoublePage").css({
+ translateX: offset
+ });
+ },
+ displayLoader: function () {
+ this.coquillette.show();
+ if (!this.support.isMobile) {
+ $('body').addClass('loading');
+ }
+ },
+ hideLoader: function (delay, force) {
+ if (force == undefined) {
+ force = false;
+ }
+ if (delay == undefined) {
+ delay = 0;
+ }
+ var $this = this;
+ if (delay == 0) {
+ return this._hideLoader(force);
+ }
+ setTimeout(function () {
+ $this._hideLoader(force);
+ }, delay * 1000);
+ },
+ _hideLoader: function (force) {
+ if (force == undefined) {
+ force = false;
+ }
+ if (!force && $('#splash').css('visibility') == 'visible') {
+ return;
+ }
+ if (this.support.isMobile) {
+ this.coquillette.hide();
+ } else {
+ this.coquillette.hide();
+ $('body').removeClass('loading');
+ }
+ },
+ pollZoom: function () {
+ var z = this.support.getZoomLevel();
+ //console.log(z);
+ $('html').attr('data-zoom', z);
+ if (z <= 1) {
+ $("html").removeClass('pan');
+ } else {
+ $("html").addClass('pan');
+ }
+ },
+ intentShare: function (subject, body) {
+ if (subject == undefined) {
+ subject = this.datas.title;
+ }
+ if (body == undefined) {
+ body = this.datas.title + ' : ' + this.getLocationToShare();
+ }
- if (this.datas.phonegap == 'android') {
- var extras = {};
- extras[CDV.WEBINTENT.EXTRA_SUBJECT] = subject;
- extras[CDV.WEBINTENT.EXTRA_TEXT] = body;
- CDV.WEBINTENT.startActivity({
- action: CDV.WEBINTENT.ACTION_SEND,
- type: 'text/plain',
- extras: extras
- }, function (args) {
- }, function (args) {
- });
- } else {
- window.location = 'mailto:?subject=' + subject + '&body=' + body;
- }
- this.stats.track(5);
- },
- wopen: function (url, target, options) {
- if (target == undefined) {
- target = '_self';
- }
- if (options == undefined) {
- options = '';
- }
+ if (this.datas.phonegap == 'android') {
+ var extras = {};
+ extras[CDV.WEBINTENT.EXTRA_SUBJECT] = subject;
+ extras[CDV.WEBINTENT.EXTRA_TEXT] = body;
+ CDV.WEBINTENT.startActivity({
+ action: CDV.WEBINTENT.ACTION_SEND,
+ type: 'text/plain',
+ extras: extras
+ }, function (args) {
+ }, function (args) {
+ });
+ } else {
+ window.location = 'mailto:?subject=' + subject + '&body=' + body;
+ }
+ this.stats.track(5);
+ },
+ wopen: function (url, target, options) {
+ if (target == undefined) {
+ target = '_self';
+ }
+ if (options == undefined) {
+ options = '';
+ }
- var locationdefault = 'yes';
- if (this.datas.phonegap) {
- locationdefault = 'yes';
- }
+ var locationdefault = 'yes';
+ if (this.datas.phonegap) {
+ locationdefault = 'yes';
+ }
- if (options == '') {
- options = 'location=' + locationdefault;
- } else if (options.indexOf('location=') == -1) {
- options += ',location=' + locationdefault;
- }
- window.open(url, target, options);
- }
+ if (options == '') {
+ options = 'location=' + locationdefault;
+ } else if (options.indexOf('location=') == -1) {
+ options += ',location=' + locationdefault;
+ }
+ window.open(url, target, options);
+ }
}
\ No newline at end of file
/* Screenshot */
-.screenshot .mview{
+.screenshot .mview {
overflow-y: hidden;
}
/* Incompatible */
-.no-csstransforms #device{
- display:none;
+.no-csstransforms #device {
+ display: none;
}
-.csstransforms #message{
- display:none;
+
+.csstransforms #message {
+ display: none;
}
-#message{
+
+#message {
text-align: center;
- margin: 30px auto;
- width:600px;
+ margin: 30px auto;
+ width: 600px;
}
-#message a{
+
+#message a {
text-decoration: underline;
}
-#message a:after{
- content:" »";
+
+#message a:after {
+ content: " »";
}
/* Disable print div*/
-#printpages{
- display:none;
+#printpages {
+ display: none;
}
-
/* Global settings */
-a,input[type=text],input[type=password],input[type=file],textarea{outline:none;-webkit-appearance:none;}
-a{text-decoration:none;color:inherit;}
-*{
- padding:0;
- margin:0;
+a, input[type=text], input[type=password], input[type=file], textarea {
+ outline: none;
+ -webkit-appearance: none;
+}
+
+a {
+ text-decoration: none;
+ color: inherit;
+}
+
+* {
+ padding: 0;
+ margin: 0;
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
- -webkit-tap-highlight-color:rgba(0,0,0,0);
- -ms-touch-action:double-tap-zoom pinch-zoom;
- -ms-scroll-chaining:chained;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+ -ms-touch-action: double-tap-zoom pinch-zoom;
+ -ms-scroll-chaining: chained;
- -webkit-font-smoothing:antialiased;
+ -webkit-font-smoothing: antialiased;
}
-img{
- border:0;
- box-sizing:content-box;
+img {
+ border: 0;
+ box-sizing: content-box;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
-ms-box-sizing: content-box;
-o-box-sizing: content-box;
}
-b,strong,h1,h2,h3,h4,h5,h6{
+b, strong, h1, h2, h3, h4, h5, h6 {
font-weight: 600;
}
-.pan,.pan *{
- -ms-touch-action:auto;
+.pan, .pan * {
+ -ms-touch-action: auto;
}
-html{
- user-select:text;
- -moz-user-select:text;
- -webkit-user-select:text;
- -o-user-select:text;
- -ms-user-select:text;
+html {
+ user-select: text;
+ -moz-user-select: text;
+ -webkit-user-select: text;
+ -o-user-select: text;
+ -ms-user-select: text;
}
body {
- -webkit-touch-callout: none !important;
+ -webkit-touch-callout: none !important;
}
-
-body,input{
+body, input {
font-family: Ubuntu, Arial, Helvetica, sans-serif;
}
-body.loading *{
- cursor:progress !important;
+body.loading * {
+ cursor: progress !important;
}
-html.screenshot #main{
- visibility:visible !important;
- display:block !important;
+html.screenshot #main {
+ visibility: visible !important;
+ display: block !important;
}
-html.screenshot #coquillette{
+html.screenshot #coquillette {
visibility: hidden !important;
}
-body{
+body {
overflow-y: hidden;
overflow-x: hidden;
}
-#main{
- position:absolute;
- display:none;
- overflow:hidden;
+#main {
+ position: absolute;
+ display: none;
+ overflow: hidden;
visibility: hidden;
- opacity:1;
+ opacity: 1;
}
-#main.fadeout,#view.fadeout{
+#main.fadeout, #view.fadeout {
transition: opacity 500ms ease-out;
-moz-transition: opacity 500ms ease-out;
-webkit-transition: opacity 500ms ease-out;
-ms-transition: opacity 500ms ease-out;
-o-transition: opacity 500ms ease-out;
- opacity:0;
+ opacity: 0;
}
-#hiddencontents{
- display:none;
+#hiddencontents {
+ display: none;
}
/* Background */
-#background{
+#background {
position: absolute;
- left: 0;
- top: 0;
- width: 100%;
+ left: 0;
+ top: 0;
+ width: 100%;
height: 100%;
- z-index:0;
+ z-index: 0;
}
-#background .links{
+#background .links {
}
/* Orientation */
-.portrait .shade, .portrait .page.right{display:none;}
-.portrait .hideOnPortrait{display:none;}
+.portrait .shade, .portrait .page.right {
+ display: none;
+}
+
+.portrait .hideOnPortrait {
+ display: none;
+}
/* Desktop devices */
-.desktop #links{
- cursor:url(../images/cur-zoom-in.png), -moz-zoom-in;
+.desktop #links {
+ cursor: url(../images/cur-zoom-in.png), -moz-zoom-in;
}
-.desktop.zoomed #links{
- cursor:url(../images/cur-zoom-out.png), -moz-zoom-out;
+
+.desktop.zoomed #links {
+ cursor: url(../images/cur-zoom-out.png), -moz-zoom-out;
}
-#links .link{
- cursor:auto;
+#links .link {
+ cursor: auto;
}
/* Coquillette */
-#coquillette{
- position:absolute;
- top:0px;
- left:0px;
+#coquillette {
+ position: absolute;
+ top: 0px;
+ left: 0px;
z-index: 1000;
}
/* Pages */
-.background,.texts{
- position:absolute;
- top:0px;
- left:0px;
+.background, .texts {
+ position: absolute;
+ top: 0px;
+ left: 0px;
overflow: visible;
}
-.background{
- background-repeat:no-repeat;
+.background {
+ background-repeat: no-repeat;
}
-.background img{
- width:100%;
- height:100%;
+.background img {
+ width: 100%;
+ height: 100%;
}
-.texts{
+.texts {
}
-.texts img,.texts object{
- position:absolute;
- top:0px;
- left:0px;
+.texts img, .texts object {
+ position: absolute;
+ top: 0px;
+ left: 0px;
}
/* Espaces forcés */
-.page{
+.page {
overflow: hidden;
- position:absolute;
- top:0px;
- background-color:#fff;
+ position: absolute;
+ top: 0px;
+ background-color: #fff;
}
-.page .shade{
- position:absolute;
- top:0px;
+.page .shade {
+ position: absolute;
+ top: 0px;
}
-
-.page.right .shade{
- left:0px;
+.page.right .shade {
+ left: 0px;
}
-.page.left .shade{
- right:0px;
+.page.left .shade {
+ right: 0px;
}
-.background,.texts, .l, .g, .s{
- position:absolute;
- top:0px;
- left:0px;
+.background, .texts, .l, .g, .s {
+ position: absolute;
+ top: 0px;
+ left: 0px;
}
+
.texts .g {
- line-height: 1;
+ line-height: 1;
}
-.g,.gs,.l{
+.g, .gs, .l {
white-space: nowrap;
}
-.texts .gs{
- display:inline-block;
+
+.texts .gs {
+ display: inline-block;
}
-.o{
+.o {
font-style: oblique;
}
-
-.doublePage,#pages{
- position:absolute;
- top:0px;
- left:0px;
- overflow:hidden;
+.doublePage, #pages {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ overflow: hidden;
}
-#pages{
- position:absolute;
- top:0px;
- left:0px;
+
+#pages {
+ position: absolute;
+ top: 0px;
+ left: 0px;
}
/* Shadow */
-#shadow{
- position:absolute;
- top:0px;
- left:0px;
+#shadow {
+ position: absolute;
+ top: 0px;
+ left: 0px;
/* !!!!!!!!!!! non !!!!!!!!!!!!!!!!!
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
transform: translateZ(0);*/
}
-#shadow>div{
- position:absolute;
- top:0px;
- left:0px;
+#shadow > div {
+ position: absolute;
+ top: 0px;
+ left: 0px;
}
-.portrait #shadow>div.right{
- display:none;
+.portrait #shadow > div.right {
+ display: none;
}
/* Nav */
-#nav #locales{
+#nav #locales {
display: inline-block;
- width:22px;
- height:17px;
+ width: 22px;
+ height: 17px;
border-radius: 3px;
- background-position:50% 50%;
- background-repeat:no-repeat;
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
margin: 11px 3px 0;
}
-.localesList li a{
- padding:10px 20px !important;
+.localesList li a {
+ padding: 10px 20px !important;
}
-.localesList li a img{
+.localesList li a img {
vertical-align: middle;
- margin:-2px 20px 0 0;
+ margin: -2px 20px 0 0;
}
/* Fluidbook */
-#fluidbook{
- position:absolute;
+#fluidbook {
+ position: absolute;
z-index: 11;
direction: ltr;
}
-#cache{
- display:none;
+#cache {
+ display: none;
}
-#pagesnumbers{
- font-size:12px;
+#pagesnumbers {
+ font-size: 12px;
padding: 0;
position: absolute;
white-space: nowrap;
- margin:5px 0 0 0;
+ margin: 5px 0 0 0;
}
-#pagesnumbers div{
+#pagesnumbers div {
text-align: center;
- display:inline-block;
+ display: inline-block;
}
-.portrait #pagesnumbers .right{
- display:none;
+.portrait #pagesnumbers .right {
+ display: none;
}
/* Interface */
-#interface{
- position:static;
+#interface {
+ position: static;
}
-#next,#previous{
- background:#f00;
+#next, #previous {
+ background: #f00;
width: 40px;
- height:100px;
- position:absolute;
- top:310px;
- display:block;
- opacity:1;
- z-index:21;
+ height: 100px;
+ position: absolute;
+ top: 310px;
+ display: block;
+ opacity: 1;
+ z-index: 21;
background-size: 40px 100px;
}
-#next,#previous,#down,#splash{
+#next, #previous, #down, #splash {
transition: opacity 1s ease-in-out;
-moz-transition: opacity 1s ease-in-out;
-webkit-transition: opacity 1s ease-in-out;
-ms-transition: opacity 1s ease-in-out;
}
-#next.hidden.help,#previous.hidden.help{
+#next.hidden.help, #previous.hidden.help {
transition: none;
-moz-transition: none;
-webkit-transition: none;
-o-transition: none;
-ms-transition: none;
- opacity:1;
+ opacity: 1;
}
-#next.hidden,#previous.hidden{
- opacity:0;
- cursor:default;
+#next.hidden, #previous.hidden {
+ opacity: 0;
+ cursor: default;
}
-.ltr #next{
+.ltr #next {
background-image: url("../data/images/interface-next.svg");
- right:0px;
- border-top-left-radius:7px;
- border-bottom-left-radius:7px;
+ right: 0px;
+ border-top-left-radius: 7px;
+ border-bottom-left-radius: 7px;
}
-.ltr #previous{
+.ltr #previous {
background-image: url("../data/images/interface-previous.svg");
- left:0px;
- border-top-right-radius:7px;
- border-bottom-right-radius:7px;
+ left: 0px;
+ border-top-right-radius: 7px;
+ border-bottom-right-radius: 7px;
}
-.rtl #previous{
+.rtl #previous {
background-image: url("../data/images/interface-next.svg");
- right:0px;
- border-top-left-radius:7px;
- border-bottom-left-radius:7px;
+ right: 0px;
+ border-top-left-radius: 7px;
+ border-bottom-left-radius: 7px;
}
-.rtl #next{
+.rtl #next {
background-image: url("../data/images/interface-previous.svg");
- left:0px;
- border-top-right-radius:7px;
- border-bottom-right-radius:7px;
+ left: 0px;
+ border-top-right-radius: 7px;
+ border-bottom-right-radius: 7px;
}
-.rtl.no-svg #next{
+.rtl.no-svg #next {
background-image: url("../data/images/interface-next.png");
}
-.rtl.no-svg #previous{
+.rtl.no-svg #previous {
background-image: url("../data/images/interface-previous.png");
}
-.rtl.no-svg #previous{
+.rtl.no-svg #previous {
background-image: url("../data/images/interface-next.png");
}
-.rtl.no-svg #next{
+.rtl.no-svg #next {
background-image: url("../data/images/interface-previous.png");
}
/* Header */
-header{position:relative;}
-
+header {
+ position: relative;
+}
-#nav>a{
+#nav > a {
vertical-align: top;
- display:inline-block;
+ display: inline-block;
}
-#nav a{
- padding:0 10px 20px 10px;
+#nav a {
+ padding: 0 10px 20px 10px;
}
-.ltr #nav a#submitSearch{
- margin:0 0 0 5px;
+.ltr #nav a#submitSearch {
+ margin: 0 0 0 5px;
}
-.rtl #nav a#submitSearch{
- margin:0 5px 0 0;
+.rtl #nav a#submitSearch {
+ margin: 0 5px 0 0;
}
-
-#nav>a>img{
+#nav > a > img {
padding: 10px 2px 0px 2px;
vertical-align: top;
}
-#nav{
- position:relative;
+#nav {
+ position: relative;
white-space: nowrap;
}
-#afterSearch{
- display:inline-block;
- position:relative;
+#afterSearch {
+ display: inline-block;
+ position: relative;
vertical-align: top;
- left:30px;
+ left: 30px;
}
-#afterSearch .c{
- position:absolute;
- top:0px;
- left:0px;
+#afterSearch .c {
+ position: absolute;
+ top: 0px;
+ left: 0px;
z-index: 9;
display: block;
}
-#afterSearch .links{
- position:absolute;
- top:0px;
- left:0px;
- z-index:10;
+#afterSearch .links {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ z-index: 10;
}
-#search{
- position:relative;
- display:inline-block;
+#search {
+ position: relative;
+ display: inline-block;
z-index: 2;
vertical-align: top;
}
-.ltr #search{
- margin:8px 0 0 30px;
+.ltr #search {
+ margin: 8px 0 0 30px;
}
-.rtl #search{
- margin:8px 30px 0 0;
+.rtl #search {
+ margin: 8px 30px 0 0;
}
-
-#search img{
+#search img {
vertical-align: middle;
}
-#search input{
- padding:5px;
- border-radius:5px;
+
+#search input {
+ padding: 5px;
+ border-radius: 5px;
border: 0;
- height:22px;
- width:150px;
+ height: 22px;
+ width: 150px;
}
-.hint{
- padding:2px 5px 5px;
- height:22px;
- width:137px;
- margin:2px;
- display:block;
- font-size:12px;
+.hint {
+ padding: 2px 5px 5px;
+ height: 22px;
+ width: 137px;
+ margin: 2px;
+ display: block;
+ font-size: 12px;
}
-#searchHints{
- border-radius:5px;
- width:150px;
- padding:5px;
- display:none;
+#searchHints {
+ border-radius: 5px;
+ width: 150px;
+ padding: 5px;
+ display: none;
z-index: 25;
- position:relative;
+ position: relative;
}
-#logo{
- position:absolute;
- top:0px;
+#logo {
+ position: absolute;
+ top: 0px;
background-repeat: no-repeat;
z-index: 10;
}
-.ltr #logo{
- right:0px;
+.ltr #logo {
+ right: 0px;
}
-.rtl #logo{
- left:0px;
+.rtl #logo {
+ left: 0px;
}
-
-.portrait #logo{
- display:none;
+.portrait #logo {
+ display: none;
}
/* Credits */
-footer{
- font-family: Silkscreen,Arial,Helvetica,sans-serif;
- font-size:8px;
+footer {
+ font-family: Silkscreen, Arial, Helvetica, sans-serif;
+ font-size: 8px;
text-transform: uppercase;
position: absolute;
- bottom:2px;
+ bottom: 2px;
z-index: 20;
}
-footer a{
+
+footer a {
text-decoration: none;
- margin:0 4px 4px 0;
+ margin: 0 4px 4px 0;
}
-.ltr footer{
- right:2px;
+.ltr footer {
+ right: 2px;
}
-.rtl footer{
- left:2px;
+.rtl footer {
+ left: 2px;
}
/* Fluidbook zooming */
-footer,header,#interface{
+footer, header, #interface {
-moz-transition: opacity 400ms ease-in;
-webkit-transition: opacity 400ms ease-in;
-o-transition: opacity 400ms ease-in;
transition: opacity 400ms ease-in;
}
-footer.hidden,header.hidden,#interface.hidden{
- opacity:0;
- z-index:0;
+footer.hidden, header.hidden, #interface.hidden {
+ opacity: 0;
+ z-index: 0;
}
-#fluidbook{
- -moz-transition: -moz-transform 1s ease-out,transform 1s ease-out;
- -webkit-transition:-webkit-transform 1s ease-out,transform 1s ease-out;
- -o-transition: -o-transform 1s ease-out,transform 1s ease-out;
- -ms-transition: -ms-transform 1s ease-out,transform 1s ease-out;
+#fluidbook {
+ -moz-transition: -moz-transform 1s ease-out, transform 1s ease-out;
+ -webkit-transition: -webkit-transform 1s ease-out, transform 1s ease-out;
+ -o-transition: -o-transform 1s ease-out, transform 1s ease-out;
+ -ms-transition: -ms-transform 1s ease-out, transform 1s ease-out;
transition: transform 1s ease-out;
}
-#fluidbook.animate{
+#fluidbook.animate {
-moz-transition: all 1s ease-out;
-webkit-transition: all 1s ease-out;
-ms-transition: all 1s ease-out;
}
/* Links */
-#links{
- position:absolute;
- top:0px;
- left:0px;
- z-index:4;
- background-color: rgba(0,0,0,0.001);
+#links {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ z-index: 4;
+ background-color: rgba(0, 0, 0, 0.001);
}
-.link{
+#links .link {
position: absolute;
- cursor:auto;
+ cursor: auto;
z-index: 2;
}
-.link.multimedia{
- z-index:1;
+.link.multimedia {
+ z-index: 1;
}
-.link.contentLink{
- z-index:0;
+.link.contentLink {
+ z-index: 0;
}
-.link a{
- width:100%;
- height:100%;
- display:block;
- border-radius:5px;
- background-color:rgba(0,0,0,0.01);
+.link a {
+ width: 100%;
+ height: 100%;
+ display: block;
+ border-radius: 5px;
+ background-color: rgba(0, 0, 0, 0.01);
}
-.link a.displayArea.animating{
+.link a.displayArea.animating {
-moz-transition: opacity 1s ease-in;
-webkit-transition: opacity 1s ease-in;
-o-transition: opacity 1s ease-in;
transition: opacity 1s ease-in;
}
-#links .nonlinkarea{
- display:none;
+#links .nonlinkarea {
+ display: none;
}
-.pad #links .nonlinkarea{
- width:100%;
- height:100%;
- position:absolute;
- top:0px;
- left:0px;
+.pad #links .nonlinkarea {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0px;
+ left: 0px;
display: block;
}
/* Bookmarks */
-.bookmark.left{
+.bookmark.left {
background-image: url("../data/images/bookmark-left-off.svg");
}
.bookmark.right,
-.portrait #fluidbook .bookmark.left{
+.portrait #fluidbook .bookmark.left {
background-image: url("../data/images/bookmark-right-off.svg");
}
-.bookmark.left[data-enabled]{
+.bookmark.left[data-enabled] {
background-image: url("../data/images/bookmark-left-on.svg");
}
.bookmark.right[data-enabled],
-.portrait #fluidbook .bookmark.left[data-enabled]{
+.portrait #fluidbook .bookmark.left[data-enabled] {
background-image: url("../data/images/bookmark-right-on.svg");
}
-.no-svg .bookmark.left{
+.no-svg .bookmark.left {
background-image: url("../data/images/bookmark-left-off.png");
}
.no-svg .bookmark.right,
-.no-svg .portrait #fluidbook .bookmark.left{
+.no-svg .portrait #fluidbook .bookmark.left {
background-image: url("../data/images/bookmark-right-off.png");
}
-.no-svg .bookmark.left[data-enabled]{
+.no-svg .bookmark.left[data-enabled] {
background-image: url("../data/images/bookmark-left-on.png");
}
.no-svg .bookmark.right[data-enabled],
-.no-svg .portrait #fluidbook .bookmark.left[data-enabled]{
+.no-svg .portrait #fluidbook .bookmark.left[data-enabled] {
background-image: url("../data/images/bookmark-right-on.png");
}
-.bookmark.animating{
+.bookmark.animating {
-moz-transition: opacity 1s ease-in;
-webkit-transition: opacity 1s ease-in;
-o-transition: opacity 1s ease-in;
transition: opacity 1s ease-in;
}
-.bookmark{
+.bookmark {
background-repeat: no-repeat;
- background-size:cover;
- position:absolute;
- top:0px;
+ background-size: cover;
+ position: absolute;
+ top: 0px;
opacity: 0.01;
display: block;
- cursor:pointer;
+ cursor: pointer;
}
-.bookmark[data-enabled],.bookmark:hover{
+.bookmark[data-enabled], .bookmark:hover {
opacity: 1 !important;
-moz-transition: none;
-webkit-transition: none;
transition: none;
}
-#indexView .bookmark{
- width:35px;
- height:35px;
+#indexView .bookmark {
+ width: 35px;
+ height: 35px;
}
-.landscape .bookmark.left{
- left:0px;
+.landscape .bookmark.left {
+ left: 0px;
}
-.bookmark.right{
- right:0px;
+.bookmark.right {
+ right: 0px;
}
/* View */
-.mview{
- position:absolute;
- z-index:22;
- display:none;
+.mview {
+ position: absolute;
+ z-index: 22;
+ display: none;
overflow-x: hidden;
- overflow-y: auto;
+ overflow-y: auto;
-webkit-overflow-scrolling: touch;
- text-shadow: 0px -1px 0px rgba(0,0,0,0.15);
+ text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.15);
background-repeat: no-repeat;
background-size: 100% 100%;
}
-.mview.animate{
- -moz-transition: -moz-transform 600ms ease-out,transform 600ms ease-out;
- -webkit-transition:-webkit-transform 600ms ease-out;
- -o-transition: -o-transform 600ms ease-out,transform 600ms ease-out;
- -ms-transition: -ms-transform 600ms ease-out,transform 600ms ease-out;
+.mview.animate {
+ -moz-transition: -moz-transform 600ms ease-out, transform 600ms ease-out;
+ -webkit-transition: -webkit-transform 600ms ease-out;
+ -o-transition: -o-transform 600ms ease-out, transform 600ms ease-out;
+ -ms-transition: -ms-transform 600ms ease-out, transform 600ms ease-out;
transition: transform 600ms ease-out;
}
-.mview .caption{
- padding:9px 12px;
- height:44px;
- position:absolute;
+.mview .caption {
+ padding: 9px 12px;
+ height: 44px;
+ position: absolute;
z-index: 1;
}
-.mview .caption h2{
- font-size:20px;
+.mview .caption h2 {
+ font-size: 20px;
line-height: 22px;
text-align: center;
font-weight: 600;
- margin:0 auto;
+ margin: 0 auto;
overflow: hidden;
text-overflow: ellipsis;
- white-space: nowrap;
+ white-space: nowrap;
}
-.mview .caption .fonctions{
- position:absolute;
- top:9px;
- right:12px;
+.mview .caption .fonctions {
+ position: absolute;
+ top: 9px;
+ right: 12px;
}
-.mview .caption .fonctions a{
- float:right;
- margin:0 0 0 10px;
+.mview .caption .fonctions a {
+ float: right;
+ margin: 0 0 0 10px;
}
-.mview .caption a{
- height:27px;
+.mview .caption a {
+ height: 27px;
font-weight: 600;
- font-size:14px;
+ font-size: 14px;
line-height: 25px;
display: block;
- box-shadow:inset 1px 1px 0px rgba(255,255,255,0.3);
- -moz-box-shadow:inset 1px 1px 0px rgba(255,255,255,0.3);
- -webkit-box-shadow:inset 1px 1px 0px rgba(255,255,255,0.3);
- -ms-box-shadow:inset 1px 1px 0px rgba(255,255,255,0.3);
- -o-box-shadow:inset 1px 1px 0px rgba(255,255,255,0.3);
+ box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.3);
+ -moz-box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.3);
+ -webkit-box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.3);
+ -ms-box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.3);
+ -o-box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.3);
background-repeat: no-repeat;
- background-position:10px 4px;
+ background-position: 10px 4px;
- border-radius:5px;
+ border-radius: 5px;
}
-.mview .caption a.back{
- position:absolute;
- top:9px;
- left:12px;
+.mview .caption a.back {
+ position: absolute;
+ top: 9px;
+ left: 12px;
- background-image:url("../data/images/interface-back-arrow.svg");
- background-size:auto 17px;
- padding:0 13px 0 27px;
+ background-image: url("../data/images/interface-back-arrow.svg");
+ background-size: auto 17px;
+ padding: 0 13px 0 27px;
}
-.mview .caption a.send{
- background-image:url("../data/images/share-email.svg");
+.mview .caption a.send {
+ background-image: url("../data/images/share-email.svg");
}
-.mview .caption a.print{
- background-image:url("../data/images/interface-print.svg");
+.mview .caption a.print {
+ background-image: url("../data/images/interface-print.svg");
}
-.mview .caption a{
- padding:0 13px 0 33px;
- background-size:auto 17px;
+.mview .caption a {
+ padding: 0 13px 0 33px;
+ background-size: auto 17px;
}
.portrait .mview .caption a.miniOnPortrait {
background-position: 50% 50%;
- padding:0 15px;
+ padding: 0 15px;
}
-
-.mview .content{
+.mview .content {
text-align: center;
- position:absolute;
- top:44px;
+ position: absolute;
+ top: 44px;
}
-#indexView{
- margin:auto;
+#indexView {
+ margin: auto;
}
-#indexView .doubleThumb,#indexView .padding{
- display:inline-block;
- margin:10px 10px 40px 10px;
- position:relative;
- width:200px;
- cursor:pointer;
+#indexView .doubleThumb, #indexView .padding {
+ display: inline-block;
+ margin: 10px 10px 40px 10px;
+ position: relative;
+ width: 200px;
+ cursor: pointer;
text-align: center;
}
-#indexView.bookmarkView .doubleThumb{
- width:100px;
+#indexView.bookmarkView .doubleThumb {
+ width: 100px;
}
-#indexView.bookmarkView .doubleThumb.left{
- margin-right:10px;
+#indexView.bookmarkView .doubleThumb.left {
+ margin-right: 10px;
}
-#indexView.bookmarkView{
+#indexView.bookmarkView {
text-align: left;
}
-
-#indexView .padding{
- height:1px;
+#indexView .padding {
+ height: 1px;
}
-
-#indexView .doubleThumb .overlay{
- background-color:rgba(0,0,0,0.5);
- position:absolute;
- top:0px;
- left:0px;
- width:200px;
- z-index:4;
+#indexView .doubleThumb .overlay {
+ background-color: rgba(0, 0, 0, 0.5);
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 200px;
+ z-index: 4;
}
-#indexView .doubleThumb.simple .overlay{
- width:100px;
+#indexView .doubleThumb.simple .overlay {
+ width: 100px;
}
-
-#indexView .doubleThumb .hits{
- position:relative;
- display:inline;
- top:30px;
- z-index:5;
- font-size:12px;
+#indexView .doubleThumb .hits {
+ position: relative;
+ display: inline;
+ top: 30px;
+ z-index: 5;
+ font-size: 12px;
}
-#indexView .doubleThumb .hits.yes{
- padding:5px;
- border-radius:5px;
+#indexView .doubleThumb .hits.yes {
+ padding: 5px;
+ border-radius: 5px;
}
-#indexView .thumb{
- position:absolute;
- top:0px;
- left:0px;
- font-size:12px;
+
+#indexView .thumb {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ font-size: 12px;
}
-#indexView .thumb img{
- background:#fff;
+#indexView .thumb img {
+ background: #fff;
}
-#indexView .thumb .number{
- text-align:center;
- display:block;
- font-family: Arial,Helvetica,sans-serif;
+#indexView .thumb .number {
+ text-align: center;
+ display: block;
+ font-family: Arial, Helvetica, sans-serif;
margin: 1px 0 0 0;
max-width: 100px;
}
-#indexView .thumb.right{
- left:100px;
+#indexView .thumb.right {
+ left: 100px;
}
-#indexView .doubleThumb.simple{
- width:100px;
+#indexView .doubleThumb.simple {
+ width: 100px;
}
-#indexView .doubleThumb.simple.right{
- margin-left:110px;
-}
-#indexView .doubleThumb.left{
- margin-right:110px;
+#indexView .doubleThumb.simple.right {
+ margin-left: 110px;
}
+#indexView .doubleThumb.left {
+ margin-right: 110px;
+}
-#indexView .right .thumb.right{
- left:0px;
+#indexView .right .thumb.right {
+ left: 0px;
}
/* Search */
-.highlight0{
- background-color:#00ff00;
+.highlight0 {
+ background-color: #00ff00;
}
-.highlight1{
- background-color:#ffff00;
+
+.highlight1 {
+ background-color: #ffff00;
}
-.highlight2{
- background-color:#00ffff;
+
+.highlight2 {
+ background-color: #00ffff;
}
-.highlight3{
- background-color:#ff00ff;
+
+.highlight3 {
+ background-color: #ff00ff;
}
-.highlight4{
- background-color:#ff0000;
+
+.highlight4 {
+ background-color: #ff0000;
}
/* Share */
-ul.chapters.shareList a.level0 img{
- height:25px;
- margin:2px 10px 0 0;
- position:relative;
- top:3px;
+ul.chapters.shareList a.level0 img {
+ height: 25px;
+ margin: 2px 10px 0 0;
+ position: relative;
+ top: 3px;
}
-.rtl ul.chapters.shareList a.level0 img{
- margin:2px 0 0 10px;
+.rtl ul.chapters.shareList a.level0 img {
+ margin: 2px 0 0 10px;
}
/* Help */
-#helpView{
- background-color: rgba(0,0,0,0.7);
- position:absolute;
- z-index:20;
- display:none;
- color:#ffffff;
- overflow:hidden;
+#helpView {
+ background-color: rgba(0, 0, 0, 0.7);
+ position: absolute;
+ z-index: 20;
+ display: none;
+ color: #ffffff;
+ overflow: hidden;
}
-#helpView .illustration{
- text-align:center;
- font-size:20px;
+#helpView .illustration {
+ text-align: center;
+ font-size: 20px;
}
-#helpView .illustration p{
- position:static;
+#helpView .illustration p {
+ position: static;
}
-#helpView #icons{
- position:absolute;
- top:0px;
+#helpView #icons {
+ position: absolute;
+ top: 0px;
}
-.portrait #helpView .icon.afterSearch{
- display:none;
+.portrait #helpView .icon.afterSearch {
+ display: none;
}
-#helpView .icon{
- position:absolute;
- top:0px;
- display:inline-block;
+#helpView .icon {
+ position: absolute;
+ top: 0px;
+ display: inline-block;
border-left: 1px solid #ffffff;
- padding-left:5px;
+ padding-left: 5px;
white-space: nowrap;
}
-.rtl #helpView .icon span{
- position:absolute;
- right:1em;
+.rtl #helpView .icon span {
+ position: absolute;
+ right: 1em;
display: block;
- margin-top:-1em;
+ margin-top: -1em;
}
-#helpView .interface hr{
- width:30px;
- height:0px;
- border:0;
- border-top:1px solid #ffffff;
- display:inline-block;
+#helpView .interface hr {
+ width: 30px;
+ height: 0px;
+ border: 0;
+ border-top: 1px solid #ffffff;
+ display: inline-block;
margin: 0 10px;
vertical-align: middle;
}
-#helpView .down{
- position:absolute;
- right:62px;
- bottom:20px;
+#helpView .down {
+ position: absolute;
+ right: 62px;
+ bottom: 20px;
}
-#helpView .down hr{
- width:30px;
- height:0px;
- border:0;
- border-top:1px solid #ffffff;
- display:inline-block;
+#helpView .down hr {
+ width: 30px;
+ height: 0px;
+ border: 0;
+ border-top: 1px solid #ffffff;
+ display: inline-block;
margin: 0 10px;
vertical-align: middle;
}
.ltr #helpView .interface .next,
.ltr #helpView .interface .last,
.rtl #helpView .interface .first,
-.rtl #helpView .interface .previous{
+.rtl #helpView .interface .previous {
text-align: right;
- right:40px;
- top:340px;
+ right: 40px;
+ top: 340px;
}
.ltr #helpView .interface .next:after,
.ltr #helpView .interface .last:after,
.rtl #helpView .interface .first:after,
-.rtl #helpView .interface .previous:after{
- content:'------------';
- width:100px;
+.rtl #helpView .interface .previous:after {
+ content: '------------';
+ width: 100px;
border-bottom: 1px solid #fff;
- margin:0 10px;
- position:relative;
- top:-0.5em;
- color:transparent;
+ margin: 0 10px;
+ position: relative;
+ top: -0.5em;
+ color: transparent;
}
.rtl #helpView .interface .next,
.rtl #helpView .interface .last,
.ltr #helpView .interface .first,
-.ltr #helpView .interface .previous{
- left:40px;
- top:340px;
+.ltr #helpView .interface .previous {
+ left: 40px;
+ top: 340px;
}
.rtl #helpView .interface .next:before,
.rtl #helpView .interface .last:before,
.ltr #helpView .interface .first:before,
-.ltr #helpView .interface .previous:before{
- content:'------------';
- width:100px;
+.ltr #helpView .interface .previous:before {
+ content: '------------';
+ width: 100px;
border-bottom: 1px solid #fff;
- margin:0 10px;
- position:relative;
- top:-0.5em;
- color:transparent;
+ margin: 0 10px;
+ position: relative;
+ top: -0.5em;
+ color: transparent;
}
-
#helpView .interface .first,
-#helpView .interface .last{
- margin-top:43px;
+#helpView .interface .last {
+ margin-top: 43px;
}
#helpView .interface .next,
-#helpView .interface .previous{
- margin-top:-5px;
+#helpView .interface .previous {
+ margin-top: -5px;
}
-
-#helpView .interface div{
- position:absolute;
+#helpView .interface div {
+ position: absolute;
direction: ltr;
}
-.portrait #helpView .interface{
- display:none;
+.portrait #helpView .interface {
+ display: none;
}
-.pad.portrait #helpView .interface{
- display:block;
+.pad.portrait #helpView .interface {
+ display: block;
}
-.pad #helpView .illustration{
- display:none;
+.pad #helpView .illustration {
+ display: none;
}
/* Archives */
-#archivesview{
- position:relative;
+#archivesview {
+ position: relative;
overflow: hidden;
- top:44px;
+ top: 44px;
}
-#archivesview img{
- width:100%;
+#archivesview img {
+ width: 100%;
}
-#archivesview .links{
- position:absolute;
- top:0px;
- left:0px;
+#archivesview .links {
+ position: absolute;
+ top: 0px;
+ left: 0px;
}
/* Inner view */
-#innerView{
- position:absolute;
- top:0px;
- left:0px;
+#innerView {
+ position: absolute;
+ top: 0px;
+ left: 0px;
z-index: 30;
- display:none;
+ display: none;
}
-
-#innerView>div{
+#innerView > div {
position: absolute;
border-radius: 10px;
- padding:20px;
+ padding: 20px;
font-size: 0.8rem;
}
-#innerView>div p{
- margin:0 0 20px 0;
+#innerView > div p {
+ margin: 0 0 20px 0;
}
/* Form elements */
#innerView form input[type="text"],
-#innerView form input[type="email"]{
+#innerView form input[type="email"] {
font-family: Ubuntu;
- padding:5px;
+ padding: 5px;
border-radius: 5px;
- border:0;
+ border: 0;
width: 100%;
- margin:7px 0;
+ margin: 7px 0;
}
-#innerView .close{
- position:absolute;
- top:0px;
- right:0px;
- width:34px;
- height:34px;
- display:block;
+#innerView .close {
+ position: absolute;
+ top: 0px;
+ right: 0px;
+ width: 34px;
+ height: 34px;
+ display: block;
background-image: url("../data/images/interface-close.svg");
- background-size:14px 14px;
+ background-size: 14px 14px;
background-position: 50% 50%;
background-repeat: no-repeat;
}
-#innerView form input[type="submit"]{
+#innerView form input[type="submit"] {
background-image: -moz-linear-gradient(top, #ffffff 0%, #a2a2a2 100%); /* FF3.6+ */
- background-image: -webkit-linear-gradient(top, #ffffff 0%,#a2a2a2 100%); /* Chrome10+,Safari5.1+ */
- background-image: -o-linear-gradient(top, #ffffff 0%,#a2a2a2 100%); /* Opera 11.10+ */
- background-image: -ms-linear-gradient(top, #ffffff 0%,#a2a2a2 100%); /* IE10+ */
- background-image: linear-gradient(to bottom, #ffffff 0%,#a2a2a2 100%); /* W3C */
- border:0;
- color:#000;
+ background-image: -webkit-linear-gradient(top, #ffffff 0%, #a2a2a2 100%); /* Chrome10+,Safari5.1+ */
+ background-image: -o-linear-gradient(top, #ffffff 0%, #a2a2a2 100%); /* Opera 11.10+ */
+ background-image: -ms-linear-gradient(top, #ffffff 0%, #a2a2a2 100%); /* IE10+ */
+ background-image: linear-gradient(to bottom, #ffffff 0%, #a2a2a2 100%); /* W3C */
+ border: 0;
+ color: #000;
font-weight: bold;
- position:absolute;
- right:20px;
- bottom:20px;
- padding:4px 10px 6px;
+ position: absolute;
+ right: 20px;
+ bottom: 20px;
+ padding: 4px 10px 6px;
border-radius: 5px;
display: inline-block;
cursor: pointer;
}
/* Videos */
-.mview .videoContainer{
+.mview .videoContainer {
- padding:20px;
- width:100%;
- height:100%;
+ padding: 20px;
+ width: 100%;
+ height: 100%;
}
.mview .videoContainer video,
-.mview .videoContainer object,.webvideo{
- position:static;
+.mview .videoContainer object, .webvideo {
+ position: static;
width: 100%;
- height:auto;
+ height: auto;
display: block;
- background-color:transparent !important;
+ background-color: transparent !important;
margin: 0 auto;
}
-.videoContainer{
- position:relative;
+
+.videoContainer {
+ position: relative;
}
/* multimedia */
-.mview .multimediaContainer{
- padding:20px 20px 20px 20px;
+.mview .multimediaContainer {
+ padding: 20px 20px 20px 20px;
}
-.mview img.multimedia{
- width:100%;
- height:auto;
- display:block;
+.mview img.multimedia {
+ width: 100%;
+ height: auto;
+ display: block;
}
/* Chapters */
-ul.chapters>li{
+ul.chapters > li {
clear: both;
}
-ul.chapters a{
- display:block;
+ul.chapters a {
+ display: block;
text-align: left;
- padding:10px 20px;
+ padding: 10px 20px;
}
-.rtl ul.chapters a{
+.rtl ul.chapters a {
text-align: right;
}
-ul.chapters a.level-1{
- font-size:200%;
+ul.chapters a.level-1 {
+ font-size: 200%;
font-family: Ubuntu;
font-weight: 600;
text-align: center;
}
-ul.chapters a.level-1 .right{
- display:none;
+ul.chapters a.level-1 .right {
+ display: none;
}
-ul.chapters a.level0,ul.chapters a.level1,ul.chapters a.level2,ul.chapters a.level3{
- border-top: 1px solid rgba(255,255,255,0.3);
+ul.chapters a.level0, ul.chapters a.level1, ul.chapters a.level2, ul.chapters a.level3 {
+ border-top: 1px solid rgba(255, 255, 255, 0.3);
}
-ul.chapters a.level0{
- font-size:150%;
+ul.chapters a.level0 {
+ font-size: 150%;
font-family: Ubuntu;
font-weight: 600;
}
-ul.chapters a.level1{
- padding:10px 20px 10px 50px;
- font-size:120%;
+ul.chapters a.level1 {
+ padding: 10px 20px 10px 50px;
+ font-size: 120%;
}
-ul.chapters a.level2{
- padding:10px 20px 10px 80px;
+ul.chapters a.level2 {
+ padding: 10px 20px 10px 80px;
font-size: 100%;
}
-ul.chapters a.level3{
- padding:10px 20px 10px 110px;
- font-size:80%;
+ul.chapters a.level3 {
+ padding: 10px 20px 10px 110px;
+ font-size: 80%;
}
-ul.chapters, ul.chapters ul{
+ul.chapters, ul.chapters ul {
list-style: none;
}
-ul.chapters .right{
- float:right;
+ul.chapters .right {
+ float: right;
display: inline-block;
}
-ul.chapters .right .puce.noshadow{
+ul.chapters .right .puce.noshadow {
border-radius: 0px;
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
-ms-border-radius: 0px;
-o-border-radius: 0px;
- box-shadow: 2px 2px 4px rgba(0,0,0,0);
- -moz-box-shadow: 2px 2px 4px rgba(0,0,0,0);
- -webkit-box-shadow: 2px 2px 4px rgba(0,0,0,0);
- -ms-box-shadow: 2px 2px 4px rgba(0,0,0,0);
- -o-box-shadow: 2px 2px 4px rgba(0,0,0,0);
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0);
+ -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0);
+ -webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0);
+ -ms-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0);
+ -o-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0);
margin: 0 0 0 15px;
- float:right;
+ float: right;
}
-ul.chapters .right .puce{
- width:25px;
- height:25px;
+ul.chapters .right .puce {
+ width: 25px;
+ height: 25px;
border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
- box-shadow: 2px 2px 4px rgba(0,0,0,0.25);
- -moz-box-shadow: 2px 2px 4px rgba(0,0,0,0.25);
- -webkit-box-shadow: 2px 2px 4px rgba(0,0,0,0.25);
- -ms-box-shadow: 2px 2px 4px rgba(0,0,0,0.25);
- -o-box-shadow: 2px 2px 4px rgba(0,0,0,0.25);
-
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
+ -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
+ -webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
+ -ms-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
+ -o-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
background-image: url("../images/chapters-arrow.png");
background-repeat: no-repeat;
}
-ul.chapters a.nodark{
+ul.chapters a.nodark {
background-image: none !important;
- border-top:1px solid rgba(255,255,255,0.25);
+ border-top: 1px solid rgba(255, 255, 255, 0.25);
}
-ul.chapters a.level0 .right .puce{
- margin:2px 0 0 0;
+ul.chapters a.level0 .right .puce {
+ margin: 2px 0 0 0;
}
-ul.chapters a.level2 .right .puce{
- margin:-2px 0 0 0;
+ul.chapters a.level2 .right .puce {
+ margin: -2px 0 0 0;
}
-ul.chapters a>nav{
- display:none;
+ul.chapters a > nav {
+ display: none;
}
/* ipad mag */
.pad #pagesnumbers,
-.pad footer
-{
- display:none;
+.pad footer {
+ display: none;
}
.pad #interface,
-.pad header{
+.pad header {
opacity: 0;
visibility: hidden;
z-index: 21;
}
-.pad #interface{
- position:absolute;
- top:0px;
- left:0px;
- width:100%;
+.pad #interface {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 100%;
}
-#down{
- display:none;
+#down {
+ display: none;
}
-.pad #down{
- display:block;
- width:40px;
- height:40px;
- border-radius:5px;
+.pad #down {
+ display: block;
+ width: 40px;
+ height: 40px;
+ border-radius: 5px;
background-image: url("../data/images/interface-down.svg");
background-repeat: no-repeat;
- padding:8px 8px 8px 8px;
- position:absolute;
- bottom:10px;
- right:10px;
+ padding: 8px 8px 8px 8px;
+ position: absolute;
+ bottom: 10px;
+ right: 10px;
background-size: 24px 24px;
background-position: 50% 50%;
z-index: 22;
- opacity:0;
- background-color:rgba(0,0,0,0.6);
+ opacity: 0;
+ background-color: rgba(0, 0, 0, 0.6);
-moz-transition: all .15s ease-out;
- -webkit-transition:all .15s ease-out;
+ -webkit-transition: all .15s ease-out;
-o-transition: all .15s ease-out;
-ms-transition: all .15s ease-out;
transition: all .15s ease-out;
transform: rotate(0deg);
}
-#down.right{
- -moz-transform: rotate(-90deg);
+#down.right {
+ -moz-transform: rotate(-90deg);
-webkit-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
/* Transitions */
/* 2D */
-.doublePage._2d.sliding{
- -moz-transition:none;
- -webkit-transition:none;
+.doublePage._2d.sliding {
+ -moz-transition: none;
+ -webkit-transition: none;
-o-transition: none;
-ms-transition: none;
transition: none;
}
/* 3D */
-#pages._3dtransition{
- -moz-perspective:5000px;
- -webkit-perspective:5000px;
- -o-perspective:5000px;
- -ms-perspective:5000px;
+#pages._3dtransition {
+ -moz-perspective: 5000px;
+ -webkit-perspective: 5000px;
+ -o-perspective: 5000px;
+ -ms-perspective: 5000px;
perspective: 5000px;
- -moz-perspective-origin:50% 75%;
- -webkit-perspective-origin:50% 75%;
- -ms-perspective-origin:50% 75%;
- -o-perspective-origin:50% 75%;
+ -moz-perspective-origin: 50% 75%;
+ -webkit-perspective-origin: 50% 75%;
+ -ms-perspective-origin: 50% 75%;
+ -o-perspective-origin: 50% 75%;
perspective-origin: 50% 75%;
overflow: visible !important;
}
-.doublePage._3d{
+.doublePage._3d {
overflow: visible;
- z-index:100;
+ z-index: 100;
- -moz-transform-style:preserve-3d;
- -webkit-transform-style:preserve-3d;
- -o-transform-style:preserve-3d;
- -ms-transform-style:preserve-3d;
+ -moz-transform-style: preserve-3d;
+ -webkit-transform-style: preserve-3d;
+ -o-transform-style: preserve-3d;
+ -ms-transform-style: preserve-3d;
transform-style: preserve-3d;
}
-._3d .page{
- -moz-backface-visibility:hidden;
- -webkit-backface-visibility:hidden;
- -o-backface-visibility:hidden;
- -ms-backface-visibility:hidden;
+._3d .page {
+ -moz-backface-visibility: hidden;
+ -webkit-backface-visibility: hidden;
+ -o-backface-visibility: hidden;
+ -ms-backface-visibility: hidden;
backface-visibility: hidden;
- left:0px !important;
+ left: 0px !important;
}
-.doublePage._3d .right{
- -webkit-transform: rotate3d(0,1,0,0deg);
- -o-transform: rotate3d(0,1,0,0deg);
- -ms-transform: rotate3d(0,1,0,0deg);
- transform: rotate3d(0,1,0,0deg);
- -moz-transform: rotateY(0deg) translate3d(0,0,0);
+.doublePage._3d .right {
+ -webkit-transform: rotate3d(0, 1, 0, 0deg);
+ -o-transform: rotate3d(0, 1, 0, 0deg);
+ -ms-transform: rotate3d(0, 1, 0, 0deg);
+ transform: rotate3d(0, 1, 0, 0deg);
+ -moz-transform: rotateY(0deg) translate3d(0, 0, 0);
}
-.doublePage._3d .left{
- -webkit-transform: rotate3d(0,1,0,180deg);
- -o-transform: rotate3d(0,1,0,180deg);
- -ms-transform: rotate3d(0,1,0,180deg);
- transform: rotate3d(0,1,0,180deg);
- -moz-transform: rotateY(180deg) translate3d(0,0,0);
+.doublePage._3d .left {
+ -webkit-transform: rotate3d(0, 1, 0, 180deg);
+ -o-transform: rotate3d(0, 1, 0, 180deg);
+ -ms-transform: rotate3d(0, 1, 0, 180deg);
+ transform: rotate3d(0, 1, 0, 180deg);
+ -moz-transform: rotateY(180deg) translate3d(0, 0, 0);
}
-.doublePage._3d.nextstart{
- -webkit-transform: rotate3d(0,1,0,360deg);
- -o-transform: rotate3d(0,1,0,360deg);
- -ms-transform: rotate3d(0,1,0,360deg);
- transform: rotate3d(0,1,0,360deg);
- -moz-transform: rotateY(360deg) translate3d(0,0,0);
+.doublePage._3d.nextstart {
+ -webkit-transform: rotate3d(0, 1, 0, 360deg);
+ -o-transform: rotate3d(0, 1, 0, 360deg);
+ -ms-transform: rotate3d(0, 1, 0, 360deg);
+ transform: rotate3d(0, 1, 0, 360deg);
+ -moz-transform: rotateY(360deg) translate3d(0, 0, 0);
-moz-transform-origin: 0 0;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
}
-.doublePage._3d.nextend{
+.doublePage._3d.nextend {
- -webkit-transform: rotate3d(0,1,0,180deg);
- -o-transform: rotate3d(0,1,0,180deg);
- -ms-transform: rotate3d(0,1,0,180deg);
- transform: rotate3d(0,1,0,180deg);
- -moz-transform: rotateY(180deg) translate3d(0,0,0);
+ -webkit-transform: rotate3d(0, 1, 0, 180deg);
+ -o-transform: rotate3d(0, 1, 0, 180deg);
+ -ms-transform: rotate3d(0, 1, 0, 180deg);
+ transform: rotate3d(0, 1, 0, 180deg);
+ -moz-transform: rotateY(180deg) translate3d(0, 0, 0);
}
-.doublePage._3d.prevstart{
+.doublePage._3d.prevstart {
- -webkit-transform: rotate3d(0,1,0,180deg);
- -o-transform: rotate3d(0,1,0,180deg);
- -ms-transform: rotate3d(0,1,0,180deg);
- transform: rotate3d(0,1,0,180deg);
- -moz-transform: rotateY(180deg) translate3d(0,0,0);
+ -webkit-transform: rotate3d(0, 1, 0, 180deg);
+ -o-transform: rotate3d(0, 1, 0, 180deg);
+ -ms-transform: rotate3d(0, 1, 0, 180deg);
+ transform: rotate3d(0, 1, 0, 180deg);
+ -moz-transform: rotateY(180deg) translate3d(0, 0, 0);
-moz-transform-origin: 0 0;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
}
-.doublePage._3d.prevend{
+.doublePage._3d.prevend {
- -webkit-transform: rotate3d(0,1,0,360deg);
- -o-transform: rotate3d(0,1,0,360deg);
- -ms-transform: rotate3d(0,1,0,360deg);
- transform: rotate3d(0,1,0,360deg);
- -moz-transform: rotateY(360deg) translate3d(0,0,0);
+ -webkit-transform: rotate3d(0, 1, 0, 360deg);
+ -o-transform: rotate3d(0, 1, 0, 360deg);
+ -ms-transform: rotate3d(0, 1, 0, 360deg);
+ transform: rotate3d(0, 1, 0, 360deg);
+ -moz-transform: rotateY(360deg) translate3d(0, 0, 0);
}
-a.button{
- display:inline-block;
- padding:8px 32px 8px 16px;
+a.button {
+ display: inline-block;
+ padding: 8px 32px 8px 16px;
border-radius: 6px;
font-weight: 600;
- margin:10px 0;
+ margin: 10px 0;
background-image: url("../images/arrow-button.png");
background-repeat: no-repeat;
background-position: 100% 50%;
}
-#fontsLoader{
- position:absolute;
- bottom:0px;
+#fontsLoader {
+ position: absolute;
+ bottom: 0px;
right: 0px;
- width:0;
- height:0px;
- overflow:hidden;
+ width: 0;
+ height: 0px;
+ overflow: hidden;
}
/* Splash screen */
-#splash{
- position:absolute;
- top:0px;
- left:0px;
+#splash {
+ position: absolute;
+ top: 0px;
+ left: 0px;
z-index: 30;
- opacity:0;
+ opacity: 0;
}
-#splash .logo{
- position:absolute;
+#splash .logo {
+ position: absolute;
}
-#popinOverlay{
- position:absolute;
+#popinOverlay {
+ position: absolute;
z-index: 29;
- top:0px;
- left:0px;
- width:100%;
+ top: 0px;
+ left: 0px;
+ width: 100%;
height: 100%;
- background-color: rgba(0,0,0,0.3);
- display:none;
+ background-color: rgba(0, 0, 0, 0.3);
+ display: none;
}
-
-#popinOverlay iframe{
- background-color:#fff;
- overflow:hidden;
+#popinOverlay iframe {
+ background-color: #fff;
+ overflow: hidden;
}
-#popinOverlay>*{
- position:absolute;
+#popinOverlay > * {
+ position: absolute;
z-index: 30;
- top:0px;
- left:0px;
+ top: 0px;
+ left: 0px;
}
/* Tooltip */
-#tooltip{
- position:absolute;
- top:0px;
- left:0px;
- padding:5px 10px;
+#tooltip {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ padding: 5px 10px;
border-radius: 5px;
- display:none;
- font-size:0.8rem;
+ display: none;
+ font-size: 0.8rem;
max-width: 180px;
z-index: 100;
}
@media handled and (orientation: portrait) {
- #ol{display:none;}
- @-ms-viewport { width: 800px; }
+ #ol {
+ display: none;
+ }
+
+ @-ms-viewport {
+ width: 800px;
+ }
}
@media handled and (orientation: landscape) {
- #op{display:none;}
- @-ms-viewport { width: 1280px; }
+ #op {
+ display: none;
+ }
+
+ @-ms-viewport {
+ width: 1280px;
+ }
}
/* Webfonts*/
@font-face {
- font-family: 'Silkscreen';
- src: url('fonts/slkscr-webfont.ttf') format('truetype');
- font-weight: 400;
- font-style: normal;
+ font-family: 'Silkscreen';
+ src: url('fonts/slkscr-webfont.ttf') format('truetype');
+ font-weight: 400;
+ font-style: normal;
}
@font-face {
- font-family: 'Ubuntu';
- src: url('fonts/Ubuntu-R-webfont.ttf') format('truetype');
- font-weight: 400;
- font-style: normal;
+ font-family: 'Ubuntu';
+ src: url('fonts/Ubuntu-R-webfont.ttf') format('truetype');
+ font-weight: 400;
+ font-style: normal;
}
@font-face {
- font-family: 'Ubuntu';
- src:url('fonts/Ubuntu-M-webfont.ttf') format('truetype');
- font-weight: 600;
- font-style: normal;
+ font-family: 'Ubuntu';
+ src: url('fonts/Ubuntu-M-webfont.ttf') format('truetype');
+ font-weight: 600;
+ font-style: normal;
}