var footer = '<div class="footer fixed"><a href="#/article/' + article.prev + '" class="article-prev">' + getSpriteIcon('interface-previous-simple') + ' ' + this.fluidbook.l10n.__('previous article') + '</a><a href="#/article/' + article.next + '" class="article-next">' + this.fluidbook.l10n.__('next article') + ' ' + getSpriteIcon('interface-next-simple') + '</a></div>';
var view = '<div class="content">' + article.contents + '</div>' + footer;
- this.fluidbook.menu.viewWrap(this.fluidbook.menu.closeButton() + view, 'article');
+ this.fluidbook.menu.viewWrap(this.fluidbook.menu.closeButton() + view, 'article', '', '', true);
+
+ this.fluidbook.silentChangePage(article.page, true);
- this.fluidbook.silentChangePage(article.page);
- this.resize();
callback();
+ var $this = this;
+
+ setTimeout(function () {
+ $this.resize();
+ }, 10)
+
},
findArticleByURL: function (url) {
var w = $(this).width();
var aw = $(this).find('.actions').outerWidth();
$(this).find('h3').eq(0).css('width', w - aw);
+ var $this = this;
+ setTimeout(function () {
+ $($this).closest('.mview').addClass('visible');
+ }, 10);
});
},
}
\ No newline at end of file
return;
},
- silentChangePage: function (page) {
+ silentChangePage: function (page, transition) {
if (page !== this.currentPage) {
- this.currentPage = page;
- this.pagetransitions.pageTransition(this.currentPage);
+ if (transition !== true) {
+ this.currentPage = page;
+ }
+ this.pagetransitions.pageTransition(page);
}
},
},
animateLinks: function () {
- if (this.fluidbook.settings.linkBlinkTime == 0 || this.fluidbook.settings.linkBlinkRepetition == 0 || !this.fluidbook.settings.mobileLinksRevealAnim) {
+ if (this.fluidbook.settings.linkBlinkTime == 0 || this.fluidbook.settings.linkBlinkRepetition == 0 || !this.fluidbook.settings.mobileLinksRevealAnim || this.fluidbook.menu.viewMode()) {
return;
}
var $this = this;
}, 420);
},
- viewWrap: function (content, menu, attributes, cls) {
+ viewWrap: function (content, menu, attributes, cls,replace) {
if (attributes === undefined) {
attributes = '';
}
cls = '';
}
var res = '<div class="mview ' + cls + '" data-menu="' + menu + '" role="dialog" aria-labelledby="mview-dialog-title"' + attributes + '>' + content + '</div>';
- $("#view").append(res);
+ if(replace===true){
+ $("#view").html(res);
+ }else {
+ $("#view").append(res);
+ }
},
getCaption: function (caption, close, cls) {
padding: 0;
}
+.mview[data-menu="article"] {
+ transition: opacity 250ms;
+ opacity: 0 !important;
+
+ &.visible {
+ opacity: 1 !important;
+ }
+}
+
article {
position: relative;
font-family: @articles-font;
margin: 20px 0;
font-weight: 300;
- &.inter{
+ &.inter {
font-size: 18px;
text-transform: none;
font-weight: 600;