mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03: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: {
|
jshint: {
|
||||||
options: {
|
options: {
|
||||||
reporter: require('jshint-stylish'),
|
|
||||||
jshintrc: '.jshintrc'
|
jshintrc: '.jshintrc'
|
||||||
},
|
},
|
||||||
files: [
|
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 ()
|
RainLoopApp.prototype.bootstart = function ()
|
||||||
{
|
{
|
||||||
AbstractApp.prototype.bootstart.call(this);
|
AbstractApp.prototype.bootstart.call(this);
|
||||||
|
|
@ -651,22 +673,7 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
|
|
||||||
// setup maito protocol
|
// setup maito protocol
|
||||||
$document.on('mousedown', '#rl-center a', function (oEvent) {
|
$document.on('mousedown', '#rl-center a', function (oEvent) {
|
||||||
if (oEvent && 3 !== oEvent['which'])
|
return !(oEvent && 3 !== oEvent['which'] && RL.mailToHelper($(this).attr('href')));
|
||||||
{
|
|
||||||
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;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (bGoogle || bFacebook || bTwitter)
|
if (bGoogle || bFacebook || bTwitter)
|
||||||
|
|
|
||||||
|
|
@ -1391,8 +1391,8 @@ Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
||||||
oTempImg.src = sUrl;
|
oTempImg.src = sUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount) {
|
Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
|
||||||
|
{
|
||||||
return function() {
|
return function() {
|
||||||
var
|
var
|
||||||
iPrev = 0,
|
iPrev = 0,
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,9 @@ function MailBoxScreen()
|
||||||
|
|
||||||
_.extend(MailBoxScreen.prototype, KnoinAbstractScreen.prototype);
|
_.extend(MailBoxScreen.prototype, KnoinAbstractScreen.prototype);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {Object}
|
||||||
|
*/
|
||||||
MailBoxScreen.prototype.oLastRoute = {};
|
MailBoxScreen.prototype.oLastRoute = {};
|
||||||
|
|
||||||
MailBoxScreen.prototype.onShow = function ()
|
MailBoxScreen.prototype.onShow = function ()
|
||||||
|
|
@ -26,6 +29,11 @@ MailBoxScreen.prototype.onShow = function ()
|
||||||
RL.setTitle(('' === sEmail ? '' : sEmail + ' - ') + Utils.i18n('TITLES/MAILBOX'));
|
RL.setTitle(('' === sEmail ? '' : sEmail + ' - ') + Utils.i18n('TITLES/MAILBOX'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} sFolderHash
|
||||||
|
* @param {number} iPage
|
||||||
|
* @param {string} sSearch
|
||||||
|
*/
|
||||||
MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
|
MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
|
||||||
{
|
{
|
||||||
var
|
var
|
||||||
|
|
@ -126,6 +134,9 @@ MailBoxScreen.prototype.onBuild = function ()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {Array}
|
||||||
|
*/
|
||||||
MailBoxScreen.prototype.routes = function ()
|
MailBoxScreen.prototype.routes = function ()
|
||||||
{
|
{
|
||||||
var
|
var
|
||||||
|
|
@ -157,7 +168,6 @@ MailBoxScreen.prototype.routes = function ()
|
||||||
;
|
;
|
||||||
|
|
||||||
return [
|
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]+)\/p([1-9][0-9]*)\/?$/, {'normalize_': fNormS}],
|
||||||
[/^([a-zA-Z0-9]+)\/(.+)\/?$/, {'normalize_': fNormD}],
|
[/^([a-zA-Z0-9]+)\/(.+)\/?$/, {'normalize_': fNormD}],
|
||||||
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"wrench": "*",
|
"wrench": "*",
|
||||||
"jshint-stylish": "*",
|
|
||||||
"grunt": "~0.4.1",
|
"grunt": "~0.4.1",
|
||||||
"grunt-css": "*",
|
"grunt-css": "*",
|
||||||
"grunt-md5": "*",
|
"grunt-md5": "*",
|
||||||
|
|
|
||||||
|
|
@ -1978,8 +1978,8 @@ Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
||||||
oTempImg.src = sUrl;
|
oTempImg.src = sUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount) {
|
Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
|
||||||
|
{
|
||||||
return function() {
|
return function() {
|
||||||
var
|
var
|
||||||
iPrev = 0,
|
iPrev = 0,
|
||||||
|
|
|
||||||
|
|
@ -1978,8 +1978,8 @@ Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
||||||
oTempImg.src = sUrl;
|
oTempImg.src = sUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount) {
|
Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
|
||||||
|
{
|
||||||
return function() {
|
return function() {
|
||||||
var
|
var
|
||||||
iPrev = 0,
|
iPrev = 0,
|
||||||
|
|
@ -15248,6 +15248,9 @@ function MailBoxScreen()
|
||||||
|
|
||||||
_.extend(MailBoxScreen.prototype, KnoinAbstractScreen.prototype);
|
_.extend(MailBoxScreen.prototype, KnoinAbstractScreen.prototype);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {Object}
|
||||||
|
*/
|
||||||
MailBoxScreen.prototype.oLastRoute = {};
|
MailBoxScreen.prototype.oLastRoute = {};
|
||||||
|
|
||||||
MailBoxScreen.prototype.onShow = function ()
|
MailBoxScreen.prototype.onShow = function ()
|
||||||
|
|
@ -15256,6 +15259,11 @@ MailBoxScreen.prototype.onShow = function ()
|
||||||
RL.setTitle(('' === sEmail ? '' : sEmail + ' - ') + Utils.i18n('TITLES/MAILBOX'));
|
RL.setTitle(('' === sEmail ? '' : sEmail + ' - ') + Utils.i18n('TITLES/MAILBOX'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} sFolderHash
|
||||||
|
* @param {number} iPage
|
||||||
|
* @param {string} sSearch
|
||||||
|
*/
|
||||||
MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
|
MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
|
||||||
{
|
{
|
||||||
var
|
var
|
||||||
|
|
@ -15356,6 +15364,9 @@ MailBoxScreen.prototype.onBuild = function ()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {Array}
|
||||||
|
*/
|
||||||
MailBoxScreen.prototype.routes = function ()
|
MailBoxScreen.prototype.routes = function ()
|
||||||
{
|
{
|
||||||
var
|
var
|
||||||
|
|
@ -15387,7 +15398,6 @@ MailBoxScreen.prototype.routes = function ()
|
||||||
;
|
;
|
||||||
|
|
||||||
return [
|
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]+)\/p([1-9][0-9]*)\/?$/, {'normalize_': fNormS}],
|
||||||
[/^([a-zA-Z0-9]+)\/(.+)\/?$/, {'normalize_': fNormD}],
|
[/^([a-zA-Z0-9]+)\/(.+)\/?$/, {'normalize_': fNormD}],
|
||||||
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
[/^([^\/]*)$/, {'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 ()
|
RainLoopApp.prototype.bootstart = function ()
|
||||||
{
|
{
|
||||||
AbstractApp.prototype.bootstart.call(this);
|
AbstractApp.prototype.bootstart.call(this);
|
||||||
|
|
@ -16293,22 +16325,7 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
|
|
||||||
// setup maito protocol
|
// setup maito protocol
|
||||||
$document.on('mousedown', '#rl-center a', function (oEvent) {
|
$document.on('mousedown', '#rl-center a', function (oEvent) {
|
||||||
if (oEvent && 3 !== oEvent['which'])
|
return !(oEvent && 3 !== oEvent['which'] && RL.mailToHelper($(this).attr('href')));
|
||||||
{
|
|
||||||
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;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (bGoogle || bFacebook || bTwitter)
|
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
Add a link
Reference in a new issue