Momentor (moment optimization)

This commit is contained in:
RainLoop Team 2015-03-07 04:32:06 +04:00
parent 7750587be1
commit 147dce6e4a
20 changed files with 331 additions and 173 deletions

23
dev/External/ko.js vendored
View file

@ -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);
}
};