X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Fquattro%2Fjs%2Fquattro.js;h=469a3bbc93462afddfd431dcac6c68533a7d87b5;hb=15a5d689c6b0d3e0cac389aa4574605ed58dda9c;hp=c2573ebd1d5f726cf58e03c2895c7afe28499ca0;hpb=c73d9611983b05cd1207d69c71a157c051b3f2e8;p=friendica.git diff --git a/view/theme/quattro/js/quattro.js b/view/theme/quattro/js/quattro.js index c2573ebd1d..469a3bbc93 100644 --- a/view/theme/quattro/js/quattro.js +++ b/view/theme/quattro/js/quattro.js @@ -11,6 +11,13 @@ $(document).ready(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 ) { @@ -52,33 +59,25 @@ $(document).ready(function(){ }); }); -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); - } +function insertFormatting(BBcode, id) { + var tmpStr = $("#comment-edit-text-" + id).val(); + if (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); + } 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; }