View | Details | Raw Unified | Return to bug 5454
Collapse All | Expand All

(-)a/include/ui.js (+54 lines)
Lines 159-164 var UI; Link Here
159
                }, 500);
159
                }, 500);
160
            } );
160
            } );
161
161
162
163
            // iOS Safari does not support fullscreen
164
            if ((navigator.userAgent.match(/iPhone/i)) ||
165
                (navigator.userAgent.match(/iPod/i)) ||
166
                (navigator.userAgent.match(/iPad/i))) {
167
                $D('fullscreenButton').style.display = "none";
168
            } else {
169
                Util.addEvent(window, 'fullscreenchange', UI.updateFullscreenButton);
170
                Util.addEvent(window, 'mozfullscreenchange', UI.updateFullscreenButton);
171
                Util.addEvent(window, 'webkitfullscreenchange', UI.updateFullscreenButton);
172
                Util.addEvent(window, 'msfullscreenchange', UI.updateFullscreenButton);
173
            }
174
162
            Util.addEvent(window, 'load', UI.keyboardinputReset);
175
            Util.addEvent(window, 'load', UI.keyboardinputReset);
163
176
164
            Util.addEvent(window, 'beforeunload', function () {
177
            Util.addEvent(window, 'beforeunload', function () {
Lines 222-227 var UI; Link Here
222
            $D("noVNC_popup_status_panel").onclick = UI.togglePopupStatusPanel;
235
            $D("noVNC_popup_status_panel").onclick = UI.togglePopupStatusPanel;
223
            $D("xvpButton").onclick = UI.toggleXvpPanel;
236
            $D("xvpButton").onclick = UI.toggleXvpPanel;
224
            $D("clipboardButton").onclick = UI.toggleClipboardPanel;
237
            $D("clipboardButton").onclick = UI.toggleClipboardPanel;
238
            $D("fullscreenButton").onclick = UI.toggleFullscreen;
225
            $D("settingsButton").onclick = UI.toggleSettingsPanel;
239
            $D("settingsButton").onclick = UI.toggleSettingsPanel;
226
            $D("connectButton").onclick = UI.toggleConnectPanel;
240
            $D("connectButton").onclick = UI.toggleConnectPanel;
227
            $D("disconnectButton").onclick = UI.disconnect;
241
            $D("disconnectButton").onclick = UI.disconnect;
Lines 400-405 var UI; Link Here
400
            }
414
            }
401
        },
415
        },
402
416
417
        // Toggle fullscreen mode
418
        toggleFullscreen: function() {
419
            if (document.fullscreenElement || // alternative standard method
420
                document.mozFullScreenElement || // currently working methods
421
                document.webkitFullscreenElement ||
422
                document.msFullscreenElement ) {
423
                if (document.exitFullscreen) {
424
                    document.exitFullscreen();
425
                } else if (document.msExitFullscreen) {
426
                    document.msExitFullscreen();
427
                } else if (document.mozCancelFullScreen) {
428
                    document.mozCancelFullScreen();
429
                } else if (document.webkitExitFullscreen) {
430
                    document.webkitExitFullscreen();
431
                }
432
            } else {
433
                if (document.documentElement.requestFullscreen) {
434
                    document.documentElement.requestFullscreen();
435
                } else if (document.documentElement.msRequestFullscreen) {
436
                    document.documentElement.msRequestFullscreen();
437
                } else if (document.documentElement.mozRequestFullScreen) {
438
                    document.documentElement.mozRequestFullScreen();
439
                } else if (document.documentElement.webkitRequestFullscreen) {
440
                    document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
441
                }
442
            }
443
            UI.updateFullscreenButton();
444
        },
445
446
        updateFullscreenButton: function() {
447
            if (document.fullscreenElement || // alternative standard method
448
                document.mozFullScreenElement || // currently working methods
449
                document.webkitFullscreenElement ||
450
                document.msFullscreenElement ) {
451
                $D('fullscreenButton').className = "noVNC_status_button_selected";
452
            } else {
453
                $D('fullscreenButton').className = "noVNC_status_button";
454
            }
455
        },
456
403
        // Show the connection settings panel/menu
457
        // Show the connection settings panel/menu
404
        toggleConnectPanel: function() {
458
        toggleConnectPanel: function() {
405
            // Close the description panel
459
            // Close the description panel
(-)a/vnc.html (+3 lines)
Lines 100-105 Link Here
100
            <input type="image" alt="Clipboard" src="images/clipboard.png"
100
            <input type="image" alt="Clipboard" src="images/clipboard.png"
101
                id="clipboardButton" class="noVNC_status_button"
101
                id="clipboardButton" class="noVNC_status_button"
102
                title="Clipboard" />
102
                title="Clipboard" />
103
            <input type="image" alt="Fullscreen" src="images/fullscreen.png"
104
                id="fullscreenButton" class="noVNC_status_button"
105
                title="Fullscreen" />
103
            <input type="image" alt="Settings" src="images/settings.png"
106
            <input type="image" alt="Settings" src="images/settings.png"
104
                id="settingsButton" class="noVNC_status_button"
107
                id="settingsButton" class="noVNC_status_button"
105
                title="Settings" />
108
                title="Settings" />

Return to bug 5454