mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Fix naming
This commit is contained in:
parent
2c6618e793
commit
fb680596a6
2 changed files with 18 additions and 18 deletions
|
|
@ -1,15 +1,15 @@
|
|||
ko.bindingHandlers['visible'] = {
|
||||
'update': (element, valueAccessor) => {
|
||||
var value = ko.utils.unwrapObservable(valueAccessor());
|
||||
var isCurrentlyVisible = !(element.style.display == "none");
|
||||
if (value && !isCurrentlyVisible)
|
||||
element.style.display = "";
|
||||
else if (isCurrentlyVisible && !value)
|
||||
element.style.display = "none";
|
||||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers['hidden'] = {
|
||||
'update': (element, valueAccessor) =>
|
||||
element.hidden = !!ko.utils.unwrapObservable(valueAccessor())
|
||||
};
|
||||
ko.bindingHandlers['visible'] = {
|
||||
'update': (element, valueAccessor) => {
|
||||
var value = ko.utils.unwrapObservable(valueAccessor());
|
||||
var isCurrentlyVisible = !(element.style.display == "none");
|
||||
if (value && !isCurrentlyVisible)
|
||||
element.style.display = "";
|
||||
else if (isCurrentlyVisible && !value)
|
||||
element.style.display = "none";
|
||||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers['hidden'] = {
|
||||
'update': (element, valueAccessor) =>
|
||||
element.hidden = !!ko.utils.unwrapObservable(valueAccessor())
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue