Small fixes

This commit is contained in:
RainLoop Team 2014-08-28 15:46:18 +04:00
parent c5bffef9cd
commit f92120a5a7
7 changed files with 46 additions and 46 deletions

View file

@ -512,7 +512,7 @@
Utils.replySubjectAdd = function (sPrefix, sSubject)
{
sPrefix = Utils.trim(sPrefix.toUpperCase());
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
var
iIndex = 0,
@ -591,7 +591,7 @@
oMatch = null
;
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
do
{
@ -610,7 +610,7 @@
}
while (oMatch || 0 < iLimit);
return sSubject.replace(/[\s]+/, ' ');
return sSubject.replace(/[\s]+/g, ' ');
};
/**
@ -659,7 +659,7 @@
oMatch = null
;
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
do
{
@ -681,7 +681,7 @@
}
while (oMatch);
sSubject = sSubject.replace(/[\s]+/, ' ');
sSubject = sSubject.replace(/[\s]+/g, ' ');
return sSubject;
};
@ -1339,7 +1339,7 @@
Utils.convertLangName = function (sLanguage, bEng)
{
return Utils.i18n('LANGS_NAMES' + (true === bEng ? '_EN' : '') + '/LANG_' +
sLanguage.toUpperCase().replace(/[^a-zA-Z0-9]+/, '_'), null, sLanguage);
sLanguage.toUpperCase().replace(/[^a-zA-Z0-9]+/g, '_'), null, sLanguage);
};
/**
@ -1522,7 +1522,7 @@
sText = splitPlainText($.trim(sText));
sText = '> ' + sText.replace(/\n/gm, '\n> ');
return sText.replace(/(^|\n)([> ]+)/gm, function () {
return (arguments && 2 < arguments.length) ? arguments[1] + $.trim(arguments[2].replace(/[\s]/, '')) + ' ' : '';
return (arguments && 2 < arguments.length) ? arguments[1] + $.trim(arguments[2].replace(/[\s]/g, '')) + ' ' : '';
});
},

View file

@ -355,8 +355,8 @@
$sComment = Utils.trim($sComment).replace(/^[(]+/, '').replace(/[)]+$/, '');
// Remove backslash
$sName = $sName.replace(/\\\\(.)/, '$1');
$sComment = $sComment.replace(/\\\\(.)/, '$1');
$sName = $sName.replace(/\\\\(.)/g, '$1');
$sComment = $sComment.replace(/\\\\(.)/g, '$1');
this.name = $sName;
this.email = $sEmail;

View file

@ -655,18 +655,18 @@
sSignature = sSignature.substr(6);
}
sSignature = sSignature.replace(/[\r]/, '');
sSignature = sSignature.replace(/[\r]/g, '');
sFrom = Utils.pString(sFrom);
if ('' !== sFrom)
{
sSignature = sSignature.replace(/{{FROM}}/, sFrom);
sSignature = sSignature.replace(/{{FROM}}/g, sFrom);
}
sSignature = sSignature.replace(/[\s]{1,2}{{FROM}}/, '{{FROM}}');
sSignature = sSignature.replace(/[\s]{1,2}{{FROM}}/g, '{{FROM}}');
sSignature = sSignature.replace(/{{FROM}}/, '');
sSignature = sSignature.replace(/{{DATE}}/, moment().format('llll'));
sSignature = sSignature.replace(/{{FROM}}/g, '');
sSignature = sSignature.replace(/{{DATE}}/g, moment().format('llll'));
if (sData && Enums.ComposeType.Empty === sComposeType &&
-1 < sSignature.indexOf('{{DATA}}'))
@ -675,7 +675,7 @@
sSignature = sSignature.replace('{{DATA}}', sData);
}
sSignature = sSignature.replace(/{{DATA}}/, '');
sSignature = sSignature.replace(/{{DATA}}/g, '');
if (!bHtml)
{

View file

@ -2562,7 +2562,7 @@
Utils.replySubjectAdd = function (sPrefix, sSubject)
{
sPrefix = Utils.trim(sPrefix.toUpperCase());
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
var
iIndex = 0,
@ -2641,7 +2641,7 @@
oMatch = null
;
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
do
{
@ -2660,7 +2660,7 @@
}
while (oMatch || 0 < iLimit);
return sSubject.replace(/[\s]+/, ' ');
return sSubject.replace(/[\s]+/g, ' ');
};
/**
@ -2709,7 +2709,7 @@
oMatch = null
;
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
do
{
@ -2731,7 +2731,7 @@
}
while (oMatch);
sSubject = sSubject.replace(/[\s]+/, ' ');
sSubject = sSubject.replace(/[\s]+/g, ' ');
return sSubject;
};
@ -3389,7 +3389,7 @@
Utils.convertLangName = function (sLanguage, bEng)
{
return Utils.i18n('LANGS_NAMES' + (true === bEng ? '_EN' : '') + '/LANG_' +
sLanguage.toUpperCase().replace(/[^a-zA-Z0-9]+/, '_'), null, sLanguage);
sLanguage.toUpperCase().replace(/[^a-zA-Z0-9]+/g, '_'), null, sLanguage);
};
/**
@ -3572,7 +3572,7 @@
sText = splitPlainText($.trim(sText));
sText = '> ' + sText.replace(/\n/gm, '\n> ');
return sText.replace(/(^|\n)([> ]+)/gm, function () {
return (arguments && 2 < arguments.length) ? arguments[1] + $.trim(arguments[2].replace(/[\s]/, '')) + ' ' : '';
return (arguments && 2 < arguments.length) ? arguments[1] + $.trim(arguments[2].replace(/[\s]/g, '')) + ' ' : '';
});
},
@ -6413,8 +6413,8 @@ module.exports = window;
$sComment = Utils.trim($sComment).replace(/^[(]+/, '').replace(/[)]+$/, '');
// Remove backslash
$sName = $sName.replace(/\\\\(.)/, '$1');
$sComment = $sComment.replace(/\\\\(.)/, '$1');
$sName = $sName.replace(/\\\\(.)/g, '$1');
$sComment = $sComment.replace(/\\\\(.)/g, '$1');
this.name = $sName;
this.email = $sEmail;

File diff suppressed because one or more lines are too long

View file

@ -4991,7 +4991,7 @@
Utils.replySubjectAdd = function (sPrefix, sSubject)
{
sPrefix = Utils.trim(sPrefix.toUpperCase());
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
var
iIndex = 0,
@ -5070,7 +5070,7 @@
oMatch = null
;
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
do
{
@ -5089,7 +5089,7 @@
}
while (oMatch || 0 < iLimit);
return sSubject.replace(/[\s]+/, ' ');
return sSubject.replace(/[\s]+/g, ' ');
};
/**
@ -5138,7 +5138,7 @@
oMatch = null
;
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
do
{
@ -5160,7 +5160,7 @@
}
while (oMatch);
sSubject = sSubject.replace(/[\s]+/, ' ');
sSubject = sSubject.replace(/[\s]+/g, ' ');
return sSubject;
};
@ -5818,7 +5818,7 @@
Utils.convertLangName = function (sLanguage, bEng)
{
return Utils.i18n('LANGS_NAMES' + (true === bEng ? '_EN' : '') + '/LANG_' +
sLanguage.toUpperCase().replace(/[^a-zA-Z0-9]+/, '_'), null, sLanguage);
sLanguage.toUpperCase().replace(/[^a-zA-Z0-9]+/g, '_'), null, sLanguage);
};
/**
@ -6001,7 +6001,7 @@
sText = splitPlainText($.trim(sText));
sText = '> ' + sText.replace(/\n/gm, '\n> ');
return sText.replace(/(^|\n)([> ]+)/gm, function () {
return (arguments && 2 < arguments.length) ? arguments[1] + $.trim(arguments[2].replace(/[\s]/, '')) + ' ' : '';
return (arguments && 2 < arguments.length) ? arguments[1] + $.trim(arguments[2].replace(/[\s]/g, '')) + ' ' : '';
});
},
@ -9149,8 +9149,8 @@ module.exports = window;
$sComment = Utils.trim($sComment).replace(/^[(]+/, '').replace(/[)]+$/, '');
// Remove backslash
$sName = $sName.replace(/\\\\(.)/, '$1');
$sComment = $sComment.replace(/\\\\(.)/, '$1');
$sName = $sName.replace(/\\\\(.)/g, '$1');
$sComment = $sComment.replace(/\\\\(.)/g, '$1');
this.name = $sName;
this.email = $sEmail;
@ -19926,18 +19926,18 @@ module.exports = window;
sSignature = sSignature.substr(6);
}
sSignature = sSignature.replace(/[\r]/, '');
sSignature = sSignature.replace(/[\r]/g, '');
sFrom = Utils.pString(sFrom);
if ('' !== sFrom)
{
sSignature = sSignature.replace(/{{FROM}}/, sFrom);
sSignature = sSignature.replace(/{{FROM}}/g, sFrom);
}
sSignature = sSignature.replace(/[\s]{1,2}{{FROM}}/, '{{FROM}}');
sSignature = sSignature.replace(/[\s]{1,2}{{FROM}}/g, '{{FROM}}');
sSignature = sSignature.replace(/{{FROM}}/, '');
sSignature = sSignature.replace(/{{DATE}}/, moment().format('llll'));
sSignature = sSignature.replace(/{{FROM}}/g, '');
sSignature = sSignature.replace(/{{DATE}}/g, moment().format('llll'));
if (sData && Enums.ComposeType.Empty === sComposeType &&
-1 < sSignature.indexOf('{{DATA}}'))
@ -19946,7 +19946,7 @@ module.exports = window;
sSignature = sSignature.replace('{{DATA}}', sData);
}
sSignature = sSignature.replace(/{{DATA}}/, '');
sSignature = sSignature.replace(/{{DATA}}/g, '');
if (!bHtml)
{

File diff suppressed because one or more lines are too long