Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kus-admin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Кубота
kus-admin
Commits
8a64a00c
Commit
8a64a00c
authored
Feb 03, 2020
by
talequale
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
ec40c6c4
e2a01b58
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
16 deletions
+24
-16
CardSlider.jsx
src/view/cmp/cardSlider/CardSlider.jsx
+1
-1
InfoCard.jsx
src/view/cmp/infoCard/InfoCard.jsx
+22
-15
PaginationSlider.jsx
src/view/cmp/paginationSlider/PaginationSlider.jsx
+1
-0
No files found.
src/view/cmp/cardSlider/CardSlider.jsx
View file @
8a64a00c
...
...
@@ -197,8 +197,8 @@ const CardSlider = (function(){
}
this
.
hash
=
{};
this
.
last
=
false
;
this
.
update
();
},
save
:
function
()
{
tmpStore
.
set
(
this
.
name
,
{
left
:
this
.
scroller
.
scrollLeft
});
...
...
src/view/cmp/infoCard/InfoCard.jsx
View file @
8a64a00c
...
...
@@ -43,13 +43,9 @@ const InfoCard = D.declare('view.cmp.InfoCard', ({item, category}) => {
}
}
};
let
content
;
if
(
item
.
type
===
1
){
content
=
<
ProductCard
item=
{
item
}
category=
{
category
}
/>;
}
else
{
content
=
<
PaginationSlider
item=
{
item
}
category=
{
category
}
/>;
}
return
<
div
class=
"info-card"
>
let
contentEl
,
dom
=
<
div
className=
"info-card"
>
<
div
className=
"info-card__header"
>
<
div
>
TYPE:
{
item
.
type
}
</
div
>
<
div
className=
"info-card__headline"
>
...
...
@@ -57,18 +53,29 @@ const InfoCard = D.declare('view.cmp.InfoCard', ({item, category}) => {
<
p
className=
"info-card__category"
>
{
category
.
name
}
</
p
>
</
div
>
<
div
className=
"info-card__stats"
>
<
p
>
Карточек в категории:
<
b
>
{
category
.
count
||
0
}
</
b
></
p
>
<
p
>
Просмотрено:
<
em
>
{
category
.
countView
||
0
}
</
em
></
p
>
</
div
>
<
p
>
Карточек в категории:
<
b
>
{
category
.
count
||
0
}
</
b
></
p
>
<
p
>
Просмотрено:
<
em
>
{
category
.
countView
||
0
}
</
em
></
p
>
</
div
>
<
div
className=
"info-card__body"
>
{
content
}
</
div
>
{
contentEl
=
<
div
className=
"info-card__body"
>
</
div
>
}
<
div
className=
"info-card__footer"
>
<
Button
class=
{
D
.
cls
(
"button info-card__link"
,
{
'info-card__link-hidden'
:
backHidden
})
}
onclick=
{
back
}
><
Back
width=
"17"
height=
"11"
/><
span
>
Предыдущая карточка
</
span
></
Button
>
<
Button
class=
{
D
.
cls
(
"button info-card__link"
,
{
'info-card__link-hidden'
:
forwardHidden
})
}
onclick=
{
next
}
><
span
>
Следующая карточка
</
span
><
Arr
width=
"17"
height=
"11"
/></
Button
>
</
div
>
<
Button
class=
{
D
.
cls
(
"button info-card__link"
,
{
'info-card__link-hidden'
:
backHidden
}
)
}
onclick=
{
back
}
><
Back
width=
"17"
height=
"11"
/><
span
>
Предыдущая карточка
</
span
></
Button
>
<
Button
class=
{
D
.
cls
(
"button info-card__link"
,
{
'info-card__link-hidden'
:
forwardHidden
}
)
}
onclick=
{
next
}
><
span
>
Следующая карточка
</
span
><
Arr
width=
"17"
height=
"11"
/></
Button
>
</
div
>
</
div
>;
//setTimeout(()=>{
if
(
item
.
type
===
1
){
contentEl
.
appendChild
(<
ProductCard
item=
{
item
}
category=
{
category
}
/>);
}
else
{
contentEl
.
appendChild
(<
PaginationSlider
item=
{
item
}
category=
{
category
}
/>);
}
///},0)
return
dom
;
})
export
default
InfoCard
;
...
...
src/view/cmp/paginationSlider/PaginationSlider.jsx
View file @
8a64a00c
...
...
@@ -40,6 +40,7 @@ const PaginationSliderSingleton = function(){
<
ul
className=
"pagination-slider__bullets"
>
{
(
update
)
=>
{
this
.
store
.
sub
(
'items'
,
function
(
items
)
{
Slider
.
setItems
(
items
||
[]);
update
((
items
||
[]).
map
((
item
,
n
)
=>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment