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
63b07198
Commit
63b07198
authored
Sep 22, 2017
by
yann300
Committed by
GitHub
Sep 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #815 from ethereum/smallFixes
Small fixes
parents
56fdb93a
3407bd79
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
10 deletions
+20
-10
index.html
index.html
+0
-1
compile-tab.js
src/app/tabs/compile-tab.js
+15
-9
run-tab.js
src/app/tabs/run-tab.js
+5
-0
No files found.
index.html
View file @
63b07198
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
<title>
Remix - Solidity IDE
</title>
<title>
Remix - Solidity IDE
</title>
<link
rel=
"stylesheet"
href=
"assets/css/styles.css"
>
<link
rel=
"stylesheet"
href=
"assets/css/styles.css"
>
<link
rel=
"stylesheet"
href=
"assets/css/pygment_trac.css"
>
<link
rel=
"stylesheet"
href=
"assets/css/pygment_trac.css"
>
<link
rel=
"stylesheet"
href=
"assets/css/universal-dapp.css"
>
<link
rel=
"stylesheet"
href=
"assets/css/browser-solidity.css"
>
<link
rel=
"stylesheet"
href=
"assets/css/browser-solidity.css"
>
<link
rel=
"stylesheet"
href=
"assets/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"assets/css/font-awesome.min.css"
>
<link
rel=
"icon"
type=
"x-icon"
href=
"icon.png"
>
<link
rel=
"icon"
type=
"x-icon"
href=
"icon.png"
>
...
...
src/app/tabs/compile-tab.js
View file @
63b07198
...
@@ -7,6 +7,7 @@ const copy = require('clipboard-copy')
...
@@ -7,6 +7,7 @@ const copy = require('clipboard-copy')
var
parseContracts
=
require
(
'../contract/contractParser'
)
var
parseContracts
=
require
(
'../contract/contractParser'
)
var
publishOnSwarm
=
require
(
'../contract/publishOnSwarm'
)
var
publishOnSwarm
=
require
(
'../contract/publishOnSwarm'
)
var
modalDialog
=
require
(
'../ui/modaldialog'
)
var
modalDialog
=
require
(
'../ui/modaldialog'
)
var
modalDialogCustom
=
require
(
'../ui/modal-dialog-custom'
)
var
TreeView
=
require
(
'ethereum-remix'
).
ui
.
TreeView
var
TreeView
=
require
(
'ethereum-remix'
).
ui
.
TreeView
// -------------- styling ----------------------
// -------------- styling ----------------------
...
@@ -88,6 +89,7 @@ var css = csjs`
...
@@ -88,6 +89,7 @@ var css = csjs`
.publish {
.publish {
${
styles
.
button
}
${
styles
.
button
}
margin-left: 2%;
margin-left: 2%;
width: 120px;
}
}
.log {
.log {
display: flex;
display: flex;
...
@@ -327,8 +329,8 @@ function compileTab (container, appAPI, appEvents, opts) {
...
@@ -327,8 +329,8 @@ function compileTab (container, appAPI, appEvents, opts) {
<div class="
${
css
.
container
}
">
<div class="
${
css
.
container
}
">
<select class="
${
css
.
contractNames
}
" disabled></select>
<select class="
${
css
.
contractNames
}
" disabled></select>
<div class="
${
css
.
contractButtons
}
">
<div class="
${
css
.
contractButtons
}
">
<div class="
${
css
.
details
}
" onclick=
${()
=>
{
details
()
}}
>
Details
<
/div
>
<div
title="Display Contract Details"
class="
${
css
.
details
}
" onclick=
${()
=>
{
details
()
}}
>
Details
<
/div
>
<
div
class
=
"${css.publish}"
onclick
=
$
{()
=>
{
publish
(
appAPI
)
}}
>
Publish
<
/div
>
<
div
title
=
"Publish on Swarm"
class
=
"${css.publish}"
onclick
=
$
{()
=>
{
publish
(
appAPI
)
}}
>
Publish
on
Swarm
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
`
`
...
@@ -425,13 +427,17 @@ function compileTab (container, appAPI, appEvents, opts) {
...
@@ -425,13 +427,17 @@ function compileTab (container, appAPI, appEvents, opts) {
var
selectContractNames
=
document
.
querySelector
(
`.
${
css
.
contractNames
.
classNames
[
0
]}
`
)
var
selectContractNames
=
document
.
querySelector
(
`.
${
css
.
contractNames
.
classNames
[
0
]}
`
)
if
(
selectContractNames
.
children
.
length
>
0
&&
selectContractNames
.
selectedIndex
>=
0
)
{
if
(
selectContractNames
.
children
.
length
>
0
&&
selectContractNames
.
selectedIndex
>=
0
)
{
var
contract
=
contractsDetails
[
selectContractNames
.
children
[
selectContractNames
.
selectedIndex
].
innerHTML
]
var
contract
=
contractsDetails
[
selectContractNames
.
children
[
selectContractNames
.
selectedIndex
].
innerHTML
]
publishOnSwarm
(
contract
,
appAPI
,
function
(
err
)
{
if
(
contract
.
metadata
===
undefined
||
contract
.
metadata
.
length
===
0
)
{
if
(
err
)
{
modalDialogCustom
.
alert
(
'This contract does not implement all functions and thus cannot be published.'
)
alert
(
'Failed to publish metadata: '
+
err
)
}
else
{
}
else
{
publishOnSwarm
(
contract
,
appAPI
,
function
(
err
)
{
alert
(
'Metadata published successfully'
)
if
(
err
)
{
}
alert
(
'Failed to publish metadata: '
+
err
)
})
}
else
{
alert
(
'Metadata published successfully. You
\'
l find the Swarm address in the Contract details.'
)
}
})
}
}
}
}
}
return
el
return
el
...
...
src/app/tabs/run-tab.js
View file @
63b07198
...
@@ -298,6 +298,11 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
...
@@ -298,6 +298,11 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
var
contractName
=
contractNames
.
children
[
contractNames
.
selectedIndex
].
innerHTML
var
contractName
=
contractNames
.
children
[
contractNames
.
selectedIndex
].
innerHTML
var
contract
=
appAPI
.
getContracts
()[
contractName
]
var
contract
=
appAPI
.
getContracts
()[
contractName
]
if
(
contract
.
bytecode
.
length
===
0
)
{
modalDialogCustom
.
alert
(
'This contract does not implement all functions and thus cannot be created.'
)
return
}
var
constructor
=
txHelper
.
getConstructorInterface
(
contract
.
interface
)
var
constructor
=
txHelper
.
getConstructorInterface
(
contract
.
interface
)
var
args
=
createButtonInput
.
value
var
args
=
createButtonInput
.
value
txFormat
.
buildData
(
contract
,
contracts
,
true
,
constructor
,
args
,
appAPI
.
udapp
(),
(
error
,
data
)
=>
{
txFormat
.
buildData
(
contract
,
contracts
,
true
,
constructor
,
args
,
appAPI
.
udapp
(),
(
error
,
data
)
=>
{
...
...
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