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
2e792872
Commit
2e792872
authored
Jun 07, 2018
by
serapath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testTab: refactor prepare class
parent
00a94809
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
test-tab.js
src/app/tabs/test-tab.js
+9
-4
No files found.
src/app/tabs/test-tab.js
View file @
2e792872
...
@@ -8,7 +8,7 @@ function append (container, txt) {
...
@@ -8,7 +8,7 @@ function append (container, txt) {
container
.
appendChild
(
child
)
container
.
appendChild
(
child
)
}
}
function
testTabView
(
api
)
{
function
render
(
api
)
{
var
container
=
yo
`<div class="tests" id="tests"></div>`
var
container
=
yo
`<div class="tests" id="tests"></div>`
let
testCallback
=
function
(
result
)
{
let
testCallback
=
function
(
result
)
{
...
@@ -87,7 +87,7 @@ function testTabView (api) {
...
@@ -87,7 +87,7 @@ function testTabView (api) {
}
}
function
testTab
(
api
=
{},
events
=
{},
opts
=
{})
{
function
testTab
(
api
=
{},
events
=
{},
opts
=
{})
{
let
el
=
testTabView
(
api
)
let
el
=
render
(
api
)
let
gitterIsLoaded
=
false
let
gitterIsLoaded
=
false
events
.
app
.
register
(
'tabChanged'
,
(
tabName
)
=>
{
events
.
app
.
register
(
'tabChanged'
,
(
tabName
)
=>
{
...
@@ -95,7 +95,7 @@ function testTab (api = {}, events = {}, opts = {}) {
...
@@ -95,7 +95,7 @@ function testTab (api = {}, events = {}, opts = {}) {
return
return
}
}
yo
.
update
(
el
,
testTabView
(
api
))
yo
.
update
(
el
,
render
(
api
))
el
.
style
.
display
=
'block'
el
.
style
.
display
=
'block'
gitterIsLoaded
=
true
gitterIsLoaded
=
true
})
})
...
@@ -103,4 +103,9 @@ function testTab (api = {}, events = {}, opts = {}) {
...
@@ -103,4 +103,9 @@ function testTab (api = {}, events = {}, opts = {}) {
return
{
render
()
{
return
el
}
}
return
{
render
()
{
return
el
}
}
}
}
module
.
exports
=
testTab
const
prototype
=
{
constructor
:
testTab
,
render
:
render
}
prototype
.
constructor
.
prototype
=
prototype
module
.
exports
=
prototype
.
constructor
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