mirror of
https://github.com/sergeyyarkov/digital-store.git
synced 2026-10-11 10:19:15 +03:00
rename file
This commit is contained in:
parent
f872737a3e
commit
58a41aa82e
18
dist/public/js/bundle.js
vendored
18
dist/public/js/bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
import { Component } from "../core/component";
|
import { Component } from "../core/component";
|
||||||
import { apiService } from "../services/api.service";
|
import { apiService } from "../services/api.service";
|
||||||
import { renderItemsOne } from "../templates/itemsOne.template";
|
import { renderItemsOne } from "../templates/itemsCategory.template";
|
||||||
import { renderItems } from "../templates/items.template";
|
import { renderItems } from "../templates/items.template";
|
||||||
|
|
||||||
export class CategoryComponent extends Component {
|
export class CategoryComponent extends Component {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Component } from "../core/component";
|
import { Component } from "../core/component";
|
||||||
import { apiService } from "../services/api.service";
|
import { apiService } from "../services/api.service";
|
||||||
import { renderItems } from "../templates/items.template";
|
import { renderItems } from "../templates/items.template";
|
||||||
import { renderItemsOne } from "../templates/itemsOne.template";
|
import { renderItemsOne } from "../templates/itemsCategory.template";
|
||||||
|
|
||||||
export class FilterComponent extends Component {
|
export class FilterComponent extends Component {
|
||||||
constructor(id, {items}) {
|
constructor(id, {items}) {
|
||||||
|
|||||||
@ -86,6 +86,7 @@ function addItem(e) {
|
|||||||
}
|
}
|
||||||
renderObj(item, this, target);
|
renderObj(item, this, target);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function renderObj(obj, context, target) {
|
function renderObj(obj, context, target) {
|
||||||
if (context.cart.length > 0) {
|
if (context.cart.length > 0) {
|
||||||
@ -119,4 +120,3 @@ function addItem(e) {
|
|||||||
insertCount('counter', context.cart)
|
insertCount('counter', context.cart)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
@ -6,8 +6,6 @@ export class Modal {
|
|||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow() {}
|
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
this.open.addEventListener('click', openHandler.bind(this));
|
this.open.addEventListener('click', openHandler.bind(this));
|
||||||
this.close.addEventListener('click', closeHandler.bind(this));
|
this.close.addEventListener('click', closeHandler.bind(this));
|
||||||
@ -26,7 +24,6 @@ export class Modal {
|
|||||||
|
|
||||||
function openHandler(e) {
|
function openHandler(e) {
|
||||||
this.show();
|
this.show();
|
||||||
this.onShow(e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeHandler() {
|
function closeHandler() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user