2014-08-09 18:01:17 +00:00
|
|
|
'use strict';
|
|
|
|
|
2014-09-20 11:51:23 +00:00
|
|
|
TABS.landing = {};
|
|
|
|
TABS.landing.initialize = function (callback) {
|
2014-10-01 10:58:09 +00:00
|
|
|
var self = this;
|
|
|
|
|
2014-10-01 11:16:22 +00:00
|
|
|
if (GUI.active_tab != 'landing') {
|
|
|
|
GUI.active_tab = 'landing';
|
|
|
|
googleAnalytics.sendAppView('Landing Page');
|
|
|
|
}
|
2014-03-08 05:25:15 +00:00
|
|
|
|
2014-09-20 11:51:23 +00:00
|
|
|
$('#content').load("./tabs/landing.html", function () {
|
2014-06-16 20:00:08 +00:00
|
|
|
//check_usb_permissions(); // temporary enabled in dev branch, should be commented out untill DFU support goes live
|
2014-06-08 17:32:24 +00:00
|
|
|
|
2014-05-06 14:45:26 +00:00
|
|
|
// translate to user-selected language
|
|
|
|
localize();
|
|
|
|
|
2013-10-30 16:42:04 +00:00
|
|
|
// load changelog content
|
|
|
|
$('div.changelog.configurator .wrapper').load('./changelog.html');
|
2014-03-08 05:25:15 +00:00
|
|
|
|
2013-11-13 07:55:29 +00:00
|
|
|
// UI Hooks
|
2014-08-12 14:05:22 +00:00
|
|
|
$('a.firmware_flasher').click(function () {
|
2014-08-12 13:51:31 +00:00
|
|
|
TABS.firmware_flasher.initialize();
|
2014-07-10 16:41:11 +00:00
|
|
|
});
|
2014-06-27 17:19:06 +00:00
|
|
|
|
2014-08-12 14:05:22 +00:00
|
|
|
$('div.welcome a, div.sponsors a').click(function () {
|
2014-07-16 10:59:12 +00:00
|
|
|
googleAnalytics.sendEvent('ExternalUrls', 'Click', $(this).prop('href'));
|
2014-06-27 17:19:06 +00:00
|
|
|
});
|
2014-07-10 16:14:17 +00:00
|
|
|
|
|
|
|
if (callback) callback();
|
2013-10-30 16:42:04 +00:00
|
|
|
});
|
2014-07-10 16:14:17 +00:00
|
|
|
};
|
|
|
|
|
2014-09-20 11:51:23 +00:00
|
|
|
TABS.landing.cleanup = function (callback) {
|
2014-07-10 16:14:17 +00:00
|
|
|
if (callback) callback();
|
|
|
|
};
|