2015-06-18 14:16:11 +00:00
|
|
|
/*
|
|
|
|
* Copyright @ 2015 Atlassian Pty Ltd
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2013-12-16 11:22:23 +00:00
|
|
|
/* jshint -W117 */
|
|
|
|
/* application specific logic */
|
2014-05-12 09:56:33 +00:00
|
|
|
|
2015-01-28 14:35:22 +00:00
|
|
|
var APP =
|
|
|
|
{
|
|
|
|
init: function () {
|
|
|
|
this.UI = require("./modules/UI/UI");
|
|
|
|
this.API = require("./modules/API/API");
|
|
|
|
this.connectionquality = require("./modules/connectionquality/connectionquality");
|
|
|
|
this.statistics = require("./modules/statistics/statistics");
|
|
|
|
this.RTC = require("./modules/RTC/RTC");
|
|
|
|
this.desktopsharing = require("./modules/desktopsharing/desktopsharing");
|
|
|
|
this.xmpp = require("./modules/xmpp/xmpp");
|
|
|
|
this.keyboardshortcut = require("./modules/keyboardshortcut/keyboardshortcut");
|
2015-02-06 15:46:50 +00:00
|
|
|
this.translation = require("./modules/translation/translation");
|
2015-03-09 15:50:13 +00:00
|
|
|
this.settings = require("./modules/settings/Settings");
|
2015-04-07 16:01:19 +00:00
|
|
|
this.DTMF = require("./modules/DTMF/DTMF");
|
2015-04-12 12:18:24 +00:00
|
|
|
this.members = require("./modules/members/MemberList");
|
2015-01-28 14:35:22 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-12-16 11:22:23 +00:00
|
|
|
function init() {
|
2014-11-06 13:54:47 +00:00
|
|
|
|
2015-01-28 14:35:22 +00:00
|
|
|
APP.RTC.start();
|
2015-03-09 15:16:06 +00:00
|
|
|
APP.xmpp.start();
|
2015-01-28 14:35:22 +00:00
|
|
|
APP.statistics.start();
|
|
|
|
APP.connectionquality.init();
|
|
|
|
|
|
|
|
// Set default desktop sharing method
|
|
|
|
APP.desktopsharing.init();
|
|
|
|
|
|
|
|
APP.keyboardshortcut.init();
|
2015-04-12 12:18:24 +00:00
|
|
|
APP.members.start();
|
2013-12-16 11:22:23 +00:00
|
|
|
}
|
|
|
|
|
2014-07-28 11:31:32 +00:00
|
|
|
|
2013-12-16 11:22:23 +00:00
|
|
|
$(document).ready(function () {
|
2015-01-07 14:54:03 +00:00
|
|
|
|
2015-05-25 14:42:59 +00:00
|
|
|
var URLPRocessor = require("./modules/URLProcessor/URLProcessor");
|
|
|
|
URLPRocessor.setConfigParametersFromUrl();
|
2015-01-28 14:35:22 +00:00
|
|
|
APP.init();
|
2014-08-21 16:42:54 +00:00
|
|
|
|
2015-02-06 15:46:50 +00:00
|
|
|
APP.translation.init();
|
|
|
|
|
2015-01-28 14:35:22 +00:00
|
|
|
if(APP.API.isEnabled())
|
|
|
|
APP.API.init();
|
|
|
|
|
|
|
|
APP.UI.start(init);
|
2015-01-22 16:26:05 +00:00
|
|
|
|
2013-12-16 11:22:23 +00:00
|
|
|
});
|
|
|
|
|
2013-12-30 08:31:08 +00:00
|
|
|
$(window).bind('beforeunload', function () {
|
2015-01-28 14:35:22 +00:00
|
|
|
if(APP.API.isEnabled())
|
|
|
|
APP.API.dispose();
|
2013-12-16 11:22:23 +00:00
|
|
|
});
|
|
|
|
|
2015-01-28 14:35:22 +00:00
|
|
|
module.exports = APP;
|
|
|
|
|