diff --git a/client/components/ExternalLibs/ExternalLibs.vue b/client/components/ExternalLibs/ExternalLibs.vue
index 4447ae3d..7b01b44a 100644
--- a/client/components/ExternalLibs/ExternalLibs.vue
+++ b/client/components/ExternalLibs/ExternalLibs.vue
@@ -13,7 +13,7 @@
- {{ removeProtocol(rootLink) }}
-
Закладки
+
@@ -46,6 +48,7 @@
+
Открыть
Открыть в читалке
@@ -67,7 +70,7 @@
placeholder="Ссылка для закладки" maxlength="2000" @focus="onInputFocus">
-
@@ -154,6 +157,29 @@ class ExternalLibs extends Vue {
}
mounted() {
+ //Поправка метода toggleOption компонента select фреймворка quasar, необходимо другое поведение
+ //$emit('input'.. вызывается всегда
+ this.toggleOption = function(opt, keepOpen) {
+ if (this.editable !== true || opt === void 0 || this.isOptionDisabled(opt) === true) {
+ return;
+ }
+
+ const optValue = this.getOptionValue(opt);
+
+ if (this.multiple !== true) {
+ if (keepOpen !== true) {
+ this.updateInputValue(this.fillInput === true ? this.getOptionLabel(opt) : '', true, true);
+ this.hidePopup();
+ }
+
+ this.$refs.target !== void 0 && this.$refs.target.focus();
+ this.$emit('input', this.emitValue === true ? optValue : opt);
+ }
+ };
+
+ this.$refs.rootLink.toggleOption = this.toggleOption;
+ this.$refs.selectedLink.toggleOption = this.toggleOption;
+
(async() => {
//подождем this.mode
let i = 0;
@@ -405,6 +431,15 @@ class ExternalLibs extends Vue {
event.target.select();
}
+ rootLinkInput() {
+ this.updateSelectedLink();
+ this.updateStartLink();
+ }
+
+ selectedLinkInput() {
+ this.updateStartLink();
+ }
+
submitUrl() {
if (this.bookUrl) {
this.sendMessage({type: 'submitUrl', data: {
@@ -423,6 +458,7 @@ class ExternalLibs extends Vue {
this.addBookmarkVisible = true;
this.$nextTick(() => {
this.$refs.bookmarkLink.focus();
+ this.$refs.defaultRootLink.toggleOption = this.toggleOption;
});
}
@@ -437,6 +473,10 @@ class ExternalLibs extends Vue {
}
}
+ defaultRootLinkInput() {
+ this.updateBookmarkLink();
+ }
+
async okAddBookmark() {
const link = this.addProtocol(this.bookmarkLink);
let index = -1;