1 // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
2 $(document).ready(function(){
3 $('nav').bind('nav-update', function(e,data){
4 var notifCount = $(data).find('notif').attr('count');
5 var intro = parseInt($(data).find('intro').text());
6 var mail = parseInt($(data).find('mail').text());
8 $(".tool .notify").removeClass("on");
9 $(data).find("group").each(function() {
11 var gcount = this.innerHTML;
12 $(".group-"+gid+" .notify").addClass("on").text(gcount);
15 $(".forum-widget-entry .notify").removeClass("on");
16 $(data).find("forum").each(function() {
18 var fcount = this.innerHTML;
19 $(".forum-"+fid+" .notify").addClass("on").text(fcount);
22 console.log(intro,mail);
24 if (notifCount > 0 ) {
25 Tinycon.setBubble(notifCount);
27 Tinycon.setBubble('');
31 $("#nav-introductions-link").addClass("on");
33 $("#nav-introductions-link").removeClass("on");
37 $("#nav-messages-link").addClass("on");
39 $("#nav-messages-link").removeClass("on");
45 * show and hide contact action buttons in
46 * contacts page on contacts' checkbox selection
48 $('.contact-select').bind('click', function(e) {
50 var elm = $("#contacts-actions");
53 if (y+elm.height() > $("html").height()) y=$("html").height()-elm.height();
54 elm.css('top', y+"px");
55 if ($(".contact-select:checked").length > 0) {
63 function showThread(id) {
64 $("#collapsed-comments-" + id).show()
65 $("#collapsed-comments-" + id + " .collapsed-comments").show()
67 function hideThread(id) {
68 $("#collapsed-comments-" + id).hide()
69 $("#collapsed-comments-" + id + " .collapsed-comments").hide()
73 function cmtBbOpen(id) {
74 $("#comment-edit-bb-" + id).show();
76 function cmtBbClose(id) {
77 $("#comment-edit-bb-" + id).hide();
80 $(document).ready(function() {
82 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
84 $('.group-edit-icon').hover(
86 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
88 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
91 $('.sidebar-group-element').hover(
93 id = $(this).attr('id');
94 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
97 id = $(this).attr('id');
98 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
102 $('.savedsearchdrop').hover(
104 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
106 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
109 $('.savedsearchterm').hover(
111 id = $(this).attr('id');
112 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
115 id = $(this).attr('id');
116 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}