fix autocomplete & labels

This commit is contained in:
bkfox
2024-03-28 23:10:25 +01:00
parent 339ba9a55a
commit 870c866541
12 changed files with 23283 additions and 14669 deletions

View File

@ -94,9 +94,13 @@ export default {
this.inputValue = value
},
inputValue(value) {
if(value != this.inputValue && value != this.modelValue)
inputValue(value, old) {
if(value != old && value != this.modelValue) {
this.$emit('update:modelValue', value)
this.$emit('change', {target: this.$refs.input})
}
if(this.selectedLabel != value)
this.selectedIndex = -1
},
},
@ -176,8 +180,11 @@ export default {
},
onBlur(event) {
var index = event.relatedTarget && event.relatedTarget.dataset.autocompleteIndex;
if(index !== undefined)
if(!this.items.length)
return
var index = event.relatedTarget && Math.parseInt(event.relatedTarget.dataset.autocompleteIndex);
if(index !== undefined && index !== null)
this.select(index, false, false)
this.cursor = -1;
},

View File

@ -12,7 +12,7 @@
<span class="icon is-small">
<i class="fa fa-pencil"></i>
</span>
<span>Texte</span>
<span>{{ labels.text }}</span>
</button>
</p>
<p class="control">
@ -21,7 +21,16 @@
<span class="icon is-small">
<i class="fa fa-list"></i>
</span>
<span>Liste</span>
<span>{{ labels.list }}</span>
</button>
</p>
<p class="control ml-3">
<button type="button" class="button is-info square"
:title="labels.settings"
@click="$refs.settings.open()">
<span class="icon is-small">
<i class="fa fa-cog"></i>
</span>
</button>
</p>
</div>
@ -44,24 +53,10 @@
v-slot:[slot]="data">
<slot v-if="name != 'row-tail'" :name="name" v-bind="data"/>
</template>
<template #footer>
<div class="field">
<p class="control">
<button type="button" class="button is-info"
@click="$refs.settings.open()">
<span class="icon is-small">
<i class="fa fa-cog"></i>
</span>
<span>Options</span>
</button>
</p>
</div>
</template>
</a-form-set>
</section>
<a-modal ref="settings" title="Options">
<a-modal ref="settings" :title="labels.settings">
<template #default>
<div class="field">
<label class="label" style="vertical-align: middle">

View File

@ -1,4 +1,4 @@
import AActionButton from './AActionButton'
import AActionButton from './AActionButton.vue'
import AAutocomplete from './AAutocomplete'
import ACarousel from './ACarousel'
import ADropdown from "./ADropdown"

View File

@ -2,9 +2,6 @@
* This module includes code available for both the public website and
* administration interface)
*/
//-- vendor
import '@fortawesome/fontawesome-free/css/all.min.css';
//-- aircox
import App, {PlayerApp} from './app'

View File

@ -1,9 +1,9 @@
@use "./vars";
@use "./components";
@import "~bulma/sass/utilities/_all.sass";
@import "~bulma/sass/elements/button";
@import "~bulma/sass/components/navbar";
@import "bulma/sass/utilities/_all.sass";
@import "bulma/sass/elements/button";
@import "bulma/sass/components/navbar";
// enforce button usage inside custom application

View File

@ -1,4 +1,5 @@
@import 'v-calendar/style.css';
@import '@fortawesome/fontawesome-free/css/all.min.css';
// ---- bulma
$body-color: #000;
@ -6,29 +7,29 @@ $title-color: #000;
$modal-content-width: 80%;
@import "~bulma/sass/utilities/_all.sass";
@import "bulma/sass/utilities/_all.sass";
@import "~bulma/sass/base/_all";
@import "~bulma/sass/components/dropdown";
// @import "~bulma/sass/components/card";
@import "~bulma/sass/components/media";
@import "~bulma/sass/components/message";
@import "~bulma/sass/components/modal";
//@import "~bulma/sass/components/pagination";
@import "bulma/sass/base/_all";
@import "bulma/sass/components/dropdown";
// @import "bulma/sass/components/card";
@import "bulma/sass/components/media";
@import "bulma/sass/components/message";
@import "bulma/sass/components/modal";
//@import "bulma/sass/components/pagination";
@import "~bulma/sass/form/_all";
@import "~bulma/sass/grid/_all";
@import "~bulma/sass/helpers/_all";
@import "~bulma/sass/layout/_all";
@import "~bulma/sass/elements/box";
// @import "~bulma/sass/elements/button";
@import "~bulma/sass/elements/container";
// @import "~bulma/sass/elements/content";
@import "~bulma/sass/elements/icon";
// @import "~bulma/sass/elements/image";
// @import "~bulma/sass/elements/notification";
// @import "~bulma/sass/elements/progress";
@import "~bulma/sass/elements/table";
@import "~bulma/sass/elements/tag";
//@import "~bulma/sass/elements/title";
@import "bulma/sass/form/_all";
@import "bulma/sass/grid/_all";
@import "bulma/sass/helpers/_all";
@import "bulma/sass/layout/_all";
@import "bulma/sass/elements/box";
// @import "bulma/sass/elements/button";
@import "bulma/sass/elements/container";
// @import "bulma/sass/elements/content";
@import "bulma/sass/elements/icon";
// @import "bulma/sass/elements/image";
// @import "bulma/sass/elements/notification";
// @import "bulma/sass/elements/progress";
@import "bulma/sass/elements/table";
@import "bulma/sass/elements/tag";
//@import "bulma/sass/elements/title";