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
63fee5d6
Commit
63fee5d6
authored
Dec 06, 2019
by
LianaHus
Committed by
Liana Husikyan
Dec 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style update after review
parent
d89cfefd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
compilerContainer.js
src/app/tabs/compileTab/compilerContainer.js
+8
-10
No files found.
src/app/tabs/compileTab/compilerContainer.js
View file @
63fee5d6
...
...
@@ -37,7 +37,7 @@ class CompilerContainer {
}
if
(
!
this
.
_view
.
compilationButton
)
return
const
button
=
this
.
compilationButton
(
name
.
split
(
'/'
).
pop
())
this
.
_disableCompileBtn
(
!
name
||
name
===
''
)
this
.
_disableCompileBtn
(
!
name
)
yo
.
update
(
this
.
_view
.
compilationButton
,
button
)
}
...
...
@@ -104,27 +104,25 @@ class CompilerContainer {
/**************
* SUBCOMPONENT
*/
compilationButton
(
name
)
{
if
(
!
name
)
name
=
''
const
displayed
=
name
===
''
?
'<no file selected>'
:
name
const
disabled
=
name
===
''
?
'disabled'
:
''
compilationButton
(
name
=
''
)
{
const
displayed
=
name
||
'<no file selected>'
const
disabled
=
name
?
''
:
'disabled'
const
compileBtn
=
yo
`
<button id="compileBtn" class="btn btn-primary btn-block
${
disabled
}
" title="Compile" onclick="
${
this
.
compile
.
bind
(
this
)}
">
<span>
${
this
.
_view
.
compileIcon
}
Compile
${
displayed
}
</span>
</button>
`
let
el
=
yo
`
return
yo
`
<div class="px-2 mt-2 pb-0 d-flex">
${
compileBtn
}
</div>
`
return
el
}
_disableCompileBtn
(
d
isable
)
{
let
btn
=
document
.
querySelector
(
"button[id='compileBtn']"
)
_disableCompileBtn
(
shouldD
isable
)
{
let
btn
=
document
.
getElementById
(
'compileBtn'
)
if
(
!
btn
)
return
if
(
d
isable
)
{
if
(
shouldD
isable
)
{
btn
.
classList
.
add
(
'disabled'
)
}
else
if
(
this
.
config
.
get
(
'currentFile'
))
{
btn
.
classList
.
remove
(
'disabled'
)
...
...
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