Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
token-market
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
token-market
Commits
0f63c938
Commit
0f63c938
authored
Jul 27, 2018
by
gaseema-n
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
action buy UI update
parent
9afeb7e2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
119 additions
and
88 deletions
+119
-88
index.html
index.html
+5
-2
manage-order.js
js/manage-order.js
+114
-86
No files found.
index.html
View file @
0f63c938
...
...
@@ -959,6 +959,7 @@
<div
class=
"modal-content"
style=
"text-align:center; padding-top:0px; padding-bottom:0px;"
>
<img
class=
"tradeOrderImg"
src=
""
style=
"width: 50px;border-radius:50px;width: 90px; border-radius: 50px; background: white; margin-top: -29px; -webkit-box-shadow: 0px 9px 23px -5px rgba(0,0,0,0.75); -moz-box-shadow: 0px 9px 23px -5px rgba(0,0,0,0.75); box-shadow: 0px 9px 23px -5px rgba(0,0,0,0.75);"
>
<h6
class=
"tradeOrderSubTitle"
style=
"margin: 1.5rem 0 1.5rem 0;"
></h6>
<span
id=
"buySteps"
style=
"color: grey; border: solid #e4e4e4 1px; padding: 10px; border-radius: 3px;display:none;"
><span
id=
"step1"
style=
"color: green; padding-right: 15px;cursor: -webkit-grab;"
>
Step 1
</span>
>
<span
id=
"step2"
style=
"padding-left: 15px;cursor: -webkit-grab;"
>
Step 2
</span></span>
<div
class=
"row"
style=
"display:none;margin-top:10px;"
>
<div
class=
"input-field col s12"
>
<span
style=
"font-weight:bold;"
>
STATUS:
</span>
...
...
@@ -966,7 +967,7 @@
</div>
</div>
<form
class=
"col s12 newTradeForm"
style=
"margin-top:
1
0px;"
>
<form
class=
"col s12 newTradeForm"
style=
"margin-top:
3
0px;"
>
<div
class=
"row"
style=
"margin-bottom: 0px;"
>
<div
class=
"input-field col s12"
>
<div
class=
"row"
>
...
...
@@ -995,8 +996,10 @@
</div>
</form>
<button
class=
"btn"
id=
"slctPmntMthd"
style=
"margin-left: auto; margin-right: auto; margin-bottom: 30px;"
>
select payment method
</button>
<div
class=
"row"
>
<div
class=
"row stepsHide"
>
<p
style=
"text-align: center;"
>
Select payment method below
</p>
<div
class=
"col s12"
>
<ul
class=
"tabs doTradeForm popout"
>
<li
class=
"tab col s3"
style=
"width: 33%"
>
...
...
js/manage-order.js
View file @
0f63c938
function
manageOrderDet
(
oid
)
{
var
store
=
getObjectStore
(
'data'
,
'readwrite'
).
get
(
"market-orders"
);
store
.
onsuccess
=
function
(
event
)
{
...
...
@@ -78,8 +76,8 @@ function manageOrderDet(oid) {
//trade address
var
trnadr
=
'0x'
+
JSON
.
parse
(
allOrds
[
ix
].
tranTo
.
address
.
replace
(
'["'
,
"['"
).
replace
(
'"]'
,
"']"
)).
publicAddress
.
replace
(
"['"
,
''
).
replace
(
"']"
,
''
);
$
(
'.tradeOrderFooterComplete'
).
attr
(
"oadr"
,
trnadr
);
var
trnadr
=
'0x'
+
JSON
.
parse
(
allOrds
[
ix
].
tranTo
.
address
.
replace
(
'["'
,
"['"
).
replace
(
'"]'
,
"']"
)).
publicAddress
.
replace
(
"['"
,
''
).
replace
(
"']"
,
''
);
$
(
'.tradeOrderFooterComplete'
).
attr
(
"oadr"
,
trnadr
);
}
else
if
(
parseInt
(
allOrds
[
ix
].
tranTo
)
==
0
)
{
...
...
@@ -92,8 +90,8 @@ function manageOrderDet(oid) {
//trade address
var
trnadr
=
'0x'
+
JSON
.
parse
(
allOrds
[
ix
].
tranFrom
.
address
.
replace
(
'["'
,
"['"
).
replace
(
'"]'
,
"']"
)).
publicAddress
.
replace
(
"['"
,
''
).
replace
(
"']"
,
''
);
$
(
'.tradeOrderFooterComplete'
).
attr
(
"oadr"
,
trnadr
);
var
trnadr
=
'0x'
+
JSON
.
parse
(
allOrds
[
ix
].
tranFrom
.
address
.
replace
(
'["'
,
"['"
).
replace
(
'"]'
,
"']"
)).
publicAddress
.
replace
(
"['"
,
''
).
replace
(
"']"
,
''
);
$
(
'.tradeOrderFooterComplete'
).
attr
(
"oadr"
,
trnadr
);
}
...
...
@@ -129,7 +127,7 @@ function tradeManager(oid, action) {
setOrderCallbacks
();
if
(
action
==
'buy'
&&
activeCoin
.
toLowerCase
()
==
'eth'
)
{
if
(
action
==
'buy'
&&
activeCoin
.
toLowerCase
()
==
'eth'
)
{
//this is an existing order
//orderTimer = setInterval(function () {}, 15000);
...
...
@@ -140,6 +138,8 @@ function tradeManager(oid, action) {
return
;
}
else
if
(
action
==
'transfer'
)
{
$
(
"#buySteps"
).
css
(
"display"
,
"none"
);
$
(
"#slctPmntMthd"
).
css
(
"display"
,
"none"
);
//orderTimer = setInterval(function () {}, 15000);
...
...
@@ -149,6 +149,8 @@ function tradeManager(oid, action) {
return
;
}
else
if
(
oid
==
'new'
)
{
$
(
"#buySteps"
).
css
(
"display"
,
"none"
);
$
(
"#slctPmntMthd"
).
css
(
"display"
,
"none"
);
//this is a new order
//orderTimer = setInterval(function () {}, 15000);
...
...
@@ -159,6 +161,8 @@ function tradeManager(oid, action) {
return
;
}
else
if
(
action
==
'manage'
)
{
$
(
"#buySteps"
).
css
(
"display"
,
"none"
);
$
(
"#slctPmntMthd"
).
css
(
"display"
,
"none"
);
//this is an existing order
// orderTimer = setInterval(function () {}, 15000);
...
...
@@ -173,6 +177,8 @@ function tradeManager(oid, action) {
return
;
}
else
if
(
action
==
'sell'
)
{
$
(
"#buySteps"
).
css
(
"display"
,
"none"
);
$
(
"#slctPmntMthd"
).
css
(
"display"
,
"none"
);
//this is an existing order
//orderTimer = setInterval(function () {}, 15000);
...
...
@@ -187,6 +193,11 @@ function tradeManager(oid, action) {
return
;
}
else
if
(
action
==
'buy'
)
{
$
(
"#buySteps"
).
css
(
"display"
,
"block"
);
$
(
".stepsHide"
).
css
(
"display"
,
"none"
);
$
(
"#slctPmntMthd"
).
css
(
"display"
,
"block"
);
$
(
".tradeOrderFooter"
).
css
(
"display"
,
"none"
);
$
(
"#buySteps"
).
css
(
"color"
,
"grey"
);
//this is an existing order
$
(
"#newTradeTotal"
).
attr
(
"disabled"
,
true
);
...
...
@@ -202,7 +213,7 @@ function tradeManager(oid, action) {
return
;
}
/*
/*
$(".doTradeForm").css("display", 'block');
//orderTimer = setInterval(function () {
...
...
@@ -282,5 +293,22 @@ function tradeManager(oid, action) {
}
}
*/
*/
}
//Steps Management
$
(
"#slctPmntMthd, #stept2"
).
on
(
"click"
,
function
(
e
)
{
$
(
".newTradeForm"
).
css
(
"display"
,
"none"
);
$
(
".stepsHide"
).
css
(
"display"
,
"block"
);
$
(
".stepsHide"
).
css
(
"margin-top"
,
"20px"
);
$
(
"#slctPmntMthd"
).
css
(
"display"
,
"none"
);
$
(
"#buySteps"
).
css
(
"color"
,
"green"
);
$
(
".tradeOrderFooter"
).
css
(
"display"
,
"block"
);
});
$
(
"#step1"
).
on
(
"click"
,
function
(
e
)
{
$
(
"#buySteps"
).
css
(
"color"
,
"grey"
);
$
(
".stepsHide"
).
css
(
"display"
,
"none"
);
$
(
".newTradeForm"
).
css
(
"display"
,
"block"
);
$
(
"#slctPmntMthd"
).
css
(
"display"
,
"block"
);
$
(
".tradeOrderFooter"
).
css
(
"display"
,
"none"
);
})
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