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
825fd8f7
Unverified
Commit
825fd8f7
authored
Feb 12, 2018
by
yann300
Committed by
GitHub
Feb 12, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1040 from ethereum/bug_fix/985_load_gitter_iframe
load gitter iframe only when support tab is loaded
parents
9ba7e5c0
f8386b22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
righthand-panel.js
src/app/panels/righthand-panel.js
+1
-1
support-tab.js
src/app/tabs/support-tab.js
+23
-3
No files found.
src/app/panels/righthand-panel.js
View file @
825fd8f7
...
...
@@ -51,7 +51,7 @@ function RighthandPanel (appAPI, events, opts) {
this
.
_view
.
tabbedMenu
.
addTab
(
'Settings'
,
'settingsView'
,
settingsTab
(
optionViews
,
appAPI
,
events
))
this
.
_view
.
tabbedMenu
.
addTab
(
'Analysis'
,
'staticanalysisView'
,
analysisTab
(
optionViews
))
this
.
_view
.
tabbedMenu
.
addTab
(
'Debugger'
,
'debugView'
,
debuggerTab
(
optionViews
))
this
.
_view
.
tabbedMenu
.
addTab
(
'Support'
,
'supportView'
,
supportTab
(
optionViews
))
this
.
_view
.
tabbedMenu
.
addTab
(
'Support'
,
'supportView'
,
supportTab
(
optionViews
,
events
))
this
.
_view
.
tabbedMenu
.
selectTabByTitle
(
'Compile'
)
self
.
pluginManager
=
new
PluginManager
(
appAPI
,
events
)
...
...
src/app/tabs/support-tab.js
View file @
825fd8f7
...
...
@@ -11,8 +11,12 @@ var infoText = yo`
</div>
`
function
supportTab
(
container
)
{
var
el
=
yo
`
let
gitterIframe
=
yo
`
<iframe class="
${
css
.
chatIframe
}
" src='https://gitter.im/ethereum/remix/~embed'>
`
function
supportTabView
(
gitterIframe
)
{
return
yo
`
<div class="
${
css
.
supportTabView
}
"id="supportView">
<div>
<div class="
${
css
.
infoBox
}
">
...
...
@@ -23,10 +27,26 @@ function supportTab (container) {
<div class="
${
css
.
chatTitle
}
" onclick=
${
openLink
}
title='Click to open chat in Gitter'>
<div class="
${
css
.
chatTitleText
}
">ethereum/remix community chat</div>
</div>
<iframe class="
${
css
.
chatIframe
}
" src='https://gitter.im/ethereum/remix/~embed'>
${
gitterIframe
}
</div>
</div>
`
}
function
supportTab
(
container
,
events
)
{
let
el
=
supportTabView
(
''
)
let
gitterIsLoaded
=
false
events
.
app
.
register
(
'tabChanged'
,
(
tabName
)
=>
{
if
(
tabName
!==
'Support'
||
gitterIsLoaded
)
{
return
}
yo
.
update
(
el
,
supportTabView
(
gitterIframe
))
el
.
style
.
display
=
'block'
gitterIsLoaded
=
true
})
container
.
appendChild
(
el
)
return
el
}
...
...
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