mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Cleanup knockout subscribables
This commit is contained in:
parent
5748dea4bc
commit
b2a492bdab
27 changed files with 73 additions and 75 deletions
|
|
@ -29,16 +29,6 @@ export const
|
|||
domItem && item && undefined !== item.disabled
|
||||
&& domItem.classList.toggle('disabled', domItem.disabled = item.disabled),
|
||||
|
||||
addObservablesTo = (target, observables) =>
|
||||
forEachObjectEntry(observables, (key, value) =>
|
||||
target[key] = /*isArray(value) ? ko.observableArray(value) :*/ ko.observable(value) ),
|
||||
|
||||
addComputablesTo = (target, computables) =>
|
||||
forEachObjectEntry(computables, (key, fn) => target[key] = ko.computed(fn, {'pure':true})),
|
||||
|
||||
addSubscribablesTo = (target, subscribables) =>
|
||||
forEachObjectEntry(subscribables, (key, fn) => target[key].subscribe(fn)),
|
||||
|
||||
inFocus = () => {
|
||||
try {
|
||||
return doc.activeElement && doc.activeElement.matches(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue