From: Vincent Vanwaelscappel Date: Wed, 7 Jun 2017 14:00:48 +0000 (+0200) Subject: try #1454 @3 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4ab8047b04a06e9b6c3930ba9842096900247fb6;p=fluidbook-html5.git try #1454 @3 --- diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index 67fa1219..4917f684 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -131,7 +131,7 @@ Fluidbook.prototype = { 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(); diff --git a/js/libs/fluidbook/fluidbook.menu.js b/js/libs/fluidbook/fluidbook.menu.js index 735d6c8c..161ac810 100644 --- a/js/libs/fluidbook/fluidbook.menu.js +++ b/js/libs/fluidbook/fluidbook.menu.js @@ -6,6 +6,44 @@ function FluidbookMenu(fluidbook) { FluidbookMenu.prototype = { init: function () { this.index = new FluidbookIndex(this.fluidbook); + var $this = this; + + $(document).on('click', ".mview .back", function () { + if ($(this).hasClass('closeView')) { + fluidbook.menu.closeView(function () { + }, false); + if ($(this).is('[href]')) { + maskHashChange = true; + window.location = $(this).attr('href'); + setTimeout(function () { + maskHashChange = false; + }, 200); + } + return false; + } + if ($(this).hasClass('one')) { + fluidbook.menu.closeView(function () { + }, false); + + if ($(this).is('[href]')) { + maskHashChange = true; + window.location = $(this).attr('href'); + setTimeout(function () { + maskHashChange = false; + }, 200); + } else { + maskHashChange = true; + history.back(); + setTimeout(function () { + maskHashChange = false; + }, 200); + } + return false; + } + window.location.hash = '/page/' + $this.fluidbook.currentPage; + return false; + }); + }, viewMode: function () { @@ -212,7 +250,7 @@ FluidbookMenu.prototype = { } else { c = ' ' + c; } - return '' + getSpriteIcon('interface-close') + ''; + return '
' + getSpriteIcon('interface-close') + '
'; } , openAudio: function (audio, callback) { @@ -412,7 +450,7 @@ FluidbookMenu.prototype = { } - if(mview.length>0) { + if (mview.length > 0) { TweenMax.to(mview, 0.25, { autoAlpha: 0, onComplete: function () { $this.fluidbook.video.killVideosIn(mview); @@ -536,7 +574,7 @@ FluidbookMenu.prototype = { default: break; } - + var captionHeight = m.find('.caption').outerHeight(); css = {}; ccss = {}; diff --git a/js/main.js b/js/main.js index 0d8dfe36..566df181 100644 --- a/js/main.js +++ b/js/main.js @@ -368,45 +368,6 @@ try { $("#logo").click(clickLogo); - $(document).on('click', ".mview .back", function () { - if ($(this).hasClass('closeView')) { - fluidbook.menu.closeView(function () { - }, false); - if ($(this).attr('href') != '#') { - maskHashChange = true; - window.location = $(this).attr('href'); - setTimeout(function () { - maskHashChange = false; - }, 200); - - } - return false; - } - if ($(this).hasClass('one')) { - fluidbook.menu.closeView(function () { - }, false); - - if ($(this).attr('href') != '#') { - maskHashChange = true; - window.location = $(this).attr('href'); - setTimeout(function () { - maskHashChange = false; - }, 200); - } else { - maskHashChange = true; - history.back(); - setTimeout(function () { - maskHashChange = false; - }, 200); - } - return false; - } - if ($(this).attr('href') == '#') { - window.location.hash = '/page/' + fluidbook.currentPage; - return false; - } - }); - $(document).on('click', '.lazy', function () { return false; }); @@ -418,7 +379,7 @@ try { return false; }); - $(document).on('click', 'a', function () { + $(document).on('click', 'a', function () { if (!DATAS.phonegap) { return true; } diff --git a/style/fluidbook.less b/style/fluidbook.less index ebfab845..988f809e 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -847,7 +847,7 @@ footer.hidden, header.hidden, #interface.hidden { .caption { height: 0; padding: 0; - .back { + div.button.back { width: 30px; height: 30px; padding: 10px; @@ -917,12 +917,13 @@ footer.hidden, header.hidden, #interface.hidden { white-space: nowrap; } - a { + div.button, a { height: 27px; font-weight: 600; font-size: 14px; line-height: 25px; display: block; + cursor: pointer; &.back { position: absolute; top: 0;