-
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1471: add "about" and "disconnect" in "xpra" menu
git-svn-id: https://xpra.org/svn/Xpra/trunk@18726 3bb7dfac-3a0b-4e04-842a-767bc560f471
- Loading branch information
Showing
3 changed files
with
110 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
|
||
<!-- | ||
Copyright (c) 2013-2017 Antoine Martin <[email protected]> | ||
Copyright (c) 2013-2018 Antoine Martin <[email protected]> | ||
Copyright (c) 2014 Joshua Higgins <[email protected]> | ||
Licensed under MPL 2.0 | ||
--> | ||
|
@@ -55,12 +55,34 @@ | |
|
||
<div id="screen" style="width: 100%; height:100%;"> | ||
<div id="top_bar"> | ||
<div class="menu-block"> | ||
<button onclick="show_menu('xpra_menu', event);" class="menu-button">Xpra <span class="caret"></span></button> | ||
<div id="xpra_menu" class="menu-content"> | ||
<a href="#" onclick="show_about(event); return false">About</a> | ||
<a href="#" onclick="client.close(); return false">Disconnect</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="notifications"> | ||
</div> | ||
|
||
<div id="about"> | ||
<h2>Xpra HTML5 Client</h2> | ||
<h3>Version 2.3</h3> | ||
<span> | ||
Copyright (c) 2013-2018 Antoine Martin <[email protected]> | ||
<br /> | ||
Copyright (c) 2014 Joshua Higgins <[email protected]> | ||
</span> | ||
<br /> | ||
<br /> | ||
<span class="info"> | ||
For more information, see <a href="https://xpra.org/trac/wiki/HTML5">xpra HTML5 wiki</a>. | ||
</span> | ||
</div> | ||
|
||
<div> | ||
<textarea id="pasteboard" onblur="this.focus()" autofocus style="display: block; position: absolute; left: -99em;"></textarea> | ||
</div> | ||
|
@@ -76,6 +98,22 @@ | |
var cdebug = console.debug; | ||
var clog = console.log; | ||
|
||
function show_menu(menu_id, event) { | ||
$("#"+menu_id).toggle(); | ||
event.stopPropagation(); | ||
} | ||
|
||
$("body").click(function() { | ||
$('.menu-content').hide(); | ||
$('#about').hide(); | ||
}); | ||
|
||
function show_about(event) { | ||
$('#about').show(); | ||
$('.menu-content').hide(); | ||
event.stopPropagation(); | ||
} | ||
|
||
function init_client() { | ||
if (typeof jQuery == 'undefined') { | ||
window.alert("Incomplete Xpra HTML5 client installation: jQuery is missing, cannot continue."); | ||
|
@@ -454,8 +492,9 @@ | |
screen.addEventListener('drop', handleFileSelect, false); | ||
} | ||
|
||
var client = null; | ||
$(document).ready(function() { | ||
var client = init_client(); | ||
client = init_client(); | ||
client.connect(); | ||
|
||
//from now on, send log and debug to client function | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters