mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Small fixes
This commit is contained in:
parent
ff14ff6008
commit
a531846b8f
8 changed files with 75 additions and 43 deletions
|
|
@ -568,6 +568,28 @@ RainLoopApp.prototype.emailsPicsHashes = function ()
|
|||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sMailToUrl
|
||||
* @returns {boolean}
|
||||
*/
|
||||
RainLoopApp.prototype.mailToHelper = function (sMailToUrl)
|
||||
{
|
||||
if (sMailToUrl && 'mailto:' === sMailToUrl.toString().toLowerCase().substr(0, 7))
|
||||
{
|
||||
var oEmailModel = null;
|
||||
oEmailModel = new EmailModel();
|
||||
oEmailModel.parse(window.decodeURI(sMailToUrl.toString().substr(7).replace(/\?.+$/, '')));
|
||||
|
||||
if (oEmailModel && oEmailModel.email)
|
||||
{
|
||||
kn.showScreenPopup(PopupsComposeViewModel, [Enums.ComposeType.Empty, null, [oEmailModel]]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
RainLoopApp.prototype.bootstart = function ()
|
||||
{
|
||||
AbstractApp.prototype.bootstart.call(this);
|
||||
|
|
@ -651,22 +673,7 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
|
||||
// setup maito protocol
|
||||
$document.on('mousedown', '#rl-center a', function (oEvent) {
|
||||
if (oEvent && 3 !== oEvent['which'])
|
||||
{
|
||||
var oEmailModel = null, sHref = $(this).attr('href');
|
||||
if (sHref && 'mailto:' === sHref.toString().toLowerCase().substr(0, 7))
|
||||
{
|
||||
oEmailModel = new EmailModel();
|
||||
oEmailModel.parse(window.decodeURI(sHref.toString().substr(7)));
|
||||
if (oEmailModel && oEmailModel.email)
|
||||
{
|
||||
kn.showScreenPopup(PopupsComposeViewModel, [Enums.ComposeType.Empty, null, [oEmailModel]]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return !(oEvent && 3 !== oEvent['which'] && RL.mailToHelper($(this).attr('href')));
|
||||
});
|
||||
|
||||
if (bGoogle || bFacebook || bTwitter)
|
||||
|
|
|
|||
|
|
@ -1391,8 +1391,8 @@ Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
|||
oTempImg.src = sUrl;
|
||||
};
|
||||
|
||||
Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount) {
|
||||
|
||||
Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
|
||||
{
|
||||
return function() {
|
||||
var
|
||||
iPrev = 0,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ function MailBoxScreen()
|
|||
|
||||
_.extend(MailBoxScreen.prototype, KnoinAbstractScreen.prototype);
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
MailBoxScreen.prototype.oLastRoute = {};
|
||||
|
||||
MailBoxScreen.prototype.onShow = function ()
|
||||
|
|
@ -26,6 +29,11 @@ MailBoxScreen.prototype.onShow = function ()
|
|||
RL.setTitle(('' === sEmail ? '' : sEmail + ' - ') + Utils.i18n('TITLES/MAILBOX'));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sFolderHash
|
||||
* @param {number} iPage
|
||||
* @param {string} sSearch
|
||||
*/
|
||||
MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
|
||||
{
|
||||
var
|
||||
|
|
@ -126,6 +134,9 @@ MailBoxScreen.prototype.onBuild = function ()
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {Array}
|
||||
*/
|
||||
MailBoxScreen.prototype.routes = function ()
|
||||
{
|
||||
var
|
||||
|
|
@ -157,7 +168,6 @@ MailBoxScreen.prototype.routes = function ()
|
|||
;
|
||||
|
||||
return [
|
||||
[/^([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}],
|
||||
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue