Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
4f19e5c6
Commit
4f19e5c6
authored
Jun 25, 2015
by
samhed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow the popupStatusPanel to show any text but close it on a 1.5 second timer.
parent
31ddaa1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
ui.js
include/ui.js
+17
-3
No files found.
include/ui.js
View file @
4f19e5c6
...
@@ -29,6 +29,7 @@ var UI;
...
@@ -29,6 +29,7 @@ var UI;
settingsOpen
:
false
,
settingsOpen
:
false
,
connSettingsOpen
:
false
,
connSettingsOpen
:
false
,
popupStatusOpen
:
false
,
popupStatusOpen
:
false
,
popupTimeout
:
null
,
clipboardOpen
:
false
,
clipboardOpen
:
false
,
keyboardVisible
:
false
,
keyboardVisible
:
false
,
hideKeyboardTimeout
:
null
,
hideKeyboardTimeout
:
null
,
...
@@ -356,17 +357,30 @@ var UI;
...
@@ -356,17 +357,30 @@ var UI;
// Show the popup status panel
// Show the popup status panel
togglePopupStatusPanel
:
function
()
{
togglePopupStatusPanel
:
function
(
text
)
{
var
psp
=
$D
(
'noVNC_popup_status_panel'
);
var
psp
=
$D
(
'noVNC_popup_status_panel'
);
if
(
UI
.
popupStatusOpen
===
true
)
{
var
closePopup
=
function
()
{
psp
.
style
.
display
=
"none"
;
psp
.
style
.
display
=
"none"
;
UI
.
popupStatusOpen
=
false
;
UI
.
popupStatusOpen
=
false
;
};
if
(
UI
.
popupStatusOpen
===
true
)
{
clearTimeout
(
UI
.
popupTimeout
);
closePopup
();
}
else
{
}
else
{
psp
.
innerHTML
=
$D
(
'noVNC_status'
).
innerHTML
;
if
(
typeof
text
===
'text'
)
{
psp
.
innerHTML
=
text
;
}
else
{
psp
.
innerHTML
=
$D
(
'noVNC_status'
).
innerHTML
;
}
psp
.
style
.
display
=
"block"
;
psp
.
style
.
display
=
"block"
;
psp
.
style
.
left
=
window
.
innerWidth
/
2
-
psp
.
style
.
left
=
window
.
innerWidth
/
2
-
parseInt
(
window
.
getComputedStyle
(
psp
,
false
).
width
)
/
2
-
30
+
"px"
;
parseInt
(
window
.
getComputedStyle
(
psp
,
false
).
width
)
/
2
-
30
+
"px"
;
UI
.
popupStatusOpen
=
true
;
UI
.
popupStatusOpen
=
true
;
// Show the popup for a maximum of 1.5 seconds
UI
.
popupTimeout
=
setTimeout
(
function
()
{
closePopup
();
},
1500
);
}
}
},
},
...
...
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