aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_hq.js
blob: dc274c5bf4dfb598adfdb6f526089dd05a31937b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$(document).ready(function() {

	$('.autotime').timeago();

	if (bParam_mid) {
		src = 'hq';
		$('.channel-activities-toggle').removeClass('d-none');
	}
	else {
		$('#channel-activities').removeClass('d-none');
	}

	$(document).one('click', '.notification, .message', function(e) {
		page_load = false;
		followUpPageLoad = true;
		src = 'hq';
		$('#channel-activities').addClass('d-none');
		$('.channel-activities-toggle').removeClass('d-none');
	});

	$(document).on('click', '.channel-activities-toggle', function(e) {
		$(window).scrollTop(0);
		$(document).trigger('hz:hqControlsClickAction');
		$('#channel-activities').toggleClass('d-none');
		$(this).toggleClass('active');
	});

	$(document).on('click', '.jot-toggle', function(e) {
		$(document).trigger('hz:hqControlsClickAction');
		$('#jot-popup').toggle();
		$('#profile-jot-text').focus().get(0).scrollIntoView({block: 'center'});
		$(this).toggleClass('active');
	});

	$(document).on('click', '.notes-toggle', function(e) {
		$(document).trigger('hz:hqControlsClickAction');
		$('#personal-notes').toggleClass('d-none');
		$('#note-text-html').get(0).scrollIntoView({block: 'center'});
		$(this).toggleClass('active');
	});

});