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
d2862678
Commit
d2862678
authored
Feb 04, 2019
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Форматирование даты-времени вынес в функцию
parent
0ab32e07
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
script-feeds-stat-table.js
src/public/js/script-feeds-stat-table.js
+13
-7
No files found.
src/public/js/script-feeds-stat-table.js
View file @
d2862678
...
@@ -52,6 +52,18 @@ $(document).ready(function(){
...
@@ -52,6 +52,18 @@ $(document).ready(function(){
}
}
}
}
function
getDateValue
(
dataDate
)
{
return
dataDate
.
split
(
' '
)[
0
];
}
function
getHourMinValue
(
dataDate
)
{
var
timeVal
=
dataDate
.
split
(
' '
)[
1
].
split
(
':'
),
timeValCorrected
=
timeVal
[
0
]
+
':'
+
timeVal
[
1
];
return
timeValCorrected
;
}
function
RenderInterval
(
dataLineChartStat
)
function
RenderInterval
(
dataLineChartStat
)
{
{
var
var
...
@@ -126,14 +138,8 @@ $(document).ready(function(){
...
@@ -126,14 +138,8 @@ $(document).ready(function(){
currentActiveLine
=
'Price'
;
currentActiveLine
=
'Price'
;
$row
.
append
(
$
(
'<td class="'
+
line
+
'">'
).
append
(
templateBasketContent
({
data
:
dataBasket
,
formatPrice
:
valueFormat
})));
$row
.
append
(
$
(
'<td class="'
+
line
+
'">'
).
append
(
templateBasketContent
({
data
:
dataBasket
,
formatPrice
:
valueFormat
})));
}
else
if
(
line
==
'Timestamp'
)
{
}
else
if
(
line
==
'Timestamp'
)
{
var
dateTimeValue
=
item
[
line
].
split
(
' '
),
dateVal
=
dateTimeValue
[
0
],
timeVal
=
dateTimeValue
[
1
].
split
(
':'
),
timeValCorrected
=
timeVal
[
0
]
+
':'
+
timeVal
[
1
];
$row
.
append
(
$
(
'<td class="'
+
line
+
'">'
).
append
(
templateTimestampContent
({
$row
.
append
(
$
(
'<td class="'
+
line
+
'">'
).
append
(
templateTimestampContent
({
data
:
{
date
:
dateVal
,
time
:
timeValCorrected
}
data
:
{
date
:
getDateValue
(
item
[
line
]),
time
:
getHourMinValue
(
item
[
line
])
}
})));
})));
}
else
{
}
else
{
...
...
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