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
8ddde43e
Commit
8ddde43e
authored
Jan 30, 2019
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Форматирование цены внутри корзины
parent
d0d77943
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
script-feeds-stat-table.js
src/public/js/script-feeds-stat-table.js
+15
-4
No files found.
src/public/js/script-feeds-stat-table.js
View file @
8ddde43e
...
...
@@ -7,7 +7,7 @@ $(document).ready(function(){
activeLines
=
[],
currentActiveLine
,
dataTable
,
currencyFields
=
[
'admoney'
,
'salemoney'
,
'usdollarmoney'
,
'localmoney'
,
'AdMoney'
,
'OrderSum'
],
currencyFields
=
[
'admoney'
,
'salemoney'
,
'usdollarmoney'
,
'localmoney'
,
'AdMoney'
,
'OrderSum'
,
'Price'
],
notFormatFields
=
[
'Timestamp'
,
'Basket'
];
// Шаблон содержимого ячейки Basket
...
...
@@ -20,7 +20,7 @@ $(document).ready(function(){
' <tr>
\
n'
+
' <td><a class="basket-link" href="<%=item.URL %>" target="_blank"><%=item.Title %></a></td>
\
n'
+
' <td><span class="quantity"><%=item.Quantity %></span></td>
\
n'
+
' <td><span class="price"><%=item.Price %>
грн.
</span></td>
\
n'
+
' <td><span class="price"><%=item.Price %></span></td>
\
n'
+
' </tr>
\
n'
+
' <% }) %>
\
n'
+
' </tbody>
\
n'
+
...
...
@@ -139,7 +139,12 @@ $(document).ready(function(){
$row
.
append
(
$
(
'<td>'
).
html
(
item
[
'period'
]));
activeLines
.
forEach
(
function
(
line
){
if
(
line
==
'Basket'
)
{
$row
.
append
(
$
(
'<td class="'
+
line
+
'">'
).
append
(
templateBasketContent
({
data
:
item
[
line
]})));
var
dataBasket
=
item
[
line
];
currentActiveLine
=
'Price'
;
dataBasket
.
forEach
(
function
(
dataBasketItem
,
ind
){
dataBasket
[
ind
][
'Price'
]
=
valueFormat
(
dataBasketItem
[
'Price'
]);
});
$row
.
append
(
$
(
'<td class="'
+
line
+
'">'
).
append
(
templateBasketContent
({
data
:
dataBasket
})));
}
else
if
(
line
==
'Timestamp'
)
{
var
dateTimeValue
=
item
[
line
].
split
(
' '
),
...
...
@@ -176,7 +181,13 @@ $(document).ready(function(){
$row
.
append
(
$
(
'<td>'
).
html
(
date
));
activeLines
.
forEach
(
function
(
item
){
if
(
item
==
'Basket'
)
{
$row
.
append
(
$
(
'<td class="'
+
item
+
'">'
).
append
(
templateBasketContent
({
data
:
values
[
item
]})));
var
dataBasket
=
values
[
item
];
currentActiveLine
=
'Price'
;
dataBasket
.
forEach
(
function
(
dataBasketItem
,
ind
){
dataBasket
[
ind
][
'Price'
]
=
valueFormat
(
dataBasketItem
[
'Price'
]);
});
console
.
log
(
'AAA dataBasket = '
,
dataBasket
);
$row
.
append
(
$
(
'<td class="'
+
item
+
'">'
).
append
(
templateBasketContent
({
data
:
dataBasket
})));
}
else
if
(
item
==
'Timestamp'
)
{
var
dateTimeValue
=
values
[
item
].
split
(
' '
),
...
...
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