Add jQuery finger lib

Add autofocus in "to" field 
+ small inputosaurus improvement
This commit is contained in:
RainLoop Team 2013-12-13 14:11:30 +04:00
parent c9b5194baf
commit 5877ff77dd
19 changed files with 613 additions and 15 deletions

View file

@ -525,6 +525,13 @@ ko.bindingHandlers.emailsTags = {
$oEl.inputosaurus('refresh');
}
});
if (fValue.focusTrigger)
{
fValue.focusTrigger.subscribe(function () {
$oEl.inputosaurus('focus');
});
}
}
};

View file

@ -471,8 +471,6 @@ Utils.fixLongSubject = function (sSubject)
do
{
oMatch = /^Re(\[([\d]+)\]|):[\s]{0,3}Re(\[([\d]+)\]|):/ig.exec(sSubject);
window.console.log(sSubject);
window.console.log(oMatch);
if (!oMatch || Utils.isUnd(oMatch[0]))
{
oMatch = null;

View file

@ -31,6 +31,7 @@ function PopupsComposeViewModel()
this.resizer = ko.observable(false).extend({'throttle': 50});
this.to = ko.observable('');
this.to.focusTrigger = ko.observable(false);
this.cc = ko.observable('');
this.bcc = ko.observable('');
@ -646,6 +647,7 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
{
case Enums.ComposeType.Empty:
break;
case Enums.ComposeType.Reply:
this.to(fEmailArrayToStringLineHelper(oMessage.replyEmails(oExcludeEmail)));
this.subject(Utils.replySubjectAdd('Re', sSubject));
@ -750,6 +752,11 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
self.addMessageAsAttachment(oMessage);
});
}
if ('' === this.to())
{
this.to.focusTrigger(!this.to.focusTrigger());
}
aDownloads = this.getAttachmentsDownloadsForUpload();
if (Utils.isNonEmptyArray(aDownloads))