mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Small fixes and code refactoring
This commit is contained in:
parent
e6c712862d
commit
1a85330770
67 changed files with 413 additions and 181 deletions
23
dev/External/ko.js
vendored
23
dev/External/ko.js
vendored
|
|
@ -656,9 +656,9 @@
|
|||
fAllBindings = fAllBindingsAccessor(),
|
||||
fAutoCompleteSource = fAllBindings['autoCompleteSource'] || null,
|
||||
fFocusCallback = function (bValue) {
|
||||
if (fValue && fValue.focusTrigger)
|
||||
if (fValue && fValue.focused)
|
||||
{
|
||||
fValue.focusTrigger(bValue);
|
||||
fValue.focused(!!bValue);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
|
@ -693,14 +693,20 @@
|
|||
fValue(oEvent.target.value);
|
||||
}, this)
|
||||
});
|
||||
|
||||
if (fValue && fValue.focused && fValue.focused.subscribe)
|
||||
{
|
||||
fValue.focused.subscribe(function (bValue) {
|
||||
$oEl.inputosaurus(!!bValue ? 'focus' : 'blur');
|
||||
});
|
||||
}
|
||||
},
|
||||
'update': function (oElement, fValueAccessor, fAllBindingsAccessor) {
|
||||
'update': function (oElement, fValueAccessor) {
|
||||
|
||||
var
|
||||
$oEl = $(oElement),
|
||||
fAllValueFunc = fAllBindingsAccessor(),
|
||||
fEmailsTagsFilter = fAllValueFunc['emailsTagsFilter'] || null,
|
||||
sValue = ko.unwrap(fValueAccessor())
|
||||
fValue = fValueAccessor(),
|
||||
sValue = ko.unwrap(fValue)
|
||||
;
|
||||
|
||||
if ($oEl.data('EmailsTagsValue') !== sValue)
|
||||
|
|
@ -709,11 +715,6 @@
|
|||
$oEl.data('EmailsTagsValue', sValue);
|
||||
$oEl.inputosaurus('refresh');
|
||||
}
|
||||
|
||||
if (fEmailsTagsFilter && ko.unwrap(fEmailsTagsFilter))
|
||||
{
|
||||
$oEl.inputosaurus('focus');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue