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
00f0125e
Unverified
Commit
00f0125e
authored
May 23, 2019
by
yann300
Committed by
GitHub
May 23, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2015 from ethereum/yann300-patch-37
Fix tooltip (support object)
parents
7e46cb06
ab053e76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
tooltip.js
src/app/ui/tooltip.js
+11
-0
No files found.
src/app/ui/tooltip.js
View file @
00f0125e
...
@@ -25,6 +25,17 @@ class Toaster {
...
@@ -25,6 +25,17 @@ class Toaster {
render
(
tooltipText
,
action
,
opts
)
{
render
(
tooltipText
,
action
,
opts
)
{
opts
=
defaultOptions
(
opts
)
opts
=
defaultOptions
(
opts
)
if
(
typeof
tooltipText
===
'object'
)
{
if
(
tooltipText
.
message
)
{
tooltipText
=
tooltipText
.
message
}
else
{
try
{
tooltipText
=
JSON
.
stringify
(
tooltipText
)
}
catch
(
e
)
{
}
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
shortTooltipText
=
tooltipText
.
length
>
201
?
tooltipText
.
substring
(
0
,
200
)
+
'...'
:
tooltipText
const
shortTooltipText
=
tooltipText
.
length
>
201
?
tooltipText
.
substring
(
0
,
200
)
+
'...'
:
tooltipText
...
...
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