mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 17:20:15 -06:00
Merge pull request #338 from hargata/Hargata/user.suggested.improvement
Updated version number
This commit is contained in:
commit
299444d767
@ -201,7 +201,7 @@
|
|||||||
<img src="/defaults/lubelogger_logo.png" />
|
<img src="/defaults/lubelogger_logo.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<small class="text-body-secondary">Version 1.2.2</small>
|
<small class="text-body-secondary">Version 1.2.3</small>
|
||||||
</div>
|
</div>
|
||||||
<p class="lead">
|
<p class="lead">
|
||||||
Proudly developed in the rural town of Price, Utah by Hargata Softworks.
|
Proudly developed in the rural town of Price, Utah by Hargata Softworks.
|
||||||
|
|||||||
@ -300,7 +300,6 @@
|
|||||||
self.$input.attr('disabled', 'disabled');
|
self.$input.attr('disabled', 'disabled');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (event.which) {
|
switch (event.which) {
|
||||||
// BACKSPACE
|
// BACKSPACE
|
||||||
case 8:
|
case 8:
|
||||||
@ -340,6 +339,30 @@
|
|||||||
$input.focus();
|
$input.focus();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
//COPY EVENT
|
||||||
|
case 67:
|
||||||
|
if (event.ctrlKey) {
|
||||||
|
event.preventDefault();
|
||||||
|
navigator.clipboard.writeText(self.itemsArray.join(" "));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//PASTE EVENT
|
||||||
|
case 86:
|
||||||
|
if (event.ctrlKey) {
|
||||||
|
setTimeout(function () {
|
||||||
|
var pastedString = $input.val();
|
||||||
|
//clear pasted string.
|
||||||
|
$input.val('');
|
||||||
|
//process input one by one.
|
||||||
|
if (pastedString.length > 0) {
|
||||||
|
var tagsToAdd = pastedString.split(" ");
|
||||||
|
tagsToAdd.forEach(x => {
|
||||||
|
self.add(x);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
@ -358,17 +381,13 @@
|
|||||||
maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
|
maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
|
||||||
if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {
|
if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {
|
||||||
//check if confirm keys are in input and then replace them.
|
//check if confirm keys are in input and then replace them.
|
||||||
|
event.preventDefault();
|
||||||
text = text.replace(String.fromCharCode(event.which), "")
|
text = text.replace(String.fromCharCode(event.which), "")
|
||||||
// Only attempt to add a tag if there is data in the field
|
// Only attempt to add a tag if there is data in the field
|
||||||
if (text.length !== 0) {
|
if (text.length !== 0) {
|
||||||
self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);
|
self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);
|
||||||
$input.val('');
|
$input.val('');
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the field is empty, let the event triggered fire as usual
|
|
||||||
if (self.options.cancelConfirmKeysOnEmpty === false) {
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
var textLength = $input.val().length,
|
var textLength = $input.val().length,
|
||||||
wordSpace = Math.ceil(textLength / 5),
|
wordSpace = Math.ceil(textLength / 5),
|
||||||
@ -388,17 +407,13 @@
|
|||||||
maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
|
maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
|
||||||
if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {
|
if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {
|
||||||
//check if confirm keys are in input and then replace them.
|
//check if confirm keys are in input and then replace them.
|
||||||
text = text.replace(String.fromCharCode(event.which), "")
|
event.preventDefault();
|
||||||
|
text = text.replace(String.fromCharCode(event.which), "");
|
||||||
// Only attempt to add a tag if there is data in the field
|
// Only attempt to add a tag if there is data in the field
|
||||||
if (text.length !== 0) {
|
if (text.length !== 0) {
|
||||||
self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);
|
self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);
|
||||||
$input.val('');
|
$input.val('');
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the field is empty, let the event triggered fire as usual
|
|
||||||
if (self.options.cancelConfirmKeysOnEmpty === false) {
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset internal input's size
|
// Reset internal input's size
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user