Code refactoring

This commit is contained in:
RainLoop Team 2015-04-06 23:32:19 +04:00
parent ffde4f03a8
commit b7709c8117
21 changed files with 291 additions and 192 deletions

View file

@ -30,7 +30,8 @@
};
Opentip.styles.rainloopTestTip = {
'extends': 'rainloop'
'extends': 'rainloop',
'className': 'rainloopTestTip'
};
module.exports = Opentip;

33
dev/External/ko.js vendored
View file

@ -20,6 +20,39 @@
}
;
ko.bindingHandlers.editor = {
'init': function (oElement, fValueAccessor) {
var
fValue = fValueAccessor(),
oEditor = null,
fUpdateEditorValue = function () {
if (oEditor)
{
oEditor.setHtmlOrPlain(fValue());
}
},
fUpdateKoValue = function () {
if (oEditor)
{
fValue(oEditor.getDataWithHtmlMark());
}
},
HtmlEditor = require('Common/HtmlEditor')
;
if (fValue)
{
oEditor = new HtmlEditor(oElement, fUpdateKoValue, fUpdateEditorValue, fUpdateKoValue);
fValue.__editor = oEditor;
fValue.__fetchEditorValue = fUpdateKoValue;
fValue.__updateEditorValue = fUpdateEditorValue;
fValue.subscribe(fUpdateEditorValue);
}
}
};
ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) {