mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Fixed message header
This commit is contained in:
parent
ef3042aff7
commit
db942d4970
4 changed files with 164 additions and 128 deletions
|
|
@ -44,6 +44,7 @@
|
|||
}
|
||||
;
|
||||
|
||||
this.oHeaderDom = null;
|
||||
this.oMessageScrollerDom = null;
|
||||
|
||||
this.pswp = null;
|
||||
|
|
@ -149,6 +150,9 @@
|
|||
}, this.messageVisibility);
|
||||
|
||||
// viewer
|
||||
|
||||
this.viewBodyTopValue = ko.observable(0);
|
||||
|
||||
this.viewHash = '';
|
||||
this.viewSubject = ko.observable('');
|
||||
this.viewFromShort = ko.observable('');
|
||||
|
|
@ -364,7 +368,14 @@
|
|||
{
|
||||
var
|
||||
self = this,
|
||||
sErrorMessage = Utils.i18n('PREVIEW_POPUP/IMAGE_ERROR')
|
||||
sErrorMessage = Utils.i18n('PREVIEW_POPUP/IMAGE_ERROR'),
|
||||
fCheckHeaderHeight = function () {
|
||||
if (self.oHeaderDom)
|
||||
{
|
||||
self.viewBodyTopValue(self.message() ? self.oHeaderDom.height() +
|
||||
20 /* padding-(top/bottom): 20px */ + 1 /* borded-bottom: 1px */ : 0);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
this.fullScreenMode.subscribe(function (bValue) {
|
||||
|
|
@ -374,6 +385,24 @@
|
|||
}
|
||||
}, this);
|
||||
|
||||
this.fullScreenMode.subscribe(fCheckHeaderHeight);
|
||||
this.showFullInfo.subscribe(fCheckHeaderHeight);
|
||||
this.message.subscribe(fCheckHeaderHeight);
|
||||
|
||||
Globals.$win.on('resize', function () {
|
||||
_.delay(fCheckHeaderHeight, 1);
|
||||
_.delay(fCheckHeaderHeight, 200);
|
||||
_.delay(fCheckHeaderHeight, 500);
|
||||
});
|
||||
|
||||
this.showFullInfo.subscribe(function () {
|
||||
Utils.windowResize();
|
||||
Utils.windowResize(250);
|
||||
});
|
||||
|
||||
this.oHeaderDom = $('.messageItemHeader', oDom);
|
||||
this.oHeaderDom = this.oHeaderDom[0] ? this.oHeaderDom : null;
|
||||
|
||||
this.pswpDom = $('.pswp', oDom)[0];
|
||||
|
||||
if (this.pswpDom)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue