mailto handler (research) (#136)

This commit is contained in:
RainLoop Team 2014-04-16 20:08:37 +04:00
parent 706d4408e7
commit 818bf9fb40
11 changed files with 316 additions and 206 deletions

View file

@ -1016,6 +1016,15 @@ RainLoopApp.prototype.bootstart = function ()
window.SimplePace.sleep(); window.SimplePace.sleep();
} }
// if (RL.settingsGet('MailToEmail'))
// {
// if (window.postMessage)
// {
// window.console.log('railoop/mailto/auth/' + RL.settingsGet('MailToEmail'), '' + window.location);
//// $.postMessage('railoop/mailto/auth/' + RL.settingsGet('MailToEmail'), '' + window.location);
// }
// }
if (!!RL.settingsGet('Auth')) if (!!RL.settingsGet('Auth'))
{ {
this.setTitle(Utils.i18n('TITLES/LOADING')); this.setTitle(Utils.i18n('TITLES/LOADING'));
@ -1098,6 +1107,17 @@ RainLoopApp.prototype.bootstart = function ()
}, 2000); }, 2000);
// if (window.navigator && Utils.isFunc(window.navigator.registerProtocolHandler))
// {
// window.navigator.registerProtocolHandler('mailto',
// window.location.protocol + '//' + window.location.host + window.location.pathname + '?mailto&to=%s',
// '' + (RL.settingsGet('Title') || 'RainLoop'));
// }
//
// $.receiveMessage(function () {
// window.console.log(arguments);
// }, '' + window.location);
Plugins.runHook('rl-start-user-screens'); Plugins.runHook('rl-start-user-screens');
RL.pub('rl.bootstart-user-screens'); RL.pub('rl.bootstart-user-screens');
} }

View file

@ -283,6 +283,26 @@ class Utils
return !\preg_match('/[^\x09\x10\x13\x0A\x0D\x20-\x7E]/', $sValue); return !\preg_match('/[^\x09\x10\x13\x0A\x0D\x20-\x7E]/', $sValue);
} }
/**
* @param string $sValue
*
* @return string
*/
public static function StrToLowerIfAscii($sValue)
{
return \MailSo\Base\Utils::IsAscii($sValue) ? \strtolower($sValue) : $sValue;
}
/**
* @param string $sValue
*
* @return string
*/
public static function StrToUpperIfAscii($sValue)
{
return \MailSo\Base\Utils::IsAscii($sValue) ? \strtoupper($sValue) : $sValue;
}
/** /**
* @param string $sValue * @param string $sValue
* *

View file

@ -12,6 +12,7 @@ class Actions
{ {
const AUTH_TOKEN_KEY = 'rlauth'; const AUTH_TOKEN_KEY = 'rlauth';
const AUTH_SIGN_ME_TOKEN_KEY = 'rlsmauth'; const AUTH_SIGN_ME_TOKEN_KEY = 'rlsmauth';
const AUTH_MAILTO_TOKEN_KEY = 'rlmailtoauth';
const AUTH_SPEC_TOKEN_KEY = 'rlspecauth'; const AUTH_SPEC_TOKEN_KEY = 'rlspecauth';
const AUTH_ADMIN_TOKEN_KEY = 'rlaauth'; const AUTH_ADMIN_TOKEN_KEY = 'rlaauth';
const AUTH_LAST_ERROR = 'rllasterrorcode'; const AUTH_LAST_ERROR = 'rllasterrorcode';
@ -819,6 +820,22 @@ class Actions
return $bResult; return $bResult;
} }
/**
* @param string $sTo
*/
public function SetMailtoRequest($sTo)
{
if (!empty($sTo))
{
\RainLoop\Utils::SetCookie(self::AUTH_MAILTO_TOKEN_KEY,
\RainLoop\Utils::EncodeKeyValues(array(
'Time' => microtime(true),
'MailTo' => 'MailTo',
'To' => $sTo
)), 0, '/', null, null, true);
}
}
/** /**
* @param string $sEmail * @param string $sEmail
@ -932,6 +949,7 @@ class Actions
'Auth' => false, 'Auth' => false,
'AccountHash' => '', 'AccountHash' => '',
'AuthAccountHash' => '', 'AuthAccountHash' => '',
'MailToEmail' => '',
'Email' => '', 'Email' => '',
'Title' => $oConfig->Get('webmail', 'title', ''), 'Title' => $oConfig->Get('webmail', 'title', ''),
'LoadingDescription' => $oConfig->Get('webmail', 'loading_description', ''), 'LoadingDescription' => $oConfig->Get('webmail', 'loading_description', ''),
@ -972,6 +990,18 @@ class Actions
$oSettings = null; $oSettings = null;
if (!$bAdmin) if (!$bAdmin)
{ {
$sToken = \RainLoop\Utils::GetCookie(self::AUTH_MAILTO_TOKEN_KEY, null);
if (null !== $sToken)
{
\RainLoop\Utils::ClearCookie(self::AUTH_MAILTO_TOKEN_KEY);
$mMailToData = \RainLoop\Utils::DecodeKeyValues($sToken);
if (\is_array($mMailToData) && !empty($mMailToData['MailTo']) && 'MailTo' === $mMailToData['MailTo'] &&
!empty($mMailToData['To']))
{
$aResult['MailToEmail'] = $mMailToData['To'];
}
}
$oAccount = $this->getAccountFromToken(false); $oAccount = $this->getAccountFromToken(false);
if ($oAccount instanceof \RainLoop\Account) if ($oAccount instanceof \RainLoop\Account)
{ {

View file

@ -154,7 +154,7 @@ class Service
return $this; return $this;
} }
if (0 < \count($aPaths) && !empty($aPaths[0]) && !$bAdmin) if (0 < \count($aPaths) && !empty($aPaths[0]) && !$bAdmin && 'index' !== $aPaths[0])
{ {
$sMethodName = 'Service'.$aPaths[0]; $sMethodName = 'Service'.$aPaths[0];
if (\method_exists($this->oServiceActions, $sMethodName) && if (\method_exists($this->oServiceActions, $sMethodName) &&

View file

@ -797,6 +797,26 @@ class ServiceActions
return ''; return '';
} }
/**
* @return string
*/
public function ServiceMailto()
{
$sTo = \trim($this->oHttp->GetQuery('to', ''));
if (!empty($sTo))
{
if (preg_match('/^mailto:/i', $sTo))
{
$sTo = \substr($sTo, 7);
}
$this->oActions->SetMailtoRequest(\MailSo\Base\Utils::StrToLowerIfAscii($sTo));
}
$this->oActions->Location('./');
return '';
}
/** /**
* @return string * @return string

View file

@ -637,7 +637,7 @@
border-radius: 8px; border-radius: 8px;
} }
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */ /*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
/* ============================================================================= /* =============================================================================
@ -1142,7 +1142,7 @@ table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
} }
@charset "UTF-8"; @charset "UTF-8";
@font-face { @font-face {
@ -1483,7 +1483,7 @@ table {
.icon-filter:before { .icon-filter:before {
content: "\e063"; content: "\e063";
} }
/** initial setup **/ /** initial setup **/
.nano { .nano {
/* /*
@ -1600,7 +1600,7 @@ table {
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 { .nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
background-color: rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.4);
} }
/* Magnific Popup CSS */ /* Magnific Popup CSS */
.mfp-bg { .mfp-bg {
top: 0; top: 0;
@ -1965,7 +1965,7 @@ img.mfp-img {
right: 0; right: 0;
padding-top: 0; } padding-top: 0; }
/* overlay at start */ /* overlay at start */
.mfp-fade.mfp-bg { .mfp-fade.mfp-bg {
@ -2011,7 +2011,7 @@ img.mfp-img {
-moz-transform: translateX(50px); -moz-transform: translateX(50px);
transform: translateX(50px); transform: translateX(50px);
} }
.simple-pace { .simple-pace {
-webkit-pointer-events: none; -webkit-pointer-events: none;
pointer-events: none; pointer-events: none;
@ -2082,7 +2082,7 @@ img.mfp-img {
@keyframes simple-pace-stripe-animation { @keyframes simple-pace-stripe-animation {
0% { transform: none; transform: none; } 0% { transform: none; transform: none; }
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); } 100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
} }
.inputosaurus-container { .inputosaurus-container {
background-color:#fff; background-color:#fff;
border:1px solid #bcbec0; border:1px solid #bcbec0;
@ -2150,7 +2150,7 @@ img.mfp-img {
box-shadow:none; box-shadow:none;
} }
.inputosaurus-input-hidden { display:none; } .inputosaurus-input-hidden { display:none; }
.flag-wrapper { .flag-wrapper {
width: 24px; width: 24px;
height: 16px; height: 16px;
@ -2194,7 +2194,7 @@ img.mfp-img {
.flag.flag-pt-br {background-position: -192px -11px} .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} .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 */ /* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
.clearfix { .clearfix {
*zoom: 1; *zoom: 1;

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */ /*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, _) { (function (window, $, ko, crossroads, hasher, _) {
'use strict'; 'use strict';
@ -75,14 +75,14 @@ var
$document = $(window.document), $document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
; ;
/*jshint onevar: false*/ /*jshint onevar: false*/
/** /**
* @type {?AdminApp} * @type {?AdminApp}
*/ */
var RL = null; var RL = null;
/*jshint onevar: true*/ /*jshint onevar: true*/
/** /**
* @type {?} * @type {?}
*/ */
@ -231,7 +231,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type; return oType && 'application/pdf' === oType.type;
}); });
} }
Consts.Defaults = {}; Consts.Defaults = {};
Consts.Values = {}; Consts.Values = {};
Consts.DataImages = {}; Consts.DataImages = {};
@ -349,7 +349,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string} * @type {string}
*/ */
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII='; Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/** /**
* @enum {string} * @enum {string}
*/ */
@ -729,7 +729,7 @@ Enums.Notification = {
'UnknownNotification': 999, 'UnknownNotification': 999,
'UnknownError': 999 'UnknownError': 999
}; };
Utils.trim = $.trim; Utils.trim = $.trim;
Utils.inArray = $.inArray; Utils.inArray = $.inArray;
Utils.isArray = _.isArray; Utils.isArray = _.isArray;
@ -2499,7 +2499,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
Globals.dropdownVisibility(!!_.find(BootstrapDropdowns, function (oItem) { Globals.dropdownVisibility(!!_.find(BootstrapDropdowns, function (oItem) {
return oItem.hasClass('open'); return oItem.hasClass('open');
})); }));
}, 50); }, 50);
// Base64 encode / decode // Base64 encode / decode
// http://www.webtoolkit.info/ // http://www.webtoolkit.info/
@ -2662,7 +2662,7 @@ Base64 = {
} }
}; };
/*jslint bitwise: false*/ /*jslint bitwise: false*/
ko.bindingHandlers.tooltip = { ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) { 'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice) if (!Globals.bMobileDevice)
@ -3369,7 +3369,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this; return this;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3667,7 +3667,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{ {
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : ''); return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
}; };
/** /**
* @type {Object} * @type {Object}
*/ */
@ -3761,7 +3761,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3835,7 +3835,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3906,7 +3906,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3949,7 +3949,7 @@ LocalStorage.prototype.get = function (iKey)
{ {
return this.oDriver ? this.oDriver.get('p' + iKey) : null; return this.oDriver ? this.oDriver.get('p' + iKey) : null;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3962,7 +3962,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{ {
}; };
/** /**
* @param {string=} sPosition = '' * @param {string=} sPosition = ''
* @param {string=} sTemplate = '' * @param {string=} sTemplate = ''
@ -4048,7 +4048,7 @@ KnoinAbstractViewModel.prototype.registerPopupEscapeKey = function ()
return true; return true;
}); });
}; };
/** /**
* @param {string} sScreenName * @param {string} sScreenName
* @param {?=} aViewModels = [] * @param {?=} aViewModels = []
@ -4124,7 +4124,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute; this.oCross = oRoute;
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4522,7 +4522,7 @@ Knoin.prototype.bootstart = function ()
}; };
kn = new Knoin(); kn = new Knoin();
/** /**
* @param {string=} sEmail * @param {string=} sEmail
* @param {string=} sName * @param {string=} sName
@ -4886,7 +4886,7 @@ EmailModel.prototype.inputoTagLine = function ()
{ {
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email; return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5104,7 +5104,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
this.smtpAuth(true); this.smtpAuth(true);
this.whiteList(''); this.whiteList('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5241,7 +5241,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
} }
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5357,7 +5357,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
{ {
var sValue = this.key(); var sValue = this.key();
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue)); return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5417,7 +5417,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang); RL.data().mainLanguage(sLang);
this.cancelCommand(); this.cancelCommand();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5523,7 +5523,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5610,7 +5610,7 @@ AdminLoginViewModel.prototype.onHide = function ()
{ {
this.loginFocus(false); this.loginFocus(false);
}; };
/** /**
* @param {?} oScreen * @param {?} oScreen
* *
@ -5632,7 +5632,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
{ {
return '#/' + sRoute; return '#/' + sRoute;
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5654,7 +5654,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
RL.remote().adminLogout(function () { RL.remote().adminLogout(function () {
RL.loginAndLogoutReload(); RL.loginAndLogoutReload();
}); });
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5754,7 +5754,7 @@ AdminGeneral.prototype.selectLanguage = function ()
{ {
kn.showScreenPopup(PopupsLanguagesViewModel); kn.showScreenPopup(PopupsLanguagesViewModel);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5806,7 +5806,7 @@ AdminLogin.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5875,7 +5875,7 @@ AdminBranding.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6095,7 +6095,7 @@ AdminContacts.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6184,7 +6184,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
{ {
RL.reloadDomainList(); RL.reloadDomainList();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6279,7 +6279,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
{ {
return RL.link().phpInfo(); return RL.link().phpInfo();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6395,7 +6395,7 @@ AdminSocial.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6492,7 +6492,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
RL.reloadPluginList(); RL.reloadPluginList();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6590,7 +6590,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage); RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6641,7 +6641,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
{ {
var oDate = moment.unix(this.licenseExpired()); var oDate = moment.unix(this.licenseExpired());
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')'; return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6766,7 +6766,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed')); this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
}; };
/** /**
* @constructor * @constructor
* @extends AbstractData * @extends AbstractData
@ -6800,7 +6800,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
AdminDataStorage.prototype.populateDataOnStart = function() AdminDataStorage.prototype.populateDataOnStart = function()
{ {
AbstractData.prototype.populateDataOnStart.call(this); AbstractData.prototype.populateDataOnStart.call(this);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7074,7 +7074,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion 'Version': sVersion
}); });
}; };
/** /**
* @constructor * @constructor
* @extends AbstractAjaxRemoteStorage * @extends AbstractAjaxRemoteStorage
@ -7318,7 +7318,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
{ {
this.defaultRequest(fCallback, 'AdminPing'); this.defaultRequest(fCallback, 'AdminPing');
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7384,7 +7384,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{ {
this.oEmailsPicsHashes = oData; this.oEmailsPicsHashes = oData;
}; };
/** /**
* @constructor * @constructor
* @extends AbstractCacheStorage * @extends AbstractCacheStorage
@ -7395,7 +7395,7 @@ function AdminCacheStorage()
} }
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype); _.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
/** /**
* @param {Array} aViewModels * @param {Array} aViewModels
* @constructor * @constructor
@ -7573,7 +7573,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules] ['', oRules]
]; ];
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractScreen * @extends KnoinAbstractScreen
@ -7588,7 +7588,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
AdminLoginScreen.prototype.onShow = function () AdminLoginScreen.prototype.onShow = function ()
{ {
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends AbstractSettings * @extends AbstractSettings
@ -7608,7 +7608,7 @@ AdminSettingsScreen.prototype.onShow = function ()
// AbstractSettings.prototype.onShow.call(this); // AbstractSettings.prototype.onShow.call(this);
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractBoot * @extends KnoinAbstractBoot
@ -7928,7 +7928,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready(); ssm.ready();
}; };
/** /**
* @constructor * @constructor
* @extends AbstractApp * @extends AbstractApp
@ -8167,7 +8167,7 @@ AdminApp.prototype.bootstart = function ()
* @type {AdminApp} * @type {AdminApp}
*/ */
RL = new AdminApp(); RL = new AdminApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile'); $html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS); $window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -8218,9 +8218,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null; window['__RLBOOT'] = null;
}); });
}; };
if (window.SimplePace) { if (window.SimplePace) {
window.SimplePace.add(10); window.SimplePace.add(10);
} }
}(window, jQuery, ko, crossroads, hasher, _)); }(window, jQuery, ko, crossroads, hasher, _));

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */ /*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible, key) { (function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible, key) {
'use strict'; 'use strict';
@ -75,7 +75,7 @@ var
$document = $(window.document), $document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
; ;
/*jshint onevar: false*/ /*jshint onevar: false*/
/** /**
* @type {?RainLoopApp} * @type {?RainLoopApp}
@ -86,7 +86,7 @@ var
$proxyDiv = $('<div></div>') $proxyDiv = $('<div></div>')
; ;
/*jshint onevar: true*/ /*jshint onevar: true*/
/** /**
* @type {?} * @type {?}
*/ */
@ -235,7 +235,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type; return oType && 'application/pdf' === oType.type;
}); });
} }
Consts.Defaults = {}; Consts.Defaults = {};
Consts.Values = {}; Consts.Values = {};
Consts.DataImages = {}; Consts.DataImages = {};
@ -353,7 +353,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string} * @type {string}
*/ */
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII='; Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/** /**
* @enum {string} * @enum {string}
*/ */
@ -733,7 +733,7 @@ Enums.Notification = {
'UnknownNotification': 999, 'UnknownNotification': 999,
'UnknownError': 999 'UnknownError': 999
}; };
Utils.trim = $.trim; Utils.trim = $.trim;
Utils.inArray = $.inArray; Utils.inArray = $.inArray;
Utils.isArray = _.isArray; Utils.isArray = _.isArray;
@ -2503,7 +2503,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
Globals.dropdownVisibility(!!_.find(BootstrapDropdowns, function (oItem) { Globals.dropdownVisibility(!!_.find(BootstrapDropdowns, function (oItem) {
return oItem.hasClass('open'); return oItem.hasClass('open');
})); }));
}, 50); }, 50);
// Base64 encode / decode // Base64 encode / decode
// http://www.webtoolkit.info/ // http://www.webtoolkit.info/
@ -2666,7 +2666,7 @@ Base64 = {
} }
}; };
/*jslint bitwise: false*/ /*jslint bitwise: false*/
ko.bindingHandlers.tooltip = { ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) { 'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice) if (!Globals.bMobileDevice)
@ -3373,7 +3373,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this; return this;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3671,7 +3671,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{ {
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : ''); return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
}; };
/** /**
* @type {Object} * @type {Object}
*/ */
@ -3765,7 +3765,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
}; };
function NewHtmlEditorWrapper(oElement, fOnBlur, fOnReady, fOnModeChange) function NewHtmlEditorWrapper(oElement, fOnBlur, fOnReady, fOnModeChange)
{ {
var self = this; var self = this;
@ -3985,7 +3985,7 @@ NewHtmlEditorWrapper.prototype.clear = function (bFocus)
this.setHtml('', bFocus); this.setHtml('', bFocus);
}; };
/** /**
* @constructor * @constructor
* @param {koProperty} oKoList * @param {koProperty} oKoList
@ -4670,7 +4670,7 @@ Selector.prototype.on = function (sEventName, fCallback)
{ {
this.oCallbacks[sEventName] = fCallback; this.oCallbacks[sEventName] = fCallback;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4744,7 +4744,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4815,7 +4815,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4874,7 +4874,7 @@ OpenPgpLocalStorageDriver.prototype.store = function (aKeys)
window.localStorage.setItem(this.item, JSON.stringify(aArmoredKeys)); window.localStorage.setItem(this.item, JSON.stringify(aArmoredKeys));
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4917,7 +4917,7 @@ LocalStorage.prototype.get = function (iKey)
{ {
return this.oDriver ? this.oDriver.get('p' + iKey) : null; return this.oDriver ? this.oDriver.get('p' + iKey) : null;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4930,7 +4930,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{ {
}; };
/** /**
* @param {string=} sPosition = '' * @param {string=} sPosition = ''
* @param {string=} sTemplate = '' * @param {string=} sTemplate = ''
@ -5016,7 +5016,7 @@ KnoinAbstractViewModel.prototype.registerPopupEscapeKey = function ()
return true; return true;
}); });
}; };
/** /**
* @param {string} sScreenName * @param {string} sScreenName
* @param {?=} aViewModels = [] * @param {?=} aViewModels = []
@ -5092,7 +5092,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute; this.oCross = oRoute;
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5490,7 +5490,7 @@ Knoin.prototype.bootstart = function ()
}; };
kn = new Knoin(); kn = new Knoin();
/** /**
* @param {string=} sEmail * @param {string=} sEmail
* @param {string=} sName * @param {string=} sName
@ -5854,7 +5854,7 @@ EmailModel.prototype.inputoTagLine = function ()
{ {
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email; return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5981,7 +5981,7 @@ ContactModel.prototype.lineAsCcc = function ()
return aResult.join(' '); return aResult.join(' ');
}; };
/** /**
* @param {number=} iType = Enums.ContactPropertyType.Unknown * @param {number=} iType = Enums.ContactPropertyType.Unknown
* @param {string=} sValue = '' * @param {string=} sValue = ''
@ -6003,7 +6003,7 @@ function ContactPropertyModel(iType, sValue, bFocused, sPlaceholder)
return sPlaceholder ? Utils.i18n(sPlaceholder) : ''; return sPlaceholder ? Utils.i18n(sPlaceholder) : '';
}, this); }, this);
} }
/** /**
* @constructor * @constructor
*/ */
@ -6239,7 +6239,7 @@ AttachmentModel.prototype.iconClass = function ()
return sClass; return sClass;
}; };
/** /**
* @constructor * @constructor
* @param {string} sId * @param {string} sId
@ -6300,7 +6300,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
} }
return bResult; return bResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7494,7 +7494,7 @@ MessageModel.prototype.flagHash = function ()
return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(), return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(),
this.isReadReceipt()].join(''); this.isReadReceipt()].join('');
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7834,7 +7834,7 @@ FolderModel.prototype.printableFullName = function ()
{ {
return this.fullName.split(this.delimiter).join(' / '); return this.fullName.split(this.delimiter).join(' / ');
}; };
/** /**
* @param {string} sEmail * @param {string} sEmail
* @param {boolean=} bCanBeDelete = true * @param {boolean=} bCanBeDelete = true
@ -7855,7 +7855,7 @@ AccountModel.prototype.email = '';
AccountModel.prototype.changeAccountLink = function () AccountModel.prototype.changeAccountLink = function ()
{ {
return RL.link().change(this.email); return RL.link().change(this.email);
}; };
/** /**
* @param {string} sId * @param {string} sId
* @param {string} sEmail * @param {string} sEmail
@ -7891,7 +7891,7 @@ IdentityModel.prototype.formattedNameForEmail = function ()
var sName = this.name(); var sName = this.name();
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>'; return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
}; };
/** /**
* @param {string} iIndex * @param {string} iIndex
* @param {string} sGuID * @param {string} sGuID
@ -7922,7 +7922,7 @@ OpenPgpKeyModel.prototype.user = '';
OpenPgpKeyModel.prototype.email = ''; OpenPgpKeyModel.prototype.email = '';
OpenPgpKeyModel.prototype.armor = ''; OpenPgpKeyModel.prototype.armor = '';
OpenPgpKeyModel.prototype.isPrivate = false; OpenPgpKeyModel.prototype.isPrivate = false;
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -8018,7 +8018,7 @@ PopupsFolderClearViewModel.prototype.onShow = function (oFolder)
this.selectedFolder(oFolder); this.selectedFolder(oFolder);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -8128,7 +8128,7 @@ PopupsFolderCreateViewModel.prototype.onFocus = function ()
{ {
this.folderName.focused(true); this.folderName.focused(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -8241,7 +8241,7 @@ PopupsFolderSystemViewModel.prototype.onShow = function (iNotificationType)
this.notification(sNotification); this.notification(sNotification);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -9730,7 +9730,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
this.editorResizeThrottle(); this.editorResizeThrottle();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10348,7 +10348,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
oItem.checked(false); oItem.checked(false);
}); });
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10478,7 +10478,7 @@ PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
{ {
this.fromFocus(true); this.fromFocus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10595,7 +10595,7 @@ PopupsAddAccountViewModel.prototype.onBuild = function ()
{ {
this.allowCustomLogin(!!RL.settingsGet('AllowCustomLogin')); this.allowCustomLogin(!!RL.settingsGet('AllowCustomLogin'));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10655,7 +10655,7 @@ PopupsAddOpenPgpKeyViewModel.prototype.onFocus = function ()
{ {
this.key.focus(true); this.key.focus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10695,7 +10695,7 @@ PopupsViewOpenPgpKeyViewModel.prototype.onShow = function (oOpenPgpKey)
this.key(oOpenPgpKey.armor); this.key(oOpenPgpKey.armor);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10783,7 +10783,7 @@ PopupsGenerateNewOpenPgpKeyViewModel.prototype.onFocus = function ()
{ {
this.email.focus(true); this.email.focus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11019,7 +11019,7 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
this.to(aRec); this.to(aRec);
this.text(sText); this.text(sText);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11167,7 +11167,7 @@ PopupsIdentityViewModel.prototype.onFocus = function ()
this.email.focused(true); this.email.focused(true);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11227,7 +11227,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang); RL.data().mainLanguage(sLang);
this.cancelCommand(); this.cancelCommand();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11281,7 +11281,7 @@ PopupsTwoFactorTestViewModel.prototype.onFocus = function ()
{ {
this.code.focused(true); this.code.focused(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11387,7 +11387,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11432,7 +11432,7 @@ PopupsKeyboardShortcutsHelpViewModel.prototype.onBuild = function (oDom)
} }
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11741,7 +11741,7 @@ LoginViewModel.prototype.selectLanguage = function ()
kn.showScreenPopup(PopupsLanguagesViewModel); kn.showScreenPopup(PopupsLanguagesViewModel);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11823,7 +11823,7 @@ AbstractSystemDropDownViewModel.prototype.onBuild = function ()
} }
}); });
}; };
/** /**
* @constructor * @constructor
* @extends AbstractSystemDropDownViewModel * @extends AbstractSystemDropDownViewModel
@ -11835,7 +11835,7 @@ function MailBoxSystemDropDownViewModel()
} }
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel); Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/** /**
* @constructor * @constructor
* @extends AbstractSystemDropDownViewModel * @extends AbstractSystemDropDownViewModel
@ -11847,7 +11847,7 @@ function SettingsSystemDropDownViewModel()
} }
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel); Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -12038,7 +12038,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
kn.showScreenPopup(PopupsContactsViewModel); kn.showScreenPopup(PopupsContactsViewModel);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -12927,7 +12927,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
; ;
return !!oJua; return !!oJua;
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -13588,7 +13588,7 @@ MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
RL.reloadFlagsCurrentMessageListAndMessageFromCache(); RL.reloadFlagsCurrentMessageListAndMessageFromCache();
} }
}; };
/** /**
* @param {?} oScreen * @param {?} oScreen
* *
@ -13615,7 +13615,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
{ {
kn.setHash(RL.link().inbox()); kn.setHash(RL.link().inbox());
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -13646,7 +13646,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
{ {
kn.setHash(RL.link().inbox()); kn.setHash(RL.link().inbox());
}; };
/** /**
* @constructor * @constructor
*/ */
@ -13806,7 +13806,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
{ {
kn.showScreenPopup(PopupsLanguagesViewModel); kn.showScreenPopup(PopupsLanguagesViewModel);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -13844,7 +13844,7 @@ SettingsContacts.prototype.onShow = function ()
{ {
this.showPassword(false); this.showPassword(false);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -13925,7 +13925,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
} }
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14013,7 +14013,7 @@ SettingsIdentity.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14171,7 +14171,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
}); });
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14321,7 +14321,7 @@ SettingsSecurity.prototype.onBuild = function ()
this.processing(true); this.processing(true);
RL.remote().getTwoFactor(this.onResult); RL.remote().getTwoFactor(this.onResult);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14388,7 +14388,7 @@ function SettingsSocialScreen()
} }
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social'); Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
/** /**
* @constructor * @constructor
*/ */
@ -14452,7 +14452,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
this.passwordUpdateError(true); this.passwordUpdateError(true);
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14647,7 +14647,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
oFolder.subScribed(false); oFolder.subScribed(false);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14872,7 +14872,7 @@ SettingsThemes.prototype.initCustomThemeUploader = function ()
return false; return false;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14957,7 +14957,7 @@ SettingsOpenPGP.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
RL.reloadOpenPgpKeys(); RL.reloadOpenPgpKeys();
} }
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -15082,7 +15082,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed')); this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
}; };
/** /**
* @constructor * @constructor
* @extends AbstractData * @extends AbstractData
@ -16320,7 +16320,7 @@ WebMailDataStorage.prototype.findSelfPrivateKey = function (sPassword)
{ {
return this.findPrivateKeyByEmail(this.accountEmail(), sPassword); return this.findPrivateKeyByEmail(this.accountEmail(), sPassword);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -16594,7 +16594,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion 'Version': sVersion
}); });
}; };
/** /**
* @constructor * @constructor
* @extends AbstractAjaxRemoteStorage * @extends AbstractAjaxRemoteStorage
@ -17359,7 +17359,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
this.defaultRequest(fCallback, 'SocialUsers'); this.defaultRequest(fCallback, 'SocialUsers');
}; };
/** /**
* @constructor * @constructor
*/ */
@ -17425,7 +17425,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{ {
this.oEmailsPicsHashes = oData; this.oEmailsPicsHashes = oData;
}; };
/** /**
* @constructor * @constructor
* @extends AbstractCacheStorage * @extends AbstractCacheStorage
@ -17743,7 +17743,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
this.setMessageFlagsToCache(sFolder, sUid, aFlags); this.setMessageFlagsToCache(sFolder, sUid, aFlags);
} }
}; };
/** /**
* @param {Array} aViewModels * @param {Array} aViewModels
* @constructor * @constructor
@ -17921,7 +17921,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules] ['', oRules]
]; ];
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractScreen * @extends KnoinAbstractScreen
@ -17936,7 +17936,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
LoginScreen.prototype.onShow = function () LoginScreen.prototype.onShow = function ()
{ {
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractScreen * @extends KnoinAbstractScreen
@ -18107,7 +18107,7 @@ MailBoxScreen.prototype.routes = function ()
[/^([^\/]*)$/, {'normalize_': fNormS}] [/^([^\/]*)$/, {'normalize_': fNormS}]
]; ];
}; };
/** /**
* @constructor * @constructor
* @extends AbstractSettings * @extends AbstractSettings
@ -18136,7 +18136,7 @@ SettingsScreen.prototype.onShow = function ()
RL.setTitle(this.sSettingsTitle); RL.setTitle(this.sSettingsTitle);
RL.data().keyScope(Enums.KeyState.Settings); RL.data().keyScope(Enums.KeyState.Settings);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractBoot * @extends KnoinAbstractBoot
@ -18456,7 +18456,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready(); ssm.ready();
}; };
/** /**
* @constructor * @constructor
* @extends AbstractApp * @extends AbstractApp
@ -19473,6 +19473,15 @@ RainLoopApp.prototype.bootstart = function ()
window.SimplePace.sleep(); window.SimplePace.sleep();
} }
// if (RL.settingsGet('MailToEmail'))
// {
// if (window.postMessage)
// {
// window.console.log('railoop/mailto/auth/' + RL.settingsGet('MailToEmail'), '' + window.location);
//// $.postMessage('railoop/mailto/auth/' + RL.settingsGet('MailToEmail'), '' + window.location);
// }
// }
if (!!RL.settingsGet('Auth')) if (!!RL.settingsGet('Auth'))
{ {
this.setTitle(Utils.i18n('TITLES/LOADING')); this.setTitle(Utils.i18n('TITLES/LOADING'));
@ -19555,6 +19564,17 @@ RainLoopApp.prototype.bootstart = function ()
}, 2000); }, 2000);
// if (window.navigator && Utils.isFunc(window.navigator.registerProtocolHandler))
// {
// window.navigator.registerProtocolHandler('mailto',
// window.location.protocol + '//' + window.location.host + window.location.pathname + '?mailto&to=%s',
// '' + (RL.settingsGet('Title') || 'RainLoop'));
// }
//
// $.receiveMessage(function () {
// window.console.log(arguments);
// }, '' + window.location);
Plugins.runHook('rl-start-user-screens'); Plugins.runHook('rl-start-user-screens');
RL.pub('rl.bootstart-user-screens'); RL.pub('rl.bootstart-user-screens');
} }
@ -19644,7 +19664,7 @@ RainLoopApp.prototype.bootstart = function ()
* @type {RainLoopApp} * @type {RainLoopApp}
*/ */
RL = new RainLoopApp(); RL = new RainLoopApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile'); $html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS); $window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -19695,9 +19715,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null; window['__RLBOOT'] = null;
}); });
}; };
if (window.SimplePace) { if (window.SimplePace) {
window.SimplePace.add(10); window.SimplePace.add(10);
} }
}(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible, key)); }(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible, key));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long