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
|
|
@ -33,6 +33,9 @@
|
|||
this.logoImg = Utils.trim(Settings.settingsGet('UserLogo'));
|
||||
this.logoTitle = Utils.trim(Settings.settingsGet('UserLogoTitle'));
|
||||
|
||||
this.mobile = !!Settings.appSettingsGet('mobile');
|
||||
this.mobileDevice = !!Settings.appSettingsGet('mobileDevice');
|
||||
|
||||
this.allowSettings = !!Settings.capa(Enums.Capa.Settings);
|
||||
this.allowHelp = !!Settings.capa(Enums.Capa.Help);
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@
|
|||
this.logoPowered = !!Settings.settingsGet('LoginPowered');
|
||||
this.loginDescription = Utils.trim(Settings.settingsGet('LoginDescription'));
|
||||
|
||||
this.mobile = !!Settings.appSettingsGet('mobile');
|
||||
this.mobileDevice = !!Settings.appSettingsGet('mobileDevice');
|
||||
|
||||
this.forgotPasswordLinkUrl = Settings.appSettingsGet('forgotPasswordLinkUrl');
|
||||
this.registrationLinkUrl = Settings.appSettingsGet('registrationLinkUrl');
|
||||
|
||||
|
|
|
|||
|
|
@ -80,8 +80,14 @@
|
|||
|
||||
var
|
||||
self = this,
|
||||
bMobile = Settings.appSettingsGet('mobile'),
|
||||
fSelectFolder = function (oEvent, bStarred) {
|
||||
|
||||
if (bMobile)
|
||||
{
|
||||
Globals.leftPanelDisabled(true);
|
||||
}
|
||||
|
||||
oEvent.preventDefault();
|
||||
|
||||
if (bStarred)
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@
|
|||
this.logoImg = Utils.trim(Settings.settingsGet('UserLogoMessage'));
|
||||
this.logoIframe = Utils.trim(Settings.settingsGet('UserIframeMessage'));
|
||||
|
||||
this.mobile = !!Settings.appSettingsGet('mobile');
|
||||
|
||||
this.attachmentsActions = AppStore.attachmentsActions;
|
||||
|
||||
this.message = MessageStore.message;
|
||||
|
|
@ -688,6 +690,15 @@
|
|||
this.oHeaderDom = $('.messageItemHeader', oDom);
|
||||
this.oHeaderDom = this.oHeaderDom[0] ? this.oHeaderDom : null;
|
||||
|
||||
if (this.mobile)
|
||||
{
|
||||
oDom
|
||||
.on('click', function () {
|
||||
Globals.leftPanelDisabled(true);
|
||||
})
|
||||
;
|
||||
}
|
||||
|
||||
oDom
|
||||
.on('click', 'a', function (oEvent) {
|
||||
// setup maito protocol
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
Links = require('Common/Links'),
|
||||
|
||||
Cache = require('Common/Cache'),
|
||||
Settings = require('Storage/Settings'),
|
||||
|
||||
kn = require('Knoin/Knoin'),
|
||||
AbstractView = require('Knoin/AbstractView')
|
||||
|
|
@ -29,6 +30,8 @@
|
|||
|
||||
this.leftPanelDisabled = Globals.leftPanelDisabled;
|
||||
|
||||
this.mobile = Settings.appSettingsGet('mobile');
|
||||
|
||||
this.menu = oScreen.menu;
|
||||
|
||||
kn.constructorEnd(this);
|
||||
|
|
@ -44,6 +47,15 @@
|
|||
// self.backToMailBoxClick();
|
||||
// });
|
||||
|
||||
if (this.mobile)
|
||||
{
|
||||
oDom
|
||||
.on('click', '.b-settings-menu .e-item.selectable', function () {
|
||||
Globals.leftPanelDisabled(true);
|
||||
})
|
||||
;
|
||||
}
|
||||
|
||||
key('up, down', Enums.KeyState.Settings, _.throttle(function (event, handler) {
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
var
|
||||
_ = require('_'),
|
||||
|
||||
Globals = require('Common/Globals'),
|
||||
|
||||
Settings = require('Storage/Settings'),
|
||||
|
||||
kn = require('Knoin/Knoin'),
|
||||
AbstractView = require('Knoin/AbstractView')
|
||||
;
|
||||
|
|
@ -18,6 +22,10 @@
|
|||
{
|
||||
AbstractView.call(this, 'Right', 'SettingsPane');
|
||||
|
||||
this.mobile = Settings.appSettingsGet('mobile');
|
||||
|
||||
this.leftPanelDisabled = Globals.leftPanelDisabled;
|
||||
|
||||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
|
|
@ -29,6 +37,34 @@
|
|||
require('Stores/User/Message').message(null);
|
||||
};
|
||||
|
||||
PaneSettingsUserView.prototype.hideLeft = function (oItem, oEvent)
|
||||
{
|
||||
oEvent.preventDefault();
|
||||
oEvent.stopPropagation();
|
||||
|
||||
Globals.leftPanelDisabled(true);
|
||||
};
|
||||
|
||||
PaneSettingsUserView.prototype.showLeft = function (oItem, oEvent)
|
||||
{
|
||||
oEvent.preventDefault();
|
||||
oEvent.stopPropagation();
|
||||
|
||||
Globals.leftPanelDisabled(false);
|
||||
};
|
||||
|
||||
PaneSettingsUserView.prototype.onBuild = function (oDom)
|
||||
{
|
||||
if (this.mobile)
|
||||
{
|
||||
oDom
|
||||
.on('click', function () {
|
||||
Globals.leftPanelDisabled(true);
|
||||
})
|
||||
;
|
||||
}
|
||||
};
|
||||
|
||||
PaneSettingsUserView.prototype.backToMailBoxClick = function ()
|
||||
{
|
||||
kn.setHash(require('Common/Links').inbox(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue