Fixed confusing "Idle" error handling, improved scoping of UI elements and behavior.
[guacamole.git] / src / main / webapp / client.xhtml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html>
3
4 <!--
5     Guacamole - Clientless Remote Desktop
6     Copyright (C) 2010  Michael Jumper
7
8     This program is free software: you can redistribute it and/or modify
9     it under the terms of the GNU Affero General Public License as published by
10     the Free Software Foundation, either version 3 of the License, or
11     (at your option) any later version.
12
13     This program is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU Affero General Public License for more details.
17
18     You should have received a copy of the GNU Affero General Public License
19     along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 -->
21
22 <html xmlns="http://www.w3.org/1999/xhtml">
23
24     <head>
25         <link rel="icon" type="image/png" href="images/guacamole-logo-64.png"/>
26         <link rel="stylesheet" type="text/css" href="styles/client.css"/>
27         <link rel="stylesheet" type="text/css" href="styles/keyboard.css"/>
28         <title>Guacamole ${project.version}</title>
29     </head>
30
31     <body>
32
33         <!-- Menu -->
34         <div id="menu">
35
36             <!-- Clipboard -->
37             <button id="showClipboard">Show Clipboard</button>
38             <div id="clipboardDiv">
39                 <h2>Clipboard</h2>
40                 <p>
41                 Text copied/cut within Guacamole will appear here. Changes to the text will affect the remote clipboard, and will be pastable within the remote desktop. Use the textbox below as an interface between the client and server clipboards.
42                 </p>
43                 <textarea rows="10" cols="40" id="clipboard"></textarea>
44             </div>
45
46             <button id="showKeyboard">Show Keyboard</button>
47             <button id="ctrlAltDelete">Ctrl-Alt-Delete</button>
48             <button id="logout">Logout</button>
49
50             <!-- Logo and status -->
51             <img id="status-logo" class="logo" src="images/guacamole-logo-24.png" alt="Guacamole" title="Guacamole ${project.version}"/>
52             <span id="state"></span>
53
54         </div>
55
56
57         <!-- Display -->
58         <div id="display" class="guac-display guac-loading">
59             <!-- On-screen keyboard -->
60             <div id="keyboardContainer"></div>
61         </div>
62
63
64         <!-- Error Dialog-->
65         <div id="errorDialog" class="errorDialogOuter">
66             <div class="errorDialogMiddle">
67                 <div class="errorDialog">
68                     <p id="errorText"></p>
69                     <div class="buttons"><button id="reconnect">Reconnect</button></div>
70                 </div>
71             </div>
72         </div>
73
74
75         <!-- guacamole-common-js scripts -->
76         <script type="text/javascript" src="guacamole-common-js/keyboard.js"></script>
77         <script type="text/javascript" src="guacamole-common-js/mouse.js"></script>
78         <script type="text/javascript" src="guacamole-common-js/layer.js"></script>
79         <script type="text/javascript" src="guacamole-common-js/tunnel.js"></script>
80         <script type="text/javascript" src="guacamole-common-js/guacamole.js"></script>
81         <script type="text/javascript" src="guacamole-common-js/oskeyboard.js"></script>
82
83         <!-- guacamole-default-webapp scripts -->
84         <script type="text/javascript" src="scripts/interface.js"></script>
85
86         <!-- Init -->
87         <script type="text/javascript"> /* <![CDATA[ */
88
89             // Instantiate client
90             var guac = new Guacamole.Client(
91                 GuacamoleUI.display,
92                 new Guacamole.HTTPTunnel("tunnel")
93             );
94
95             // Tie UI to client
96             GuacamoleUI.attach(guac);
97
98             try {
99
100                 // Get ID
101                 var id = window.location.search.substring(1);
102
103                 // Connect client
104                 guac.connect("id=" + id);
105
106             }
107             catch (e) {
108                 GuacamoleUI.showError(e.message);
109             }
110
111             /* ]]> */ </script>
112
113     </body>
114
115 </html>