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
42b5e163
Commit
42b5e163
authored
Aug 30, 2017
by
yann300
Committed by
GitHub
Aug 30, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #731 from ethereum/contractUI
Contract ui - Misc
parents
56146b5c
f79d684a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
35 deletions
+6
-35
browser-solidity.css
assets/css/browser-solidity.css
+0
-13
universal-dapp.css
assets/css/universal-dapp.css
+0
-14
compile-tab.js
src/app/tabs/compile-tab.js
+2
-2
run-tab.js
src/app/tabs/run-tab.js
+3
-3
universal-dapp.js
src/universal-dapp.js
+1
-3
No files found.
assets/css/browser-solidity.css
View file @
42b5e163
...
...
@@ -180,19 +180,6 @@
font-weight
:
bold
;
}
.contract.hidesub
{
padding-bottom
:
0
;
margin
:
0
;
}
.contract.hidesub
>
*
:not
(
.title
)
{
display
:
none
;
}
.contract.hidesub
>
.title
:before
{
content
:
"\25B6"
;
}
#output
.udapp
{
border
:
0
none
;
box-shadow
:
none
;
...
...
assets/css/universal-dapp.css
View file @
42b5e163
...
...
@@ -109,12 +109,6 @@
cursor
:
pointer
;
}
.udapp
.instance.hidesub
.title
{
margin-bottom
:
0
;
padding-right
:
1.5em
;
word-wrap
:
break-word
;
}
.udapp
.instance
.title
:before
{
content
:
"\25BC"
;
opacity
:
0.5
;
...
...
@@ -123,14 +117,6 @@
margin-top
:
0.2em
;
}
.udapp
.instance.hidesub
>
*
:not
(
.title
)
{
display
:
none
;
}
.udapp
.instance.hidesub
>
.title
:before
{
content
:
"\25B6"
;
}
#runTabView
.contractProperty
{
overflow
:
auto
;
margin-bottom
:
0.4em
;
...
...
src/app/tabs/compile-tab.js
View file @
42b5e163
...
...
@@ -319,7 +319,7 @@ function compileTab (container, appAPI, appEvents, opts) {
function
details
()
{
var
select
=
el
.
querySelector
(
'select'
)
if
(
select
.
children
.
length
>
0
&&
select
.
selectedIndex
>=
0
)
{
var
contractName
=
select
.
children
[
select
.
selectedIndex
].
inner
Text
var
contractName
=
select
.
children
[
select
.
selectedIndex
].
inner
HTML
var
details
=
contractsDetails
[
contractName
]
var
keys
=
Object
.
keys
(
contractsDetails
[
contractName
])
var
log
=
yo
`<div class="
${
css
.
detailsJSON
}
"></div>`
...
...
@@ -334,7 +334,7 @@ function compileTab (container, appAPI, appEvents, opts) {
function
publish
(
appAPI
)
{
var
selectContractNames
=
document
.
querySelector
(
`.
${
css
.
contractNames
.
classNames
[
0
]}
`
)
if
(
selectContractNames
.
children
.
length
>
0
&&
selectContractNames
.
selectedIndex
>=
0
)
{
var
contract
=
contractsDetails
[
selectContractNames
.
children
[
selectContractNames
.
selectedIndex
].
inner
Text
]
var
contract
=
contractsDetails
[
selectContractNames
.
children
[
selectContractNames
.
selectedIndex
].
inner
HTML
]
publishOnSwarm
(
contract
,
appAPI
,
function
(
err
)
{
if
(
err
)
{
alert
(
'Failed to publish metadata: '
+
err
)
...
...
src/app/tabs/run-tab.js
View file @
42b5e163
...
...
@@ -278,7 +278,7 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
function
setInputParamsPlaceHolder
()
{
createButtonInput
.
value
=
''
if
(
appAPI
.
getContracts
()
&&
selectContractNames
.
selectedIndex
>=
0
&&
selectContractNames
.
children
.
length
>
0
)
{
var
contract
=
appAPI
.
getContracts
()[
selectContractNames
.
children
[
selectContractNames
.
selectedIndex
].
inner
Text
]
var
contract
=
appAPI
.
getContracts
()[
selectContractNames
.
children
[
selectContractNames
.
selectedIndex
].
inner
HTML
]
var
ctrabi
=
txHelper
.
getConstructorInterface
(
contract
.
interface
)
if
(
ctrabi
.
inputs
.
length
)
{
createButtonInput
.
setAttribute
(
'placeholder'
,
txHelper
.
inputParametersDeclarationToString
(
ctrabi
.
inputs
))
...
...
@@ -296,7 +296,7 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
function
createInstance
()
{
var
contractNames
=
document
.
querySelector
(
`.
${
css
.
contractNames
.
classNames
[
0
]}
`
)
var
contracts
=
appAPI
.
getContracts
()
var
contract
=
appAPI
.
getContracts
()[
contractNames
.
children
[
contractNames
.
selectedIndex
].
inner
Text
]
var
contract
=
appAPI
.
getContracts
()[
contractNames
.
children
[
contractNames
.
selectedIndex
].
inner
HTML
]
var
constructor
=
txHelper
.
getConstructorInterface
(
contract
.
interface
)
var
args
=
createButtonInput
.
value
txFormat
.
buildData
(
contract
,
contracts
,
true
,
constructor
,
args
,
appAPI
.
udapp
(),
appAPI
.
executionContext
(),
(
error
,
data
)
=>
{
...
...
@@ -338,7 +338,7 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
function
loadFromAddress
(
appAPI
)
{
noInstancesText
.
style
.
display
=
'none'
var
contractNames
=
document
.
querySelector
(
`.
${
css
.
contractNames
.
classNames
[
0
]}
`
)
var
contract
=
appAPI
.
getContracts
()[
contractNames
.
children
[
contractNames
.
selectedIndex
].
inner
Text
]
var
contract
=
appAPI
.
getContracts
()[
contractNames
.
children
[
contractNames
.
selectedIndex
].
inner
HTML
]
var
address
=
atAddressButtonInput
.
value
instanceContainer
.
appendChild
(
appAPI
.
udapp
().
renderInstance
(
contract
,
address
,
selectContractNames
.
value
))
}
...
...
src/universal-dapp.js
View file @
42b5e163
...
...
@@ -47,6 +47,7 @@ var css = csjs`
}
.instance {
${
styles
.
displayBox
}
margin-bottom: 2px;
padding: 10px 15px 6px 15px;
}
.instance .title:before {
...
...
@@ -57,9 +58,6 @@ var css = csjs`
content: "\\25B8";
margin-right: 5%;
}
.instance.hidesub {
margin: 0;
}
.instance.hidesub > * {
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