mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Improve GUI (#1014)
This commit is contained in:
parent
b3299725f6
commit
f64b63c549
16 changed files with 218 additions and 76 deletions
23
dev/External/ko.js
vendored
23
dev/External/ko.js
vendored
|
|
@ -20,6 +20,29 @@
|
|||
}
|
||||
;
|
||||
|
||||
ko.bindingHandlers.updateWidth = {
|
||||
'init': function (oElement, fValueAccessor) {
|
||||
var
|
||||
$w = $(window),
|
||||
$oEl = $(oElement),
|
||||
fValue = fValueAccessor(),
|
||||
fInit = function(){
|
||||
fValue($oEl.width());
|
||||
window.setTimeout(function(){
|
||||
fValue($oEl.width());
|
||||
}, 500);
|
||||
};
|
||||
;
|
||||
|
||||
$w.on('resize', fInit);
|
||||
fInit();
|
||||
|
||||
ko.utils.domNodeDisposal.addDisposeCallback(oElement, function () {
|
||||
$w.off('resize', fInit);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers.editor = {
|
||||
'init': function (oElement, fValueAccessor) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue