+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
$(document).ready(function(){
$('nav').bind('nav-update', function(e,data){
var notifCount = $(data).find('notif').attr('count');
- var intro = $(data).find('intro').text();
- var mail = $(data).find('mail').text();
+ var intro = parseInt($(data).find('intro').text());
+ var mail = parseInt($(data).find('mail').text());
$(".tool .notify").removeClass("on");
$(data).find("group").each(function() {
$(".group-"+gid+" .notify").addClass("on").text(gcount);
});
+ $(".forum-widget-entry .notify").removeClass("on");
+ $(data).find("forum").each(function() {
+ var fid = this.id;
+ var fcount = this.innerHTML;
+ $(".forum-"+fid+" .notify").addClass("on").text(fcount);
+ });
+
console.log(intro,mail);
if (notifCount > 0 ) {
});
});
-function insertFormatting(comment,BBcode,id) {
-
- var tmpStr = $("#comment-edit-text-" + id).val();
- if(tmpStr == comment) {
- tmpStr = "";
- $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
- $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
- openMenu("comment-edit-submit-wrapper-" + id);
- $("#comment-edit-text-" + id).val(tmpStr);
- }
-
- textarea = document.getElementById("comment-edit-text-" +id);
- if (document.selection) {
- textarea.focus();
- selected = document.selection.createRange();
- if (BBcode == "url"){
- selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
- } else
- selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
- } else if (textarea.selectionStart || textarea.selectionStart == "0") {
- var start = textarea.selectionStart;
- var end = textarea.selectionEnd;
- if (BBcode == "url"){
- textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
- } else
- textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
- }
- return true;
-}
-
function showThread(id) {
$("#collapsed-comments-" + id).show()
$("#collapsed-comments-" + id + " .collapsed-comments").show()
});
-
+// @license-end