mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Fix back button in no-preview layout
layout setting
This commit is contained in:
parent
7bba9c17ea
commit
6928fcc48e
17 changed files with 385 additions and 238 deletions
|
|
@ -204,6 +204,11 @@ AbstractApp.prototype.loginAndLogoutReload = function (bLogout, bClose)
|
|||
}
|
||||
};
|
||||
|
||||
AbstractApp.prototype.historyBack = function ()
|
||||
{
|
||||
window.history.back();
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sQuery
|
||||
* @param {Function} fCallback
|
||||
|
|
|
|||
|
|
@ -236,8 +236,16 @@ Enums.InterfaceAnimation = {
|
|||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
Enums.ContactScopeType = {
|
||||
Enums.Layout = {
|
||||
'NoPreview': 0,
|
||||
'SidePreview': 1,
|
||||
'BottomPreview': 2
|
||||
};
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
Enums.ContactScopeType = {
|
||||
'Default': 0,
|
||||
'ShareAll': 2
|
||||
};
|
||||
|
|
|
|||
|
|
@ -126,6 +126,14 @@ LinkBuilder.prototype.inbox = function ()
|
|||
return this.sBase + 'mailbox/Inbox';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
LinkBuilder.prototype.messagePreview = function ()
|
||||
{
|
||||
return this.sBase + 'mailbox/message-preview';
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string=} sScreenName
|
||||
* @return {string}
|
||||
|
|
|
|||
|
|
@ -751,6 +751,7 @@ Utils.initDataConstructorBySettings = function (oData)
|
|||
oData.useThreads = ko.observable(true);
|
||||
oData.replySameFolder = ko.observable(true);
|
||||
oData.usePreviewPane = ko.observable(true);
|
||||
oData.layout = ko.observable(Enums.Layout.SidePreview);
|
||||
oData.useCheckboxesInList = ko.observable(true);
|
||||
|
||||
oData.interfaceAnimation.subscribe(function (sValue) {
|
||||
|
|
|
|||
|
|
@ -43,17 +43,27 @@ MailBoxScreen.prototype.onShow = function ()
|
|||
* @param {string} sFolderHash
|
||||
* @param {number} iPage
|
||||
* @param {string} sSearch
|
||||
* @param {boolean=} bPreview = false
|
||||
*/
|
||||
MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
|
||||
MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch, bPreview)
|
||||
{
|
||||
var
|
||||
oData = RL.data(),
|
||||
sFolderFullNameRaw = RL.cache().getFolderFullNameRaw(sFolderHash),
|
||||
oFolder = RL.cache().getFolderFromCacheList(sFolderFullNameRaw)
|
||||
;
|
||||
|
||||
if (oFolder)
|
||||
if (Utils.isUnd(bPreview) ? false : !!bPreview)
|
||||
{
|
||||
if (!RL.data().usePreviewPane() && !RL.data().message())
|
||||
{
|
||||
RL.historyBack();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var
|
||||
oData = RL.data(),
|
||||
sFolderFullNameRaw = RL.cache().getFolderFullNameRaw(sFolderHash),
|
||||
oFolder = RL.cache().getFolderFromCacheList(sFolderFullNameRaw)
|
||||
;
|
||||
|
||||
if (oFolder)
|
||||
{
|
||||
oData
|
||||
.currentFolder(oFolder)
|
||||
.messageListPage(iPage)
|
||||
|
|
@ -63,10 +73,12 @@ MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
|
|||
if (!oData.usePreviewPane() && oData.message())
|
||||
{
|
||||
oData.message(null);
|
||||
oData.messageFullScreenMode(false);
|
||||
}
|
||||
|
||||
RL.reloadMessageList();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
MailBoxScreen.prototype.onStart = function ()
|
||||
|
|
@ -130,6 +142,9 @@ MailBoxScreen.prototype.onStart = function ()
|
|||
MailBoxScreen.prototype.routes = function ()
|
||||
{
|
||||
var
|
||||
fNormP = function () {
|
||||
return ['Inbox', 1, '', true];
|
||||
},
|
||||
fNormS = function (oRequest, oVals) {
|
||||
oVals[0] = Utils.pString(oVals[0]);
|
||||
oVals[1] = Utils.pInt(oVals[1]);
|
||||
|
|
@ -142,7 +157,7 @@ MailBoxScreen.prototype.routes = function ()
|
|||
oVals[1] = 1;
|
||||
}
|
||||
|
||||
return [decodeURI(oVals[0]), oVals[1], decodeURI(oVals[2])];
|
||||
return [decodeURI(oVals[0]), oVals[1], decodeURI(oVals[2]), false];
|
||||
},
|
||||
fNormD = function (oRequest, oVals) {
|
||||
oVals[0] = Utils.pString(oVals[0]);
|
||||
|
|
@ -153,7 +168,7 @@ MailBoxScreen.prototype.routes = function ()
|
|||
oVals[0] = 'Inbox';
|
||||
}
|
||||
|
||||
return [decodeURI(oVals[0]), 1, decodeURI(oVals[1])];
|
||||
return [decodeURI(oVals[0]), 1, decodeURI(oVals[1]), false];
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -161,6 +176,7 @@ MailBoxScreen.prototype.routes = function ()
|
|||
[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)\/(.+)\/?$/, {'normalize_': fNormS}],
|
||||
[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)$/, {'normalize_': fNormS}],
|
||||
[/^([a-zA-Z0-9]+)\/(.+)\/?$/, {'normalize_': fNormD}],
|
||||
[/^message-preview$/, {'normalize_': fNormP}],
|
||||
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ function SettingsGeneral()
|
|||
this.useThreads = oData.useThreads;
|
||||
this.replySameFolder = oData.replySameFolder;
|
||||
this.usePreviewPane = oData.usePreviewPane;
|
||||
this.layout = oData.layout;
|
||||
this.useCheckboxesInList = oData.useCheckboxesInList;
|
||||
this.allowLanguagesOnSettings = oData.allowLanguagesOnSettings;
|
||||
|
||||
|
|
@ -134,6 +135,15 @@ SettingsGeneral.prototype.onBuild = function ()
|
|||
'UsePreviewPane': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
oData.layout.subscribe(function (nValue) {
|
||||
|
||||
oData.messageList([]);
|
||||
|
||||
RL.remote().saveSettings(Utils.emptyFunction, {
|
||||
'Layout': nValue
|
||||
});
|
||||
});
|
||||
|
||||
oData.useCheckboxesInList.subscribe(function (bValue) {
|
||||
RL.remote().saveSettings(Utils.emptyFunction, {
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ AbstractData.prototype.populateDataOnStart = function()
|
|||
this.useThreads(!!RL.settingsGet('UseThreads'));
|
||||
this.replySameFolder(!!RL.settingsGet('ReplySameFolder'));
|
||||
this.usePreviewPane(!!RL.settingsGet('UsePreviewPane'));
|
||||
this.layout(!!RL.settingsGet('UsePreviewPane') ? Enums.Layout.SidePreview : Enums.Layout.NoPreview); // TODO
|
||||
this.useCheckboxesInList(!!RL.settingsGet('UseCheckboxesInList'));
|
||||
|
||||
this.facebookEnable(!!RL.settingsGet('AllowFacebookSocial'));
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ function MailBoxMessageListViewModel()
|
|||
this.dragOverBodyArea = ko.observable(null);
|
||||
|
||||
this.messageListItemTemplate = ko.computed(function () {
|
||||
return oData.usePreviewPane() ?
|
||||
return Enums.Layout.NoPreview !== oData.layout() ?
|
||||
'MailMessageListItem' : 'MailMessageListItemNoPreviewPane';
|
||||
});
|
||||
|
||||
|
|
@ -163,6 +163,11 @@ function MailBoxMessageListViewModel()
|
|||
this.selector.on('onItemSelect', _.bind(function (oMessage) {
|
||||
if (oMessage)
|
||||
{
|
||||
if (Enums.Layout.NoPreview === oData.layout())
|
||||
{
|
||||
kn.setHash(RL.link().messagePreview(), true);
|
||||
}
|
||||
|
||||
oData.message(oData.staticMessageList.populateByMessageListItem(oMessage));
|
||||
this.populateMessageBody(oData.message());
|
||||
}
|
||||
|
|
@ -723,7 +728,7 @@ MailBoxMessageListViewModel.prototype.onBuild = function (oDom)
|
|||
|
||||
if (oEvent && self.viewModelVisibility() && oData.useKeyboardShortcuts() && !RL.popupVisibility() && !oData.messageFullScreenMode() && !Utils.inFocus())
|
||||
{
|
||||
if (oData.usePreviewPane() || (!oData.message() && (Enums.EventKeyCode.Delete === iKeyCode || Enums.EventKeyCode.A === iKeyCode)))
|
||||
if (Enums.Layout.NoPreview !== oData.layout() || (!oData.message() && (Enums.EventKeyCode.Delete === iKeyCode || Enums.EventKeyCode.A === iKeyCode)))
|
||||
{
|
||||
if (oEvent.ctrlKey && Enums.EventKeyCode.A === iKeyCode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ function MailBoxMessageViewViewModel()
|
|||
this.messagesBodiesDom = oData.messagesBodiesDom;
|
||||
this.useThreads = oData.useThreads;
|
||||
this.replySameFolder = oData.replySameFolder;
|
||||
this.usePreviewPane = oData.usePreviewPane;
|
||||
this.layout = oData.layout;
|
||||
this.isMessageSelected = oData.isMessageSelected;
|
||||
this.messageActiveDom = oData.messageActiveDom;
|
||||
this.messageError = oData.messageError;
|
||||
|
|
@ -44,7 +44,14 @@ function MailBoxMessageViewViewModel()
|
|||
|
||||
// commands
|
||||
this.closeMessage = Utils.createCommand(this, function () {
|
||||
oData.message(null);
|
||||
if (Enums.Layout.NoPreview === oData.layout())
|
||||
{
|
||||
RL.historyBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
oData.message(null);
|
||||
}
|
||||
});
|
||||
|
||||
this.replyCommand = createCommandHelper(Enums.ComposeType.Reply);
|
||||
|
|
@ -247,13 +254,13 @@ MailBoxMessageViewViewModel.prototype.onBuild = function (oDom)
|
|||
iKeyCode = oEvent ? oEvent.keyCode : 0
|
||||
;
|
||||
|
||||
if (0 < iKeyCode && (Enums.EventKeyCode.Backspace === iKeyCode || Enums.EventKeyCode.Esc === iKeyCode) &&
|
||||
if (0 < iKeyCode && (Enums.EventKeyCode.Esc === iKeyCode) &&
|
||||
self.viewModelVisibility() && oData.useKeyboardShortcuts() && !Utils.inFocus() && oData.message())
|
||||
{
|
||||
self.fullScreenMode(false);
|
||||
if (!oData.usePreviewPane())
|
||||
if (Enums.Layout.NoPreview === oData.layout())
|
||||
{
|
||||
oData.message(null);
|
||||
RL.historyBack();
|
||||
}
|
||||
|
||||
bResult = false;
|
||||
|
|
|
|||
|
|
@ -1141,9 +1141,11 @@ class Utils
|
|||
public static function IsRTL($sUtfString)
|
||||
{
|
||||
// \x{0591}-\x{05F4} - Hebrew
|
||||
// \x{FB1D}-\x{FB40} - Hebrew ?
|
||||
// \x{0621}-\x{064A} - Arabic
|
||||
return 0 < (int) preg_match('/[\x{0591}-\x{05F4}\x{FB1D}-\x{FB40}\x{0621}-\x{064A}]/u', $sUtfString);
|
||||
// \x{0600}-\x{068F} - Arabic
|
||||
// \x{0750}-\x{077F} - Arabic
|
||||
// \x{08A0}-\x{08FF} - Arabic
|
||||
// \x{103A0}-\x{103DF} - Old Persian
|
||||
return 0 < (int) preg_match('/[\x{0591}-\x{05F4}\x{0600}-\x{068F}\x{0750}-\x{077F}\x{08A0}-\x{08FF}\x{103A0}-\x{103DF}]/u', $sUtfString);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<!-- <div class="control-group">
|
||||
<div class="controls">
|
||||
<label data-bind="click: function () { openPGP(!openPGP()); }">
|
||||
<i data-bind="css: openPGP() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
Allow OpenPGP (unstable)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<a href="#" target="_blank" class="g-ui-link" data-bind="link: phpInfoLink()">Show PHP information</a>
|
||||
|
|
|
|||
|
|
@ -637,7 +637,7 @@
|
|||
border-radius: 8px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
|
||||
|
||||
/* =============================================================================
|
||||
|
|
@ -1142,7 +1142,7 @@ table {
|
|||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
|
||||
@charset "UTF-8";
|
||||
|
||||
@font-face {
|
||||
|
|
@ -1474,7 +1474,7 @@ table {
|
|||
.icon-mail:before {
|
||||
content: "\e062";
|
||||
}
|
||||
|
||||
|
||||
/** initial setup **/
|
||||
.nano {
|
||||
/*
|
||||
|
|
@ -1591,7 +1591,7 @@ table {
|
|||
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
|
||||
/* Magnific Popup CSS */
|
||||
.mfp-bg {
|
||||
top: 0;
|
||||
|
|
@ -1956,7 +1956,7 @@ img.mfp-img {
|
|||
right: 0;
|
||||
padding-top: 0; }
|
||||
|
||||
|
||||
|
||||
|
||||
/* overlay at start */
|
||||
.mfp-fade.mfp-bg {
|
||||
|
|
@ -2002,7 +2002,7 @@ img.mfp-img {
|
|||
-moz-transform: translateX(50px);
|
||||
transform: translateX(50px);
|
||||
}
|
||||
|
||||
|
||||
.simple-pace {
|
||||
-webkit-pointer-events: none;
|
||||
pointer-events: none;
|
||||
|
|
@ -2073,7 +2073,7 @@ img.mfp-img {
|
|||
@keyframes simple-pace-stripe-animation {
|
||||
0% { transform: none; transform: none; }
|
||||
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
|
||||
}
|
||||
}
|
||||
.inputosaurus-container {
|
||||
background-color:#fff;
|
||||
border:1px solid #bcbec0;
|
||||
|
|
@ -2141,7 +2141,7 @@ img.mfp-img {
|
|||
box-shadow:none;
|
||||
}
|
||||
.inputosaurus-input-hidden { display:none; }
|
||||
|
||||
|
||||
.flag-wrapper {
|
||||
width: 24px;
|
||||
height: 16px;
|
||||
|
|
@ -2182,7 +2182,7 @@ img.mfp-img {
|
|||
.flag.flag-pt-br {background-position: -192px -11px}
|
||||
|
||||
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
.clearfix {
|
||||
*zoom: 1;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
(function (window, $, ko, crossroads, hasher, _) {
|
||||
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
(function (window, $, ko, crossroads, hasher, _) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
@ -70,14 +70,14 @@ var
|
|||
$document = $(window.document),
|
||||
|
||||
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
||||
;
|
||||
;
|
||||
/*jshint onevar: false*/
|
||||
/**
|
||||
* @type {?AdminApp}
|
||||
*/
|
||||
var RL = null;
|
||||
/*jshint onevar: true*/
|
||||
|
||||
|
||||
/**
|
||||
* @type {?}
|
||||
*/
|
||||
|
|
@ -164,7 +164,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
|
|||
return oType && 'application/pdf' === oType.type;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Consts.Defaults = {};
|
||||
Consts.Values = {};
|
||||
Consts.DataImages = {};
|
||||
|
|
@ -282,7 +282,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
|
|||
* @type {string}
|
||||
*/
|
||||
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
|
|
@ -519,8 +519,16 @@ Enums.InterfaceAnimation = {
|
|||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
Enums.ContactScopeType = {
|
||||
Enums.Layout = {
|
||||
'NoPreview': 0,
|
||||
'SidePreview': 1,
|
||||
'BottomPreview': 2
|
||||
};
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
Enums.ContactScopeType = {
|
||||
'Default': 0,
|
||||
'ShareAll': 2
|
||||
};
|
||||
|
|
@ -618,7 +626,7 @@ Enums.Notification = {
|
|||
'UnknownNotification': 999,
|
||||
'UnknownError': 999
|
||||
};
|
||||
|
||||
|
||||
Utils.trim = $.trim;
|
||||
Utils.inArray = $.inArray;
|
||||
Utils.isArray = _.isArray;
|
||||
|
|
@ -1370,6 +1378,7 @@ Utils.initDataConstructorBySettings = function (oData)
|
|||
oData.useThreads = ko.observable(true);
|
||||
oData.replySameFolder = ko.observable(true);
|
||||
oData.usePreviewPane = ko.observable(true);
|
||||
oData.layout = ko.observable(Enums.Layout.SidePreview);
|
||||
oData.useCheckboxesInList = ko.observable(true);
|
||||
|
||||
oData.interfaceAnimation.subscribe(function (sValue) {
|
||||
|
|
@ -2184,7 +2193,7 @@ Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
|
|||
return aResult;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// Base64 encode / decode
|
||||
// http://www.webtoolkit.info/
|
||||
|
||||
|
|
@ -2347,7 +2356,7 @@ Base64 = {
|
|||
}
|
||||
};
|
||||
|
||||
/*jslint bitwise: false*/
|
||||
/*jslint bitwise: false*/
|
||||
ko.bindingHandlers.tooltip = {
|
||||
'init': function (oElement, fValueAccessor) {
|
||||
if (!Globals.bMobileDevice)
|
||||
|
|
@ -2969,7 +2978,7 @@ ko.observable.fn.validateFunc = function (fFunc)
|
|||
return this;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -3096,6 +3105,14 @@ LinkBuilder.prototype.inbox = function ()
|
|||
return this.sBase + 'mailbox/Inbox';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
LinkBuilder.prototype.messagePreview = function ()
|
||||
{
|
||||
return this.sBase + 'mailbox/message-preview';
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string=} sScreenName
|
||||
* @return {string}
|
||||
|
|
@ -3259,7 +3276,7 @@ LinkBuilder.prototype.socialFacebook = function ()
|
|||
{
|
||||
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
|
|
@ -3353,7 +3370,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
|
|||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -3427,7 +3444,7 @@ CookieDriver.prototype.get = function (sKey)
|
|||
|
||||
return mResult;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -3499,7 +3516,7 @@ LocalStorageDriver.prototype.get = function (sKey)
|
|||
|
||||
return mResult;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -3542,7 +3559,7 @@ LocalStorage.prototype.get = function (iKey)
|
|||
{
|
||||
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -3555,7 +3572,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
|
|||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string=} sPosition = ''
|
||||
* @param {string=} sTemplate = ''
|
||||
|
|
@ -3615,7 +3632,7 @@ KnoinAbstractViewModel.prototype.viewModelPosition = function ()
|
|||
KnoinAbstractViewModel.prototype.cancelCommand = KnoinAbstractViewModel.prototype.closeCommand = function ()
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} sScreenName
|
||||
* @param {?=} aViewModels = []
|
||||
|
|
@ -3691,7 +3708,7 @@ KnoinAbstractScreen.prototype.__start = function ()
|
|||
this.oCross = oRoute;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -4082,7 +4099,7 @@ Knoin.prototype.bootstart = function ()
|
|||
};
|
||||
|
||||
kn = new Knoin();
|
||||
|
||||
|
||||
/**
|
||||
* @param {string=} sEmail
|
||||
* @param {string=} sName
|
||||
|
|
@ -4446,7 +4463,7 @@ EmailModel.prototype.inputoTagLine = function ()
|
|||
{
|
||||
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -4666,7 +4683,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
|
|||
this.smtpAuth(true);
|
||||
this.whiteList('');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -4803,7 +4820,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
|
|||
return bResult;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -4919,7 +4936,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
|
|||
{
|
||||
var sValue = this.key();
|
||||
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -4993,7 +5010,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
|
|||
RL.data().mainLanguage(sLang);
|
||||
this.cancelCommand();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -5111,7 +5128,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -5198,7 +5215,7 @@ AdminLoginViewModel.prototype.onHide = function ()
|
|||
{
|
||||
this.loginFocus(false);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {?} oScreen
|
||||
*
|
||||
|
|
@ -5220,7 +5237,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
|
|||
{
|
||||
return '#/' + sRoute;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -5242,7 +5259,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
|
|||
RL.remote().adminLogout(function () {
|
||||
RL.loginAndLogoutReload();
|
||||
});
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -5342,7 +5359,7 @@ AdminGeneral.prototype.selectLanguage = function ()
|
|||
{
|
||||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -5394,7 +5411,7 @@ AdminLogin.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -5463,7 +5480,7 @@ AdminBranding.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -5683,7 +5700,7 @@ AdminContacts.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -5772,7 +5789,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
|
|||
{
|
||||
RL.reloadDomainList();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -5860,7 +5877,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
|
|||
{
|
||||
return RL.link().phpInfo();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -5976,7 +5993,7 @@ AdminSocial.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -6073,7 +6090,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
|
|||
|
||||
RL.reloadPluginList();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -6177,7 +6194,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
|
|||
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -6228,7 +6245,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
|
|||
{
|
||||
var oDate = moment.unix(this.licenseExpired());
|
||||
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -6278,6 +6295,7 @@ AbstractData.prototype.populateDataOnStart = function()
|
|||
this.useThreads(!!RL.settingsGet('UseThreads'));
|
||||
this.replySameFolder(!!RL.settingsGet('ReplySameFolder'));
|
||||
this.usePreviewPane(!!RL.settingsGet('UsePreviewPane'));
|
||||
this.layout(!!RL.settingsGet('UsePreviewPane') ? Enums.Layout.SidePreview : Enums.Layout.NoPreview); // TODO
|
||||
this.useCheckboxesInList(!!RL.settingsGet('UseCheckboxesInList'));
|
||||
|
||||
this.facebookEnable(!!RL.settingsGet('AllowFacebookSocial'));
|
||||
|
|
@ -6297,7 +6315,7 @@ AbstractData.prototype.populateDataOnStart = function()
|
|||
|
||||
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractData
|
||||
|
|
@ -6331,7 +6349,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
|
|||
AdminDataStorage.prototype.populateDataOnStart = function()
|
||||
{
|
||||
AbstractData.prototype.populateDataOnStart.call(this);
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -6605,7 +6623,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
|
|||
'Version': sVersion
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractAjaxRemoteStorage
|
||||
|
|
@ -6849,7 +6867,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
|
|||
{
|
||||
this.defaultRequest(fCallback, 'AdminPing');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -6915,7 +6933,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
|
|||
{
|
||||
this.oEmailsPicsHashes = oData;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractCacheStorage
|
||||
|
|
@ -6926,7 +6944,7 @@ function AdminCacheStorage()
|
|||
}
|
||||
|
||||
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array} aViewModels
|
||||
* @constructor
|
||||
|
|
@ -7103,7 +7121,7 @@ AbstractSettings.prototype.routes = function ()
|
|||
['', oRules]
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractScreen
|
||||
|
|
@ -7118,7 +7136,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
|
|||
AdminLoginScreen.prototype.onShow = function ()
|
||||
{
|
||||
RL.setTitle('');
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractSettings
|
||||
|
|
@ -7138,7 +7156,7 @@ AdminSettingsScreen.prototype.onShow = function ()
|
|||
// AbstractSettings.prototype.onShow.call(this);
|
||||
|
||||
RL.setTitle('');
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractBoot
|
||||
|
|
@ -7343,6 +7361,11 @@ AbstractApp.prototype.loginAndLogoutReload = function (bLogout, bClose)
|
|||
}
|
||||
};
|
||||
|
||||
AbstractApp.prototype.historyBack = function ()
|
||||
{
|
||||
window.history.back();
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sQuery
|
||||
* @param {Function} fCallback
|
||||
|
|
@ -7449,7 +7472,7 @@ AbstractApp.prototype.bootstart = function ()
|
|||
|
||||
ssm.ready();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractApp
|
||||
|
|
@ -7696,7 +7719,7 @@ AdminApp.prototype.bootstart = function ()
|
|||
* @type {AdminApp}
|
||||
*/
|
||||
RL = new AdminApp();
|
||||
|
||||
|
||||
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
||||
|
||||
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
|
||||
|
|
@ -7743,9 +7766,9 @@ window['__RLBOOT'] = function (fCall) {
|
|||
window['__RLBOOT'] = null;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
if (window.SimplePace) {
|
||||
window.SimplePace.add(10);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}(window, jQuery, ko, crossroads, hasher, _));
|
||||
6
rainloop/v/0.0.0/static/js/admin.min.js
vendored
6
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible) {
|
||||
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
@ -70,14 +70,14 @@ var
|
|||
$document = $(window.document),
|
||||
|
||||
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
||||
;
|
||||
;
|
||||
/*jshint onevar: false*/
|
||||
/**
|
||||
* @type {?RainLoopApp}
|
||||
*/
|
||||
var RL = null;
|
||||
/*jshint onevar: true*/
|
||||
|
||||
|
||||
/**
|
||||
* @type {?}
|
||||
*/
|
||||
|
|
@ -164,7 +164,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
|
|||
return oType && 'application/pdf' === oType.type;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Consts.Defaults = {};
|
||||
Consts.Values = {};
|
||||
Consts.DataImages = {};
|
||||
|
|
@ -282,7 +282,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
|
|||
* @type {string}
|
||||
*/
|
||||
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
|
|
@ -519,8 +519,16 @@ Enums.InterfaceAnimation = {
|
|||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
Enums.ContactScopeType = {
|
||||
Enums.Layout = {
|
||||
'NoPreview': 0,
|
||||
'SidePreview': 1,
|
||||
'BottomPreview': 2
|
||||
};
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
Enums.ContactScopeType = {
|
||||
'Default': 0,
|
||||
'ShareAll': 2
|
||||
};
|
||||
|
|
@ -618,7 +626,7 @@ Enums.Notification = {
|
|||
'UnknownNotification': 999,
|
||||
'UnknownError': 999
|
||||
};
|
||||
|
||||
|
||||
Utils.trim = $.trim;
|
||||
Utils.inArray = $.inArray;
|
||||
Utils.isArray = _.isArray;
|
||||
|
|
@ -1370,6 +1378,7 @@ Utils.initDataConstructorBySettings = function (oData)
|
|||
oData.useThreads = ko.observable(true);
|
||||
oData.replySameFolder = ko.observable(true);
|
||||
oData.usePreviewPane = ko.observable(true);
|
||||
oData.layout = ko.observable(Enums.Layout.SidePreview);
|
||||
oData.useCheckboxesInList = ko.observable(true);
|
||||
|
||||
oData.interfaceAnimation.subscribe(function (sValue) {
|
||||
|
|
@ -2184,7 +2193,7 @@ Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
|
|||
return aResult;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// Base64 encode / decode
|
||||
// http://www.webtoolkit.info/
|
||||
|
||||
|
|
@ -2347,7 +2356,7 @@ Base64 = {
|
|||
}
|
||||
};
|
||||
|
||||
/*jslint bitwise: false*/
|
||||
/*jslint bitwise: false*/
|
||||
ko.bindingHandlers.tooltip = {
|
||||
'init': function (oElement, fValueAccessor) {
|
||||
if (!Globals.bMobileDevice)
|
||||
|
|
@ -2969,7 +2978,7 @@ ko.observable.fn.validateFunc = function (fFunc)
|
|||
return this;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -3096,6 +3105,14 @@ LinkBuilder.prototype.inbox = function ()
|
|||
return this.sBase + 'mailbox/Inbox';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
LinkBuilder.prototype.messagePreview = function ()
|
||||
{
|
||||
return this.sBase + 'mailbox/message-preview';
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string=} sScreenName
|
||||
* @return {string}
|
||||
|
|
@ -3259,7 +3276,7 @@ LinkBuilder.prototype.socialFacebook = function ()
|
|||
{
|
||||
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
|
|
@ -3353,7 +3370,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
|
|||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -4249,7 +4266,7 @@ HtmlEditor.htmlFunctions = {
|
|||
}, this), this.toolbar);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {koProperty} oKoList
|
||||
|
|
@ -4790,7 +4807,7 @@ Selector.prototype.on = function (sEventName, fCallback)
|
|||
{
|
||||
this.oCallbacks[sEventName] = fCallback;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -4864,7 +4881,7 @@ CookieDriver.prototype.get = function (sKey)
|
|||
|
||||
return mResult;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -4936,7 +4953,7 @@ LocalStorageDriver.prototype.get = function (sKey)
|
|||
|
||||
return mResult;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -4979,7 +4996,7 @@ LocalStorage.prototype.get = function (iKey)
|
|||
{
|
||||
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -4992,7 +5009,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
|
|||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string=} sPosition = ''
|
||||
* @param {string=} sTemplate = ''
|
||||
|
|
@ -5052,7 +5069,7 @@ KnoinAbstractViewModel.prototype.viewModelPosition = function ()
|
|||
KnoinAbstractViewModel.prototype.cancelCommand = KnoinAbstractViewModel.prototype.closeCommand = function ()
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} sScreenName
|
||||
* @param {?=} aViewModels = []
|
||||
|
|
@ -5128,7 +5145,7 @@ KnoinAbstractScreen.prototype.__start = function ()
|
|||
this.oCross = oRoute;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -5519,7 +5536,7 @@ Knoin.prototype.bootstart = function ()
|
|||
};
|
||||
|
||||
kn = new Knoin();
|
||||
|
||||
|
||||
/**
|
||||
* @param {string=} sEmail
|
||||
* @param {string=} sName
|
||||
|
|
@ -5883,7 +5900,7 @@ EmailModel.prototype.inputoTagLine = function ()
|
|||
{
|
||||
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -6005,7 +6022,7 @@ ContactModel.prototype.lineAsCcc = function ()
|
|||
|
||||
return aResult.join(' ');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number=} iType = Enums.ContactPropertyType.Unknown
|
||||
* @param {string=} sValue = ''
|
||||
|
|
@ -6027,7 +6044,7 @@ function ContactPropertyModel(iType, sValue, bFocused, sPlaceholder)
|
|||
return sPlaceholder ? Utils.i18n(sPlaceholder) : '';
|
||||
}, this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -6263,7 +6280,7 @@ AttachmentModel.prototype.iconClass = function ()
|
|||
|
||||
return sClass;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} sId
|
||||
|
|
@ -6324,7 +6341,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
|
|||
}
|
||||
|
||||
return bResult;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -7302,7 +7319,7 @@ MessageModel.prototype.showInternalImages = function (bLazy)
|
|||
Utils.windowResize(500);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -7636,7 +7653,7 @@ FolderModel.prototype.printableFullName = function ()
|
|||
{
|
||||
return this.fullName.split(this.delimiter).join(' / ');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} sEmail
|
||||
* @param {boolean=} bCanBeDelete = true
|
||||
|
|
@ -7657,7 +7674,7 @@ AccountModel.prototype.email = '';
|
|||
AccountModel.prototype.changeAccountLink = function ()
|
||||
{
|
||||
return RL.link().change(this.email);
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @param {string} sId
|
||||
* @param {string} sEmail
|
||||
|
|
@ -7693,7 +7710,7 @@ IdentityModel.prototype.formattedNameForEmail = function ()
|
|||
var sName = this.name();
|
||||
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -7803,7 +7820,7 @@ PopupsFolderClearViewModel.prototype.onBuild = function ()
|
|||
return bResult;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -7927,7 +7944,7 @@ PopupsFolderCreateViewModel.prototype.onBuild = function ()
|
|||
return bResult;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -8046,7 +8063,7 @@ PopupsFolderSystemViewModel.prototype.onBuild = function ()
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -9494,7 +9511,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
|
|||
this.resizer(!this.resizer());
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -10134,7 +10151,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
|
|||
oItem.checked(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -10278,7 +10295,7 @@ PopupsAdvancedSearchViewModel.prototype.onBuild = function ()
|
|||
return bResult;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -10406,7 +10423,7 @@ PopupsAddAccountViewModel.prototype.onBuild = function ()
|
|||
return bResult;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -10568,7 +10585,7 @@ PopupsIdentityViewModel.prototype.onBuild = function ()
|
|||
return bResult;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -10642,7 +10659,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
|
|||
RL.data().mainLanguage(sLang);
|
||||
this.cancelCommand();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -10760,7 +10777,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -10823,7 +10840,7 @@ PopupsPgpKey.prototype.onShow = function (bPrivate, fCallback)
|
|||
this.bPrivate = bPrivate;
|
||||
this.fCallback = fCallback;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -11095,7 +11112,7 @@ LoginViewModel.prototype.selectLanguage = function ()
|
|||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -11162,7 +11179,7 @@ AbstractSystemDropDownViewModel.prototype.logoutClick = function ()
|
|||
|
||||
RL.loginAndLogoutReload(true, RL.settingsGet('ParentEmail') && 0 < RL.settingsGet('ParentEmail').length);
|
||||
});
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractSystemDropDownViewModel
|
||||
|
|
@ -11174,7 +11191,7 @@ function MailBoxSystemDropDownViewModel()
|
|||
}
|
||||
|
||||
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractSystemDropDownViewModel
|
||||
|
|
@ -11186,7 +11203,7 @@ function SettingsSystemDropDownViewModel()
|
|||
}
|
||||
|
||||
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -11301,7 +11318,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
|
|||
kn.showScreenPopup(PopupsContactsViewModel);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -11350,7 +11367,7 @@ function MailBoxMessageListViewModel()
|
|||
this.dragOverBodyArea = ko.observable(null);
|
||||
|
||||
this.messageListItemTemplate = ko.computed(function () {
|
||||
return oData.usePreviewPane() ?
|
||||
return Enums.Layout.NoPreview !== oData.layout() ?
|
||||
'MailMessageListItem' : 'MailMessageListItemNoPreviewPane';
|
||||
});
|
||||
|
||||
|
|
@ -11465,6 +11482,11 @@ function MailBoxMessageListViewModel()
|
|||
this.selector.on('onItemSelect', _.bind(function (oMessage) {
|
||||
if (oMessage)
|
||||
{
|
||||
if (Enums.Layout.NoPreview === oData.layout())
|
||||
{
|
||||
kn.setHash(RL.link().messagePreview(), true);
|
||||
}
|
||||
|
||||
oData.message(oData.staticMessageList.populateByMessageListItem(oMessage));
|
||||
this.populateMessageBody(oData.message());
|
||||
}
|
||||
|
|
@ -12025,7 +12047,7 @@ MailBoxMessageListViewModel.prototype.onBuild = function (oDom)
|
|||
|
||||
if (oEvent && self.viewModelVisibility() && oData.useKeyboardShortcuts() && !RL.popupVisibility() && !oData.messageFullScreenMode() && !Utils.inFocus())
|
||||
{
|
||||
if (oData.usePreviewPane() || (!oData.message() && (Enums.EventKeyCode.Delete === iKeyCode || Enums.EventKeyCode.A === iKeyCode)))
|
||||
if (Enums.Layout.NoPreview !== oData.layout() || (!oData.message() && (Enums.EventKeyCode.Delete === iKeyCode || Enums.EventKeyCode.A === iKeyCode)))
|
||||
{
|
||||
if (oEvent.ctrlKey && Enums.EventKeyCode.A === iKeyCode)
|
||||
{
|
||||
|
|
@ -12215,7 +12237,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
|
|||
;
|
||||
|
||||
return !!oJua;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -12243,7 +12265,7 @@ function MailBoxMessageViewViewModel()
|
|||
this.messagesBodiesDom = oData.messagesBodiesDom;
|
||||
this.useThreads = oData.useThreads;
|
||||
this.replySameFolder = oData.replySameFolder;
|
||||
this.usePreviewPane = oData.usePreviewPane;
|
||||
this.layout = oData.layout;
|
||||
this.isMessageSelected = oData.isMessageSelected;
|
||||
this.messageActiveDom = oData.messageActiveDom;
|
||||
this.messageError = oData.messageError;
|
||||
|
|
@ -12260,7 +12282,14 @@ function MailBoxMessageViewViewModel()
|
|||
|
||||
// commands
|
||||
this.closeMessage = Utils.createCommand(this, function () {
|
||||
oData.message(null);
|
||||
if (Enums.Layout.NoPreview === oData.layout())
|
||||
{
|
||||
RL.historyBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
oData.message(null);
|
||||
}
|
||||
});
|
||||
|
||||
this.replyCommand = createCommandHelper(Enums.ComposeType.Reply);
|
||||
|
|
@ -12463,13 +12492,13 @@ MailBoxMessageViewViewModel.prototype.onBuild = function (oDom)
|
|||
iKeyCode = oEvent ? oEvent.keyCode : 0
|
||||
;
|
||||
|
||||
if (0 < iKeyCode && (Enums.EventKeyCode.Backspace === iKeyCode || Enums.EventKeyCode.Esc === iKeyCode) &&
|
||||
if (0 < iKeyCode && (Enums.EventKeyCode.Esc === iKeyCode) &&
|
||||
self.viewModelVisibility() && oData.useKeyboardShortcuts() && !Utils.inFocus() && oData.message())
|
||||
{
|
||||
self.fullScreenMode(false);
|
||||
if (!oData.usePreviewPane())
|
||||
if (Enums.Layout.NoPreview === oData.layout())
|
||||
{
|
||||
oData.message(null);
|
||||
RL.historyBack();
|
||||
}
|
||||
|
||||
bResult = false;
|
||||
|
|
@ -12596,7 +12625,7 @@ MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
|
|||
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {?} oScreen
|
||||
*
|
||||
|
|
@ -12623,7 +12652,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
|
|||
{
|
||||
kn.setHash(RL.link().inbox());
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
|
@ -12646,7 +12675,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
|
|||
{
|
||||
kn.setHash(RL.link().inbox());
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -12665,6 +12694,7 @@ function SettingsGeneral()
|
|||
this.useThreads = oData.useThreads;
|
||||
this.replySameFolder = oData.replySameFolder;
|
||||
this.usePreviewPane = oData.usePreviewPane;
|
||||
this.layout = oData.layout;
|
||||
this.useCheckboxesInList = oData.useCheckboxesInList;
|
||||
this.allowLanguagesOnSettings = oData.allowLanguagesOnSettings;
|
||||
|
||||
|
|
@ -12781,6 +12811,15 @@ SettingsGeneral.prototype.onBuild = function ()
|
|||
'UsePreviewPane': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
oData.layout.subscribe(function (nValue) {
|
||||
|
||||
oData.messageList([]);
|
||||
|
||||
RL.remote().saveSettings(Utils.emptyFunction, {
|
||||
'Layout': nValue
|
||||
});
|
||||
});
|
||||
|
||||
oData.useCheckboxesInList.subscribe(function (bValue) {
|
||||
RL.remote().saveSettings(Utils.emptyFunction, {
|
||||
|
|
@ -12800,7 +12839,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
|
|||
{
|
||||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -12838,7 +12877,7 @@ SettingsContacts.prototype.onShow = function ()
|
|||
{
|
||||
this.showPassword(false);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -12904,7 +12943,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -12962,7 +13001,7 @@ SettingsIdentity.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -13090,7 +13129,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
|
|||
});
|
||||
|
||||
}, 50);
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -13157,7 +13196,7 @@ function SettingsSocialScreen()
|
|||
}
|
||||
|
||||
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -13221,7 +13260,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
|
|||
this.passwordUpdateError(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -13416,7 +13455,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
|
|||
|
||||
oFolder.subScribed(false);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -13633,7 +13672,7 @@ SettingsThemes.prototype.initCustomThemeUploader = function ()
|
|||
return false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -13683,6 +13722,7 @@ AbstractData.prototype.populateDataOnStart = function()
|
|||
this.useThreads(!!RL.settingsGet('UseThreads'));
|
||||
this.replySameFolder(!!RL.settingsGet('ReplySameFolder'));
|
||||
this.usePreviewPane(!!RL.settingsGet('UsePreviewPane'));
|
||||
this.layout(!!RL.settingsGet('UsePreviewPane') ? Enums.Layout.SidePreview : Enums.Layout.NoPreview); // TODO
|
||||
this.useCheckboxesInList(!!RL.settingsGet('UseCheckboxesInList'));
|
||||
|
||||
this.facebookEnable(!!RL.settingsGet('AllowFacebookSocial'));
|
||||
|
|
@ -13702,7 +13742,7 @@ AbstractData.prototype.populateDataOnStart = function()
|
|||
|
||||
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractData
|
||||
|
|
@ -14724,7 +14764,7 @@ WebMailDataStorage.prototype.setMessageList = function (oData, bCached)
|
|||
));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -14998,7 +15038,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
|
|||
'Version': sVersion
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractAjaxRemoteStorage
|
||||
|
|
@ -15698,7 +15738,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
|
|||
this.defaultRequest(fCallback, 'SocialUsers');
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -15764,7 +15804,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
|
|||
{
|
||||
this.oEmailsPicsHashes = oData;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractCacheStorage
|
||||
|
|
@ -16082,7 +16122,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
|
|||
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array} aViewModels
|
||||
* @constructor
|
||||
|
|
@ -16259,7 +16299,7 @@ AbstractSettings.prototype.routes = function ()
|
|||
['', oRules]
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractScreen
|
||||
|
|
@ -16274,7 +16314,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
|
|||
LoginScreen.prototype.onShow = function ()
|
||||
{
|
||||
RL.setTitle('');
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractScreen
|
||||
|
|
@ -16318,17 +16358,27 @@ MailBoxScreen.prototype.onShow = function ()
|
|||
* @param {string} sFolderHash
|
||||
* @param {number} iPage
|
||||
* @param {string} sSearch
|
||||
* @param {boolean=} bPreview = false
|
||||
*/
|
||||
MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
|
||||
MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch, bPreview)
|
||||
{
|
||||
var
|
||||
oData = RL.data(),
|
||||
sFolderFullNameRaw = RL.cache().getFolderFullNameRaw(sFolderHash),
|
||||
oFolder = RL.cache().getFolderFromCacheList(sFolderFullNameRaw)
|
||||
;
|
||||
|
||||
if (oFolder)
|
||||
if (Utils.isUnd(bPreview) ? false : !!bPreview)
|
||||
{
|
||||
if (!RL.data().usePreviewPane() && !RL.data().message())
|
||||
{
|
||||
RL.historyBack();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var
|
||||
oData = RL.data(),
|
||||
sFolderFullNameRaw = RL.cache().getFolderFullNameRaw(sFolderHash),
|
||||
oFolder = RL.cache().getFolderFromCacheList(sFolderFullNameRaw)
|
||||
;
|
||||
|
||||
if (oFolder)
|
||||
{
|
||||
oData
|
||||
.currentFolder(oFolder)
|
||||
.messageListPage(iPage)
|
||||
|
|
@ -16338,10 +16388,12 @@ MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
|
|||
if (!oData.usePreviewPane() && oData.message())
|
||||
{
|
||||
oData.message(null);
|
||||
oData.messageFullScreenMode(false);
|
||||
}
|
||||
|
||||
RL.reloadMessageList();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
MailBoxScreen.prototype.onStart = function ()
|
||||
|
|
@ -16405,6 +16457,9 @@ MailBoxScreen.prototype.onStart = function ()
|
|||
MailBoxScreen.prototype.routes = function ()
|
||||
{
|
||||
var
|
||||
fNormP = function () {
|
||||
return ['Inbox', 1, '', true];
|
||||
},
|
||||
fNormS = function (oRequest, oVals) {
|
||||
oVals[0] = Utils.pString(oVals[0]);
|
||||
oVals[1] = Utils.pInt(oVals[1]);
|
||||
|
|
@ -16417,7 +16472,7 @@ MailBoxScreen.prototype.routes = function ()
|
|||
oVals[1] = 1;
|
||||
}
|
||||
|
||||
return [decodeURI(oVals[0]), oVals[1], decodeURI(oVals[2])];
|
||||
return [decodeURI(oVals[0]), oVals[1], decodeURI(oVals[2]), false];
|
||||
},
|
||||
fNormD = function (oRequest, oVals) {
|
||||
oVals[0] = Utils.pString(oVals[0]);
|
||||
|
|
@ -16428,7 +16483,7 @@ MailBoxScreen.prototype.routes = function ()
|
|||
oVals[0] = 'Inbox';
|
||||
}
|
||||
|
||||
return [decodeURI(oVals[0]), 1, decodeURI(oVals[1])];
|
||||
return [decodeURI(oVals[0]), 1, decodeURI(oVals[1]), false];
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -16436,10 +16491,11 @@ MailBoxScreen.prototype.routes = function ()
|
|||
[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)\/(.+)\/?$/, {'normalize_': fNormS}],
|
||||
[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)$/, {'normalize_': fNormS}],
|
||||
[/^([a-zA-Z0-9]+)\/(.+)\/?$/, {'normalize_': fNormD}],
|
||||
[/^message-preview$/, {'normalize_': fNormP}],
|
||||
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractSettings
|
||||
|
|
@ -16467,7 +16523,7 @@ SettingsScreen.prototype.onShow = function ()
|
|||
|
||||
RL.setTitle(this.sSettingsTitle);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractBoot
|
||||
|
|
@ -16672,6 +16728,11 @@ AbstractApp.prototype.loginAndLogoutReload = function (bLogout, bClose)
|
|||
}
|
||||
};
|
||||
|
||||
AbstractApp.prototype.historyBack = function ()
|
||||
{
|
||||
window.history.back();
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sQuery
|
||||
* @param {Function} fCallback
|
||||
|
|
@ -16778,7 +16839,7 @@ AbstractApp.prototype.bootstart = function ()
|
|||
|
||||
ssm.ready();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractApp
|
||||
|
|
@ -17724,7 +17785,7 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
* @type {RainLoopApp}
|
||||
*/
|
||||
RL = new RainLoopApp();
|
||||
|
||||
|
||||
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
||||
|
||||
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
|
||||
|
|
@ -17771,9 +17832,9 @@ window['__RLBOOT'] = function (fCall) {
|
|||
window['__RLBOOT'] = null;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
if (window.SimplePace) {
|
||||
window.SimplePace.add(10);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible));
|
||||
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue