Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
addcpm-json
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
addcpm-json
Commits
1c221a7b
Commit
1c221a7b
authored
Nov 09, 2018
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил checkbox И сортировки для колонок табл.
parent
27f4c3c9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletion
+46
-1
styles-feeds-stat.css
src/public/css/styles-feeds-stat.css
+34
-0
script-feeds-stat.js
src/public/js/script-feeds-stat.js
+8
-0
cabinet-feed.phtml
src/templates/app/user/cabinet-feed.phtml
+4
-1
No files found.
src/public/css/styles-feeds-stat.css
View file @
1c221a7b
...
...
@@ -72,6 +72,10 @@
margin-right
:
30px
;
}
input
[
type
=
"checkbox"
]
{
vertical-align
:
-2px
;
}
.form-group
.form-control
{
...
...
@@ -142,3 +146,32 @@
margin-top
:
30px
;
}
.table.table-striped.admin
thead
.metric.sortable
tr
b
{
cursor
:
pointer
;
}
.table.table-striped.admin
thead
.metric.sortable
tr
b
.selected
{
color
:
#2CA02C
;
}
/*
.table.table-striped.admin thead.metric tr b .arrow
{
display: none;
}
.table.table-striped.admin thead.metric.sortable tr b.selected .arrow.asc,
.table.table-striped.admin thead.metric.sortable tr b.selected.desc .arrow.desc
{
display: inline;
}
.table.table-striped.admin thead.metric.sortable tr b.selected .arrow.desc,
.table.table-striped.admin thead.metric.sortable tr b.selected.desc .arrow.asc
{
display: none;
}
*/
\ No newline at end of file
src/public/js/script-feeds-stat.js
View file @
1c221a7b
...
...
@@ -44,6 +44,14 @@ $(document).ready(function(){
renderLineChart
();
renderHourTable
();
// Сортировка по колонкам внутри таблицы:
$
(
'#table-line'
).
on
(
'click'
,
'thead.metric.sortable th b'
,
function
(){
$
(
'#table-line thead.metric.sortable th b'
).
removeClass
(
'selected'
);
$
(
this
).
addClass
(
'selected'
);
$
(
this
).
toggleClass
(
'desc'
);
renderHourTable
();
});
// Отрисовка графика Stat
function
renderLineChart
()
{
...
...
src/templates/app/user/cabinet-feed.phtml
View file @
1c221a7b
...
...
@@ -142,14 +142,17 @@ $dates = $this->dates;
<div
class=
"b-content__loading"
></div>
<table
id=
"table-line"
class=
"table table-striped admin"
>
<thead
class=
"metric sortable"
>
<tr
data-metric=
"
<?=
$metric
?>
"
<?=
$current_style
?>
>
<tr
data-metric=
"
<?=
$metric
?>
"
>
<th>
<?=
_t
(
'Дата/Компания'
)
?>
</th>
<?php
foreach
([
'shows'
,
'clicks'
,
'transactions'
,
'salemoney'
,
'admoney'
]
as
$name
)
:
?>
<th>
<input
type=
"checkbox"
/>
<b
id=
"
<?=
$name
?>
"
>
<?=
_t
(
$name
)
?>
<!--
<b class="arrow asc">∧</b>
<b class="arrow desc">∨</b>
-->
</b>
</th>
<?php
endforeach
?>
...
...
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