Browse Source

Merge 61ba374821 into 2a8fc4719b

pull/209/merge
theurere 11 years ago
parent
commit
5a86ddd062
  1. 28
      static/js/controllers/uicontroller.js

28
static/js/controllers/uicontroller.js

@ -22,7 +22,7 @@
"use strict"; "use strict";
define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'webrtc.adapter'], function($, _, BigScreen, moment, sjcl, Modernizr) { define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'webrtc.adapter'], function($, _, BigScreen, moment, sjcl, Modernizr) {
return ["$scope", "$rootScope", "$element", "$window", "$timeout", "safeDisplayName", "safeApply", "mediaStream", "appData", "playSound", "desktopNotify", "alertify", "toastr", "translation", "fileDownload", "localStorage", "screensharing", "localStatus", "dialogs", "rooms", "constraints", function($scope, $rootScope, $element, $window, $timeout, safeDisplayName, safeApply, mediaStream, appData, playSound, desktopNotify, alertify, toastr, translation, fileDownload, localStorage, screensharing, localStatus, dialogs, rooms, constraints) { return ["$scope", "$rootScope", "$element", "$window", "$timeout", "safeDisplayName", "safeApply", "mediaStream", "appData", "playSound", "desktopNotify", "alertify", "toastr", "translation", "fileDownload", "localStorage", "screensharing", "localStatus", "dialogs", "rooms", "constraints", "$document", function($scope, $rootScope, $element, $window, $timeout, safeDisplayName, safeApply, mediaStream, appData, playSound, desktopNotify, alertify, toastr, translation, fileDownload, localStorage, screensharing, localStatus, dialogs, rooms, constraints, $document) {
// Avoid accidential reloads or exits when in a call. // Avoid accidential reloads or exits when in a call.
$($window).on("beforeunload", function(event) { $($window).on("beforeunload", function(event) {
@ -39,12 +39,26 @@ define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'web
} }
}); });
// Enable app full screen listener. var isNodeWebkitApp = !!$window.nwDispatcher
$("#bar .logo").on("doubletap dblclick", _.debounce(function() { if (isNodeWebkitApp) {
if (BigScreen.enabled) { // Enable app full screen listener.
BigScreen.toggle($("body").get(0)); $("#bar .logo").on("doubletap dblclick", _.debounce(function() {
} if (BigScreen.enabled) {
}, 100, true)); BigScreen.toggle($("body").get(0));
}
}, 100, true));
// App full screen exit escape key listener.
var escapeKeyCode = 27;
$document.on('keydown', function(event) {
if ($(event.target).is("input,textarea,select")) {
return;
}
if (event.keyCode === escapeKeyCode && BigScreen.element) {
BigScreen.toggle($("body").get(0));
}
});
}
// Load default sounds. // Load default sounds.
playSound.initialize({ playSound.initialize({

Loading…
Cancel
Save