mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Remove tags support from code.
This commit is contained in:
parent
0a95b79eb2
commit
36bdce3084
15 changed files with 11 additions and 640 deletions
74
dev/External/ko.js
vendored
74
dev/External/ko.js
vendored
|
|
@ -636,80 +636,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers.contactTags = {
|
||||
'init': function(oElement, fValueAccessor, fAllBindingsAccessor) {
|
||||
|
||||
var
|
||||
Utils = require('Common/Utils'),
|
||||
ContactTagModel = require('Model/ContactTag'),
|
||||
|
||||
$oEl = $(oElement),
|
||||
fValue = fValueAccessor(),
|
||||
fAllBindings = fAllBindingsAccessor(),
|
||||
fAutoCompleteSource = fAllBindings['autoCompleteSource'] || null,
|
||||
fFocusCallback = function (bValue) {
|
||||
if (fValue && fValue.focusTrigger)
|
||||
{
|
||||
fValue.focusTrigger(bValue);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
$oEl.inputosaurus({
|
||||
'parseOnBlur': true,
|
||||
'allowDragAndDrop': false,
|
||||
'focusCallback': fFocusCallback,
|
||||
'inputDelimiters': [',', ';'],
|
||||
'outputDelimiter': ',',
|
||||
'autoCompleteSource': fAutoCompleteSource,
|
||||
'parseHook': function (aInput) {
|
||||
return _.map(aInput, function (sInputValue) {
|
||||
|
||||
var
|
||||
sValue = Utils.trim(sInputValue),
|
||||
oTag = null
|
||||
;
|
||||
|
||||
if ('' !== sValue)
|
||||
{
|
||||
oTag = new ContactTagModel();
|
||||
oTag.name(sValue);
|
||||
return [oTag.toLine(false), oTag];
|
||||
}
|
||||
|
||||
return [sValue, null];
|
||||
|
||||
});
|
||||
},
|
||||
'change': _.bind(function (oEvent) {
|
||||
$oEl.data('ContactTagsValue', oEvent.target.value);
|
||||
fValue(oEvent.target.value);
|
||||
}, this)
|
||||
});
|
||||
},
|
||||
'update': function (oElement, fValueAccessor, fAllBindingsAccessor) {
|
||||
|
||||
var
|
||||
$oEl = $(oElement),
|
||||
fAllValueFunc = fAllBindingsAccessor(),
|
||||
fContactTagsFilter = fAllValueFunc['contactTagsFilter'] || null,
|
||||
sValue = ko.utils.unwrapObservable(fValueAccessor())
|
||||
;
|
||||
|
||||
if ($oEl.data('ContactTagsValue') !== sValue)
|
||||
{
|
||||
$oEl.val(sValue);
|
||||
$oEl.data('ContactTagsValue', sValue);
|
||||
$oEl.inputosaurus('refresh');
|
||||
}
|
||||
|
||||
if (fContactTagsFilter && ko.utils.unwrapObservable(fContactTagsFilter))
|
||||
{
|
||||
$oEl.inputosaurus('focus');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers.command = {
|
||||
'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
|
||||
var
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue