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
0d369491
Commit
0d369491
authored
Jun 28, 2019
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added forceResolve for Toaster
parent
c388b78e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
tooltip.js
src/app/ui/tooltip.js
+7
-0
No files found.
src/app/ui/tooltip.js
View file @
0d369491
...
@@ -23,6 +23,12 @@ class Toaster {
...
@@ -23,6 +23,12 @@ class Toaster {
},
2000
)
},
2000
)
animation
(
this
.
tooltip
,
css
.
animateTop
.
className
)
animation
(
this
.
tooltip
,
css
.
animateTop
.
className
)
}
}
forceResolve
()
{
if
(
this
.
id
)
clearTimeout
(
this
.
id
)
if
(
this
.
resolveFn
)
this
.
resolveFn
()
}
render
(
tooltipText
,
actionElement
,
opts
)
{
render
(
tooltipText
,
actionElement
,
opts
)
{
opts
=
defaultOptions
(
opts
)
opts
=
defaultOptions
(
opts
)
let
canShorten
=
true
let
canShorten
=
true
...
@@ -43,6 +49,7 @@ class Toaster {
...
@@ -43,6 +49,7 @@ class Toaster {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
shortTooltipText
=
(
canShorten
&&
tooltipText
.
length
>
201
)
?
tooltipText
.
substring
(
0
,
200
)
+
'...'
:
tooltipText
const
shortTooltipText
=
(
canShorten
&&
tooltipText
.
length
>
201
)
?
tooltipText
.
substring
(
0
,
200
)
+
'...'
:
tooltipText
this
.
resolveFn
=
resolve
let
button
=
tooltipText
.
length
>
201
?
yo
`
let
button
=
tooltipText
.
length
>
201
?
yo
`
<button class="btn btn-secondary btn-sm mx-3" style="white-space: nowrap;" onclick=
${()
=>
{
modal
.
alert
(
tooltipText
)
}}
>
Show
full
message
<
/button
>
<button class="btn btn-secondary btn-sm mx-3" style="white-space: nowrap;" onclick=
${()
=>
{
modal
.
alert
(
tooltipText
)
}}
>
Show
full
message
<
/button
>
...
...
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