Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
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
guxukai
baas-ide
Commits
79d210b3
Commit
79d210b3
authored
Oct 09, 2015
by
d11e9
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wiring txorigin into select dropdown
parent
b4c0f056
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
browser-solidity.css
assets/css/browser-solidity.css
+0
-1
index.html
index.html
+20
-17
No files found.
assets/css/browser-solidity.css
View file @
79d210b3
...
...
@@ -142,7 +142,6 @@ body {
padding
:
1em
;
}
#header
#optionViews
>
div
{
margin-top
:
1em
;
display
:
none
;
}
#header
#optionViews
.txView
#txView
{
display
:
block
;
}
...
...
index.html
View file @
79d210b3
...
...
@@ -74,12 +74,10 @@ THE SOFTWARE.
</div>
<div
id=
"optionViews"
class=
"txView"
>
<div
id=
"txView"
>
<code
class=
"origin"
>
tx.origin:
<span
id=
"txorigin"
/></code>
<select
name=
""
id=
""
>
<option
value=
""
>
Acc
</option>
</select>
<input
type=
"text"
class=
"gas"
>
<input
type=
"text"
class=
"value"
>
<select
name=
"origin"
id=
"txorigin"
></select>
<label
for=
"gas"
><input
type=
"number"
id=
"gas"
>
Gas
</label>
<label
for=
"gasPrice"
><input
type=
"number"
id=
"gasPrice"
>
Gas Price
</label>
<label
for=
"value"
><input
type=
"number"
id=
"value"
>
Value
</label>
</div>
<div
id=
"settingsView"
>
<div
class=
"version"
>
Solidity version:
<span
id=
"version"
>
(loading)
</span>
<br/>
Change to:
<select
id=
"versionSelector"
></select></div>
...
...
@@ -649,17 +647,22 @@ THE SOFTWARE.
}});
var
$contractOutput
=
dapp
.
render
();
if
(
executionContext
===
'vm'
)
$
(
'#txorigin'
).
text
(
'0x'
+
dapp
.
address
.
toString
(
'hex'
));
else
web3
.
eth
.
getAccounts
(
function
(
err
,
accounts
)
{
if
(
err
)
renderError
(
err
.
message
);
if
(
accounts
&&
accounts
[
0
])
$
(
'#txorigin'
).
text
(
accounts
[
0
]);
else
$
(
'#txorigin'
).
text
(
'unknown'
);
});
$txOrigin
=
$
(
'#txorigin'
);
if
(
executionContext
===
'vm'
)
{
$txOrigin
.
empty
();
var
addr
=
'0x'
+
dapp
.
address
.
toString
(
'hex'
);
$txOrigin
.
val
(
addr
);
$txOrigin
.
append
(
$
(
'<option />'
).
val
(
addr
).
text
(
addr
));
}
else
web3
.
eth
.
getAccounts
(
function
(
err
,
accounts
)
{
if
(
err
)
renderError
(
err
.
message
);
if
(
accounts
&&
accounts
[
0
]){
$txOrigin
.
empty
();
for
(
var
a
in
accounts
)
{
$txOrigin
.
append
(
$
(
'<option />'
).
val
(
accounts
[
a
]).
text
(
accounts
[
a
]));
}
$txOrigin
.
val
(
accounts
[
0
]);
}
else
$txOrigin
.
val
(
'unknown'
);
});
$contractOutput
.
find
(
'.title'
).
click
(
function
(
ev
){
$
(
this
).
closest
(
'.contract'
).
toggleClass
(
'hide'
);
});
$
(
'#output'
).
append
(
$contractOutput
);
...
...
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