mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Add mobile version (beta)
This commit is contained in:
parent
1391648e1b
commit
b0ffd84ac6
76 changed files with 2945 additions and 845 deletions
|
|
@ -48,6 +48,8 @@
|
|||
this.bPrefetch = false;
|
||||
this.emptySubjectValue = '';
|
||||
|
||||
this.mobile = !!Settings.appSettingsGet('mobile');
|
||||
|
||||
this.allowReload = !!Settings.capa(Enums.Capa.Reload);
|
||||
this.allowSearch = !!Settings.capa(Enums.Capa.Search);
|
||||
this.allowSearchAdv = !!Settings.capa(Enums.Capa.SearchAdv);
|
||||
|
|
@ -63,6 +65,11 @@
|
|||
|
||||
this.folderList = FolderStore.folderList;
|
||||
|
||||
this.composeInEdit = AppStore.composeInEdit;
|
||||
this.allowComposer = !!Settings.capa(Enums.Capa.Composer);
|
||||
|
||||
this.leftPanelDisabled = Globals.leftPanelDisabled;
|
||||
|
||||
this.selectorMessageSelected = MessageStore.selectorMessageSelected;
|
||||
this.selectorMessageFocused = MessageStore.selectorMessageFocused;
|
||||
this.isMessageSelected = MessageStore.isMessageSelected;
|
||||
|
|
@ -101,9 +108,9 @@
|
|||
this.dragOverBodyArea = ko.observable(null);
|
||||
|
||||
this.messageListItemTemplate = ko.computed(function () {
|
||||
return Enums.Layout.SidePreview === SettingsStore.layout() ?
|
||||
return this.mobile || Enums.Layout.SidePreview === SettingsStore.layout() ?
|
||||
'MailMessageListItem' : 'MailMessageListItemNoPreviewPane';
|
||||
});
|
||||
}, this);
|
||||
|
||||
this.messageListSearchDesc = ko.computed(function () {
|
||||
var sValue = MessageStore.messageListEndSearch();
|
||||
|
|
@ -338,6 +345,30 @@
|
|||
|
||||
MessageListMailBoxUserView.prototype.iGoToUpUpOrDownDownTimeout = 0;
|
||||
|
||||
MessageListMailBoxUserView.prototype.hideLeft = function (oItem, oEvent)
|
||||
{
|
||||
oEvent.preventDefault();
|
||||
oEvent.stopPropagation();
|
||||
|
||||
Globals.leftPanelDisabled(true);
|
||||
};
|
||||
|
||||
MessageListMailBoxUserView.prototype.showLeft = function (oItem, oEvent)
|
||||
{
|
||||
oEvent.preventDefault();
|
||||
oEvent.stopPropagation();
|
||||
|
||||
Globals.leftPanelDisabled(false);
|
||||
};
|
||||
|
||||
MessageListMailBoxUserView.prototype.composeClick = function ()
|
||||
{
|
||||
if (Settings.capa(Enums.Capa.Composer))
|
||||
{
|
||||
kn.showScreenPopup(require('View/Popup/Compose'));
|
||||
}
|
||||
};
|
||||
|
||||
MessageListMailBoxUserView.prototype.goToUpUpOrDownDown = function (bUp)
|
||||
{
|
||||
var self = this;
|
||||
|
|
@ -707,6 +738,15 @@
|
|||
|
||||
this.selector.init(this.oContentVisible, this.oContentScrollable, Enums.KeyState.MessageList);
|
||||
|
||||
if (this.mobile)
|
||||
{
|
||||
oDom
|
||||
.on('click', function () {
|
||||
Globals.leftPanelDisabled(true);
|
||||
})
|
||||
;
|
||||
}
|
||||
|
||||
oDom
|
||||
.on('click', '.messageList .b-message-list-wrapper', function () {
|
||||
if (Enums.Focused.MessageView === AppStore.focusedState())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue