2016-07-04 13:21:23 +00:00
|
|
|
define([
|
2017-04-18 10:14:32 +00:00
|
|
|
'jquery',
|
2017-11-23 11:28:49 +00:00
|
|
|
'/common/outer/local-store.js',
|
2017-11-13 16:01:09 +00:00
|
|
|
'/customize/messages.js',
|
2018-01-10 08:54:10 +00:00
|
|
|
], function ($, LocalStore, Messages) {
|
2016-08-30 16:15:43 +00:00
|
|
|
|
2017-02-09 17:53:04 +00:00
|
|
|
$(function () {
|
|
|
|
var $main = $('#mainBlock');
|
2017-02-02 17:09:27 +00:00
|
|
|
|
2017-02-09 17:53:04 +00:00
|
|
|
// main block is hidden in case javascript is disabled
|
|
|
|
$main.removeClass('hidden');
|
2017-02-02 17:09:27 +00:00
|
|
|
|
2017-02-09 17:53:04 +00:00
|
|
|
// Make sure we don't display non-translated content (empty button)
|
|
|
|
$main.find('#data').removeClass('hidden');
|
2017-01-31 11:43:28 +00:00
|
|
|
|
2017-11-23 11:28:49 +00:00
|
|
|
if (LocalStore.isLoggedIn()) {
|
2017-08-04 12:35:47 +00:00
|
|
|
if (window.location.pathname === '/') {
|
|
|
|
window.location = '/drive/';
|
2017-08-04 12:37:21 +00:00
|
|
|
return;
|
2017-08-04 12:35:47 +00:00
|
|
|
}
|
2017-02-03 09:48:15 +00:00
|
|
|
}
|
2018-01-10 08:54:10 +00:00
|
|
|
$(window).click(function () {
|
|
|
|
$('.cp-dropdown-content').hide();
|
2017-02-10 15:49:17 +00:00
|
|
|
});
|
2017-02-09 17:53:04 +00:00
|
|
|
});
|
2016-07-04 13:21:23 +00:00
|
|
|
});
|