mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
inputosaurus jQuery to native so we can drop jquery-ui
This commit is contained in:
parent
ea2e0c09d8
commit
06abbf0713
33 changed files with 422 additions and 7584 deletions
23
dev/External/User/ko.js
vendored
23
dev/External/User/ko.js
vendored
|
|
@ -1,5 +1,4 @@
|
|||
const ko = window.ko,
|
||||
$ = jQuery,
|
||||
rlContentType = 'application/x-rainloop-action',
|
||||
validTransfer = data => ['move','copy'].includes(data.dropEffect) // effectAllowed
|
||||
&& data.getData('application/x-rainloop-messages');
|
||||
|
|
@ -39,24 +38,18 @@ ko.bindingHandlers.moment = {
|
|||
ko.bindingHandlers.emailsTags = {
|
||||
init: (element, fValueAccessor, fAllBindingsAccessor) => {
|
||||
const EmailModel = require('Model/Email').default,
|
||||
$el = $(element),
|
||||
fValue = fValueAccessor(),
|
||||
fAllBindings = fAllBindingsAccessor(),
|
||||
inputDelimiters = [',', ';', '\n'];
|
||||
|
||||
$el.inputosaurus({
|
||||
focusCallback: value => {
|
||||
if (fValue && fValue.focused) {
|
||||
fValue.focused(!!value);
|
||||
}
|
||||
},
|
||||
element.inputosaurus = new window.Inputosaurus(element, {
|
||||
focusCallback: value => fValue && fValue.focused && fValue.focused(!!value),
|
||||
autoCompleteSource: fAllBindings.autoCompleteSource || null,
|
||||
splitHook: value => {
|
||||
const v = value.trim();
|
||||
if (v && inputDelimiters.includes(v.substr(-1))) {
|
||||
return EmailModel.splitEmailLine(value);
|
||||
}
|
||||
return null;
|
||||
return (v && inputDelimiters.includes(v.substr(-1)))
|
||||
? EmailModel.splitEmailLine(value)
|
||||
: null;
|
||||
},
|
||||
parseHook: input =>
|
||||
input.map(inputValue => {
|
||||
|
|
@ -72,8 +65,8 @@ ko.bindingHandlers.emailsTags = {
|
|||
});
|
||||
|
||||
if (fValue && fValue.focused && fValue.focused.subscribe) {
|
||||
fValue.focused.subscribe((value) => {
|
||||
$el.inputosaurus(value ? 'focus' : 'blur');
|
||||
fValue.focused.subscribe(value => {
|
||||
element.inputosaurus[value ? 'focus' : 'blur']();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
@ -83,7 +76,7 @@ ko.bindingHandlers.emailsTags = {
|
|||
if (element.EmailsTagsValue !== value) {
|
||||
element.value = value;
|
||||
element.EmailsTagsValue = value;
|
||||
$(element).inputosaurus('refresh');
|
||||
element.inputosaurus.refresh();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -304,10 +304,6 @@ html.rl-left-panel-disabled {
|
|||
.hide-on-panel-disabled {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&.ui-state-disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
#rl-right {
|
||||
|
|
|
|||
|
|
@ -92,19 +92,6 @@
|
|||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&.ui-sortable-helper {
|
||||
background: #F5F5F5;
|
||||
border: 1px solid #DDD;
|
||||
|
||||
.button-delete, .delete-account {
|
||||
display: none;
|
||||
}
|
||||
|
||||
td {
|
||||
border-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.identity-item {
|
||||
|
|
@ -134,18 +121,5 @@
|
|||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&.ui-sortable-helper {
|
||||
background: #F5F5F5;
|
||||
border: 1px solid #DDD;
|
||||
|
||||
.button-delete, .delete-identity {
|
||||
display: none;
|
||||
}
|
||||
|
||||
td {
|
||||
border-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,18 +88,5 @@
|
|||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&.ui-sortable-helper {
|
||||
background: #F5F5F5;
|
||||
border: 1px solid #DDD;
|
||||
|
||||
.button-delete, .delete-filter {
|
||||
display: none;
|
||||
}
|
||||
|
||||
td {
|
||||
border-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,18 +77,5 @@
|
|||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&.ui-sortable-helper {
|
||||
background: #F5F5F5;
|
||||
border: 1px solid #DDD;
|
||||
|
||||
.button-delete, .delete-template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
td {
|
||||
border-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@
|
|||
color: #555;
|
||||
z-index: 100;
|
||||
|
||||
&.ui-draggable.ui-draggable-dragging {
|
||||
z-index: 101;
|
||||
}
|
||||
|
||||
position: relative;
|
||||
|
||||
a {
|
||||
|
|
@ -74,10 +70,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.ui-autocomplete {
|
||||
z-index: 2000;
|
||||
}
|
||||
|
||||
.inputosaurus-fake-span {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue