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
5e4ea89f
Commit
5e4ea89f
authored
May 28, 2019
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable linter for Element
parent
74d2787e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tooltip.js
src/app/ui/tooltip.js
+3
-2
No files found.
src/app/ui/tooltip.js
View file @
5e4ea89f
/* global Element */
var
yo
=
require
(
'yo-yo'
)
var
yo
=
require
(
'yo-yo'
)
var
css
=
require
(
'./styles/tooltip-styles'
)
var
css
=
require
(
'./styles/tooltip-styles'
)
var
modal
=
require
(
'./modal-dialog-custom'
)
var
modal
=
require
(
'./modal-dialog-custom'
)
...
@@ -25,7 +26,7 @@ class Toaster {
...
@@ -25,7 +26,7 @@ class Toaster {
render
(
tooltipText
,
action
,
opts
)
{
render
(
tooltipText
,
action
,
opts
)
{
opts
=
defaultOptions
(
opts
)
opts
=
defaultOptions
(
opts
)
let
canShorten
=
true
let
canShorten
=
true
if
(
tooltipText
[
'nodeName'
]
)
{
if
(
tooltipText
instanceof
Element
)
{
canShorten
=
false
canShorten
=
false
}
else
{
}
else
{
if
(
typeof
tooltipText
===
'object'
)
{
if
(
typeof
tooltipText
===
'object'
)
{
...
@@ -44,7 +45,7 @@ class Toaster {
...
@@ -44,7 +45,7 @@ class Toaster {
const
shortTooltipText
=
(
canShorten
&&
tooltipText
.
length
>
201
)
?
tooltipText
.
substring
(
0
,
200
)
+
'...'
:
tooltipText
const
shortTooltipText
=
(
canShorten
&&
tooltipText
.
length
>
201
)
?
tooltipText
.
substring
(
0
,
200
)
+
'...'
:
tooltipText
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
)
}}
>
S
ee
full
error
<
/button
>
<button class="btn btn-secondary btn-sm mx-3" style="white-space: nowrap;" onclick=
${()
=>
{
modal
.
alert
(
tooltipText
)
}}
>
S
how
full
message
<
/button
>
` : ``
` : ``
this.tooltip = yo`
this.tooltip = yo`
...
...
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