mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-06 21:24:12 +08:00
Small fixes
This commit is contained in:
parent
ff14ff6008
commit
a531846b8f
8 changed files with 75 additions and 43 deletions
|
@ -23,7 +23,6 @@ module.exports = function (grunt) {
|
|||
},
|
||||
jshint: {
|
||||
options: {
|
||||
reporter: require('jshint-stylish'),
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
files: [
|
||||
|
|
|
@ -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}]
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"wrench": "*",
|
||||
"jshint-stylish": "*",
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-css": "*",
|
||||
"grunt-md5": "*",
|
||||
|
|
|
@ -1978,8 +1978,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,
|
||||
|
|
|
@ -1978,8 +1978,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,
|
||||
|
@ -15248,6 +15248,9 @@ function MailBoxScreen()
|
|||
|
||||
_.extend(MailBoxScreen.prototype, KnoinAbstractScreen.prototype);
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
MailBoxScreen.prototype.oLastRoute = {};
|
||||
|
||||
MailBoxScreen.prototype.onShow = function ()
|
||||
|
@ -15256,6 +15259,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
|
||||
|
@ -15356,6 +15364,9 @@ MailBoxScreen.prototype.onBuild = function ()
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {Array}
|
||||
*/
|
||||
MailBoxScreen.prototype.routes = function ()
|
||||
{
|
||||
var
|
||||
|
@ -15387,7 +15398,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}]
|
||||
|
@ -16210,6 +16220,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);
|
||||
|
@ -16293,22 +16325,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)
|
||||
|
|
2
rainloop/v/0.0.0/static/js/app.min.js
vendored
2
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue