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
a49c60f5
Commit
a49c60f5
authored
May 20, 2018
by
serapath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CompileTab: fix bug
parent
3ff4af38
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
compile-tab.js
src/app/tabs/compile-tab.js
+13
-16
No files found.
src/app/tabs/compile-tab.js
View file @
a49c60f5
...
@@ -88,7 +88,19 @@ module.exports = class CompileTab {
...
@@ -88,7 +88,19 @@ module.exports = class CompileTab {
// reset the contractMetadata list (used by the publish action)
// reset the contractMetadata list (used by the publish action)
self
.
data
.
contractsDetails
=
{}
self
.
data
.
contractsDetails
=
{}
// refill the dropdown list
// refill the dropdown list
getContractNames
(
success
,
data
)
self
.
_view
.
contractNames
.
innerHTML
=
''
if
(
success
)
{
self
.
_view
.
contractNames
.
removeAttribute
(
'disabled'
)
self
.
_opts
.
compiler
.
visitContracts
(
contract
=>
{
self
.
data
.
contractsDetails
[
contract
.
name
]
=
parseContracts
(
contract
.
name
,
contract
.
object
,
self
.
_opts
.
compiler
.
getSource
(
contract
.
file
))
var
contractName
=
yo
`<option>
${
contract
.
name
}
</option>`
self
.
_view
.
contractNames
.
appendChild
(
contractName
)
})
self
.
_api
.
resetDapp
(
self
.
data
.
contractsDetails
)
}
else
{
self
.
_view
.
contractNames
.
setAttribute
(
'disabled'
,
true
)
self
.
_api
.
resetDapp
({})
}
// hightlight the tab if error
// hightlight the tab if error
if
(
success
)
document
.
querySelector
(
'.compileView'
).
style
.
color
=
''
// @TODO: compileView tab
if
(
success
)
document
.
querySelector
(
'.compileView'
).
style
.
color
=
''
// @TODO: compileView tab
else
document
.
querySelector
(
'.compileView'
).
style
.
color
=
styles
.
colors
.
red
// @TODO: compileView tab
else
document
.
querySelector
(
'.compileView'
).
style
.
color
=
styles
.
colors
.
red
// @TODO: compileView tab
...
@@ -169,21 +181,6 @@ module.exports = class CompileTab {
...
@@ -169,21 +181,6 @@ module.exports = class CompileTab {
}
}
function
updateAutoCompile
(
event
)
{
self
.
_opts
.
config
.
set
(
'autoCompile'
,
self
.
_view
.
autoCompile
.
checked
)
}
function
updateAutoCompile
(
event
)
{
self
.
_opts
.
config
.
set
(
'autoCompile'
,
self
.
_view
.
autoCompile
.
checked
)
}
function
compile
(
event
)
{
self
.
_api
.
runCompiler
()
}
function
compile
(
event
)
{
self
.
_api
.
runCompiler
()
}
function
getContractNames
(
success
,
data
)
{
self
.
_view
.
contractNames
.
innerHTML
=
''
if
(
success
)
{
self
.
_view
.
contractNames
.
removeAttribute
(
'disabled'
)
self
.
_opts
.
compiler
.
visitContracts
(
contract
=>
{
self
.
data
.
contractsDetails
[
contract
.
name
]
=
parseContracts
(
contract
.
name
,
contract
.
object
,
self
.
_opts
.
compiler
.
getSource
(
contract
.
file
))
var
contractName
=
yo
`<option>
${
contract
.
name
}
</option>`
self
.
_view
.
contractNames
.
appendChild
(
contractName
)
})
self
.
_api
.
resetDapp
(
self
.
data
.
contractsDetails
)
}
else
{
self
.
_view
.
contractNames
.
setAttribute
(
'disabled'
,
true
)
self
.
_api
.
resetDapp
({})
}
}
function
details
()
{
function
details
()
{
const
select
=
self
.
_view
.
contractNames
const
select
=
self
.
_view
.
contractNames
if
(
select
.
children
.
length
>
0
&&
select
.
selectedIndex
>=
0
)
{
if
(
select
.
children
.
length
>
0
&&
select
.
selectedIndex
>=
0
)
{
...
...
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