Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
soko
Project
Project
Details
Activity
Releases
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
bitsoko services
soko
Commits
3dac9238
Commit
3dac9238
authored
Apr 22, 2017
by
bitsoko
Committed by
GitHub
Apr 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update bitsoko.js
parent
1ee6dd89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
bitsoko.js
js/bitsoko.js
+9
-13
No files found.
js/bitsoko.js
View file @
3dac9238
...
...
@@ -1141,12 +1141,11 @@ function billingUpdater() {
function
promoCreator
()
{
getObjectStore
(
'data'
,
'readwrite'
).
get
(
'soko-store-'
+
localStorage
.
getItem
(
'soko-active-store'
)
+
'-products'
).
onsuccess
=
function
(
event
)
{
try
{
e
=
JSON
.
parse
(
event
.
target
.
result
);
var
e
=
JSON
.
parse
(
event
.
target
.
result
);
}
catch
(
err
)
{
console
.
log
(
'unable to access products list. '
+
err
);
e
=
[];
var
e
=
[];
}
$
(
".allPromosCount"
).
html
(
reqs
.
length
);
if
(
e
.
length
==
0
)
{
var
html
=
'<li class="collection-item avatar" style="opacity: 0.6;"><i class="mdi-action-redeem cyan circle"></i>'
+
'<span class="collection-header">No Product Found</span></li>'
;
$
(
".promotions-holda"
).
append
(
$
.
parseHTML
(
html
));
...
...
@@ -1198,7 +1197,8 @@ function orderUpdater() {
reqs
=
JSON
.
parse
(
reqs
);
}
catch
(
err
)
{
console
.
log
(
'unable to access orders list. '
+
err
);
e
=
[];
reqs
=
[];
}
$
(
".allOrdersCount"
).
html
(
reqs
.
length
);
...
...
@@ -1238,22 +1238,18 @@ function promoUpdater() {
reqs
=
JSON
.
parse
(
reqs
);
}
catch
(
err
)
{
console
.
log
(
'unable to access promotions list. '
+
err
);
var
html
=
'<li class="collection-item avatar" style="opacity: 0.6;"><i class="mdi-action-redeem cyan circle"></i>'
+
'<span class="collection-header">No Promotions Found</span></li>'
;
$
(
".promotions-holda"
).
append
(
$
.
parseHTML
(
html
));
return
;
reqs
=
[];
}
$
(
".allPromosCount"
).
html
(
reqs
.
length
);
$
(
".promotions-holda"
).
html
(
''
);
//TO_DO MAKE SURE THERE EXISTS PRODUCTS TO PROMOTE FIRST!!
if
(
reqs
.
length
==
0
)
{
var
html
=
'<li class="collection-item avatar" style="opacity: 0.6;"><i class="mdi-action-redeem cyan circle"></i>'
+
'<span class="collection-header">No Promotions Found</span></li>'
;
$
(
".promotions-holda"
).
append
(
$
.
parseHTML
(
html
));
}
else
{
$
(
".promotions-holda"
).
html
(
''
);
var
html
=
' <li class="collection-item avatar" style="opacity: 0.6;"><i class="mdi-action-redeem grey circle"></i><div class="row">'
+
'<p class="collections-title"><strong>Add Promotion</strong></p><p class="collections-content">you can add '
+
(
3
-
reqs
.
length
)
+
' more promotions</p></div>'
+
'</li>'
;
$
(
".promotions-holda"
).
append
(
html
);
}
for
(
var
i
=
0
;
i
<
reqs
.
length
;
++
i
)
{
// var saleAmount=Math.ceil(parseFloat(reqs[i].amount)/100000000 *loCon.xrate*loCon.rate)+'/= '+loCon.symbol;
// var saleTime=moment(reqs[i].posted).fromNow();
...
...
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