Merge branch 'master' of github.com:akaunting/akaunting into 2.1-dev

This commit is contained in:
Cüneyt Şentürk
2020-09-23 14:25:40 +03:00
54 changed files with 1364 additions and 522 deletions

View File

@@ -18,7 +18,7 @@
</el-carousel-item>
<el-carousel-item v-for="(screenshot, index) in screenshots" :key="index">
<img class="d-block w-100 carousel-frame" height="365px" :src="screenshot.path_string" :alt="screenshot.alt_attribute">
<img @click="openGallery(index)" class="d-block w-100 carousel-frame" height="365px" :src="screenshot.path_string" :alt="screenshot.alt_attribute">
<div class="carousel-description py-2" v-if="screenshot.description">
{{ screenshot.description }}
</div>
@@ -27,12 +27,26 @@
</div>
</el-carousel-item>
</el-carousel>
<LightBox
ref="lightbox"
:media="media"
:show-caption="true"
:show-light-box="false"
/>
</div>
</template>
<script>
import Vue from 'vue';
import {Image, Carousel, CarouselItem} from 'element-ui';
import LightBox from 'vue-image-lightbox';
import 'vue-image-lightbox/dist/vue-image-lightbox.min.css';
import VueLazyLoad from 'vue-lazyload';
Vue.use(VueLazyLoad);
export default {
name: "akaunting-carousel",
@@ -40,6 +54,7 @@ export default {
[Image.name]: Image,
[Carousel.name]: Carousel,
[CarouselItem.name]: CarouselItem,
LightBox
},
props: {
@@ -108,6 +123,36 @@ export default {
default: 'horizontal',
description: "display direction (horizontal/vertical)"
}
},
mounted() {
let media = [];
if (this.screenshots.length) {
let name = this.name;
this.screenshots.forEach(function(screenshot) {
media.push({ // For image
thumb: screenshot.path_string,
src: screenshot.path_string,
caption: (screenshot.description.length) ? screenshot.description : name,
});
});
}
this.media = media;
},
data: function () {
return {
media: [],
}
},
methods: {
openGallery(index) {
this.$refs.lightbox.showImage(index)
}
}
}
</script>

View File

@@ -11,7 +11,7 @@
formClasses
]"
:error="formError">
<el-select v-model="real_model" @input="change" disabled filterable v-if="disabled"
<el-select v-model="real_model" @input="change" disabled filterable v-if="disabled && !multiple"
remote
reserve-keyword
:placeholder="placeholder"
@@ -165,6 +165,83 @@
</el-option>
</el-select>
<el-select v-model="real_model" @input="change" filterable v-if="disabled && multiple && !collapse" multiple disabled
remote
reserve-keyword
:placeholder="placeholder"
:remote-method="remoteMethod"
:loading="loading">
<div v-if="addNew.status && options.length != 0" class="el-select-dropdown__wrap" slot="empty">
<p class="el-select-dropdown__empty">
{{ noMatchingDataText }}
</p>
<ul class="el-scrollbar__view el-select-dropdown__list">
<li class="el-select-dropdown__item el-select__footer">
<div @click="onAddItem">
<i class="fas fa-plus"></i>
<span>
{{ add_new_text }}
</span>
</div>
</li>
</ul>
</div>
<div v-else-if="addNew.status && options.length == 0" slot="empty">
<p class="el-select-dropdown__empty">
{{ noDataText }}
</p>
<ul class="el-scrollbar__view el-select-dropdown__list">
<li class="el-select-dropdown__item el-select__footer">
<div @click="onAddItem">
<i class="fas fa-plus"></i>
<span>
{{ add_new_text }}
</span>
</div>
</li>
</ul>
</div>
<template slot="prefix">
<span class="el-input__suffix-inner el-select-icon">
<i :class="'select-icon-position el-input__icon fa fa-' + icon"></i>
</span>
</template>
<el-option v-if="!group" v-for="(label, value) in selectOptions"
:key="value"
:label="label"
:value="value">
<span class="float-left">{{ label }}</span>
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
</el-option>
<el-option-group
v-if="group"
v-for="(options, name) in selectOptions"
:key="name"
:label="name">
<el-option
v-for="(label, value) in options"
:key="value"
:label="label"
:value="value">
<span class="float-left">{{ label }}</span>
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
</el-option>
</el-option-group>
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
<div @click="onAddItem">
<i class="fas fa-plus"></i>
<span>
{{ add_new_text }}
</span>
</div>
</el-option>
</el-select>
<el-select v-model="real_model" @input="change" filterable v-if="!disabled && multiple && !collapse" multiple
remote
reserve-keyword
@@ -618,7 +695,7 @@ export default {
this.$emit('interface', this.real_model);
setTimeout(function() {
this.change();
//this.change(); for invoice item
}.bind(this), 800);
},