mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Code refactoring
This commit is contained in:
parent
ffde4f03a8
commit
b7709c8117
21 changed files with 291 additions and 192 deletions
3
dev/External/Opentip.js
vendored
3
dev/External/Opentip.js
vendored
|
|
@ -30,7 +30,8 @@
|
|||
};
|
||||
|
||||
Opentip.styles.rainloopTestTip = {
|
||||
'extends': 'rainloop'
|
||||
'extends': 'rainloop',
|
||||
'className': 'rainloopTestTip'
|
||||
};
|
||||
|
||||
module.exports = Opentip;
|
||||
|
|
|
|||
33
dev/External/ko.js
vendored
33
dev/External/ko.js
vendored
|
|
@ -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) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue