mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Momentor (moment optimization)
This commit is contained in:
parent
7750587be1
commit
147dce6e4a
20 changed files with 331 additions and 173 deletions
23
dev/External/ko.js
vendored
23
dev/External/ko.js
vendored
|
|
@ -302,16 +302,35 @@
|
|||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers.moment = {
|
||||
'init': function (oElement, fValueAccessor) {
|
||||
require('Common/Momentor').momentToNode(
|
||||
$(oElement).addClass('moment').data('moment-time', ko.unwrap(fValueAccessor()))
|
||||
);
|
||||
},
|
||||
'update': function (oElement, fValueAccessor) {
|
||||
require('Common/Momentor').momentToNode(
|
||||
$(oElement).data('moment-time', ko.unwrap(fValueAccessor()))
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers.i18nInit = {
|
||||
'init': function (oElement) {
|
||||
require('Common/Translator').i18nToNode(oElement);
|
||||
require('Common/Translator').i18nToNodes(oElement);
|
||||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers.translatorInit = {
|
||||
'init': function (oElement) {
|
||||
require('Common/Translator').i18nToNodes(oElement);
|
||||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers.i18nUpdate = {
|
||||
'update': function (oElement, fValueAccessor) {
|
||||
ko.unwrap(fValueAccessor());
|
||||
require('Common/Translator').i18nToNode(oElement);
|
||||
require('Common/Translator').i18nToNodes(oElement);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue