mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
A lot small fixes
This commit is contained in:
parent
4457cdbc23
commit
09334159c2
38 changed files with 1496 additions and 239 deletions
46
dev/External/ko.js
vendored
46
dev/External/ko.js
vendored
|
|
@ -811,7 +811,7 @@
|
|||
'parseOnBlur': true,
|
||||
'allowDragAndDrop': true,
|
||||
'focusCallback': fFocusCallback,
|
||||
'inputDelimiters': [',', ';'],
|
||||
'inputDelimiters': [',', ';', '\n'],
|
||||
'autoCompleteSource': fAutoCompleteSource,
|
||||
// 'elementHook': function (oEl, oItem) {
|
||||
// if (oEl && oItem)
|
||||
|
|
@ -821,23 +821,53 @@
|
|||
// }
|
||||
// },
|
||||
'parseHook': function (aInput) {
|
||||
return _.map(aInput, function (sInputValue) {
|
||||
|
||||
var aResult = [];
|
||||
|
||||
_.each(aInput, function (sInputValue) {
|
||||
|
||||
var
|
||||
aM = null,
|
||||
aValues = [],
|
||||
sValue = Utils.trim(sInputValue),
|
||||
oEmail = null
|
||||
;
|
||||
|
||||
if ('' !== sValue)
|
||||
{
|
||||
oEmail = new EmailModel();
|
||||
oEmail.mailsoParse(sValue);
|
||||
return [oEmail.toLine(false), oEmail];
|
||||
aM = sValue.match(/[@]/g);
|
||||
if (aM && 0 < aM.length)
|
||||
{
|
||||
sValue = sValue.replace(/[\r\n]+/g, '; ').replace(/[\s]+/g, ' ');
|
||||
aValues = EmailModel.splitHelper(sValue, ';');
|
||||
|
||||
_.each(aValues, function (sV) {
|
||||
|
||||
oEmail = new EmailModel();
|
||||
oEmail.mailsoParse(sV);
|
||||
|
||||
if (oEmail.email)
|
||||
{
|
||||
aResult.push([oEmail.toLine(false), oEmail]);
|
||||
}
|
||||
else
|
||||
{
|
||||
aResult.push(['', null]);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
aResult.push([sInputValue, null]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aResult.push([sInputValue, null]);
|
||||
}
|
||||
|
||||
return [sValue, null];
|
||||
|
||||
});
|
||||
|
||||
return aResult;
|
||||
},
|
||||
'change': _.bind(function (oEvent) {
|
||||
$oEl.data('EmailsTagsValue', oEvent.target.value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue