Some Indentation Done
This commit is contained in:
parent
a0a8106053
commit
8f0548b70c
|
|
@ -45,7 +45,6 @@
|
||||||
@onFilterAdded="addFilters(attribute.code, $event)"
|
@onFilterAdded="addFilters(attribute.code, $event)"
|
||||||
:appliedFilterValues="appliedFilters[attribute.code]">
|
:appliedFilterValues="appliedFilters[attribute.code]">
|
||||||
</filter-attribute-item>
|
</filter-attribute-item>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -70,7 +69,6 @@
|
||||||
<li
|
<li
|
||||||
class="item"
|
class="item"
|
||||||
v-for='(option, index) in attribute.options'>
|
v-for='(option, index) in attribute.options'>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="checkbox"
|
class="checkbox"
|
||||||
@click="optionClicked(option.id, $event)">
|
@click="optionClicked(option.id, $event)">
|
||||||
|
|
@ -105,6 +103,7 @@
|
||||||
id="price_from" />
|
id="price_from" />
|
||||||
|
|
||||||
<label class="col text-center" for="to">{{ __('shop::app.products.filter-to') }}</label>
|
<label class="col text-center" for="to">{{ __('shop::app.products.filter-to') }}</label>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
disabled
|
disabled
|
||||||
|
|
@ -120,6 +119,7 @@
|
||||||
<script>
|
<script>
|
||||||
Vue.component('layered-navigation', {
|
Vue.component('layered-navigation', {
|
||||||
template: '#layered-navigation-template',
|
template: '#layered-navigation-template',
|
||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
appliedFilters: {},
|
appliedFilters: {},
|
||||||
|
|
@ -162,6 +162,7 @@
|
||||||
|
|
||||||
Vue.component('filter-attribute-item', {
|
Vue.component('filter-attribute-item', {
|
||||||
template: '#filter-attribute-item-template',
|
template: '#filter-attribute-item-template',
|
||||||
|
|
||||||
props: [
|
props: [
|
||||||
'index',
|
'index',
|
||||||
'attribute',
|
'attribute',
|
||||||
|
|
@ -180,16 +181,13 @@
|
||||||
sliderConfig: {
|
sliderConfig: {
|
||||||
max: maxPrice,
|
max: maxPrice,
|
||||||
value: [ 0, 0 ],
|
value: [ 0, 0 ],
|
||||||
|
|
||||||
processStyle: {
|
processStyle: {
|
||||||
"backgroundColor": "#FF6472"
|
"backgroundColor": "#FF6472"
|
||||||
},
|
},
|
||||||
|
|
||||||
tooltipStyle: {
|
tooltipStyle: {
|
||||||
"borderColor": "#FF6472",
|
"borderColor": "#FF6472",
|
||||||
"backgroundColor": "#FF6472",
|
"backgroundColor": "#FF6472",
|
||||||
},
|
},
|
||||||
|
|
||||||
priceTo: 0,
|
priceTo: 0,
|
||||||
priceFrom: 0,
|
priceFrom: 0,
|
||||||
}
|
}
|
||||||
|
|
@ -202,6 +200,7 @@
|
||||||
|
|
||||||
if (this.appliedFilterValues && this.appliedFilterValues.length) {
|
if (this.appliedFilterValues && this.appliedFilterValues.length) {
|
||||||
this.appliedFilters = this.appliedFilterValues;
|
this.appliedFilters = this.appliedFilterValues;
|
||||||
|
|
||||||
if (this.attribute.type == 'price') {
|
if (this.attribute.type == 'price') {
|
||||||
this.sliderConfig.value = this.appliedFilterValues;
|
this.sliderConfig.value = this.appliedFilterValues;
|
||||||
this.sliderConfig.priceFrom = this.appliedFilterValues[0];
|
this.sliderConfig.priceFrom = this.appliedFilterValues[0];
|
||||||
|
|
@ -234,6 +233,7 @@
|
||||||
|
|
||||||
optionClicked: function (id, {target}) {
|
optionClicked: function (id, {target}) {
|
||||||
let checkbox = $(`#${id}`);
|
let checkbox = $(`#${id}`);
|
||||||
|
|
||||||
if (checkbox && checkbox.length > 0 && target.type != "checkbox") {
|
if (checkbox && checkbox.length > 0 && target.type != "checkbox") {
|
||||||
checkbox = checkbox[0];
|
checkbox = checkbox[0];
|
||||||
checkbox.checked = !checkbox.checked;
|
checkbox.checked = !checkbox.checked;
|
||||||
|
|
@ -242,6 +242,7 @@
|
||||||
this.appliedFilters.push(id);
|
this.appliedFilters.push(id);
|
||||||
} else {
|
} else {
|
||||||
let idPosition = this.appliedFilters.indexOf(id);
|
let idPosition = this.appliedFilters.indexOf(id);
|
||||||
|
|
||||||
if (idPosition == -1)
|
if (idPosition == -1)
|
||||||
idPosition = this.appliedFilters.indexOf(id.toString());
|
idPosition = this.appliedFilters.indexOf(id.toString());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue