]> git.mxchange.org Git - friendica.git/blob - view/theme/dispy/templates/bottom.tpl
49487240dc4a5cc85442af4da4cd3ce815c7997c
[friendica.git] / view / theme / dispy / templates / bottom.tpl
1 {{*
2  *      AUTOMATICALLY GENERATED TEMPLATE
3  *      DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
4  *
5  *}}
6 <script type="text/javascript" src="{{$baseurl}}/view/theme/dispy/js/jquery.autogrow.textarea.js"></script>
7 <script type="text/javascript">
8 $(document).ready(function() {
9
10 });
11 function tautogrow(id) {
12         $("textarea#comment-edit-text-" + id).autogrow();
13 };
14
15 function insertFormatting(comment, BBcode, id) {
16         var tmpStr = $("#comment-edit-text-" + id).val();
17         if(tmpStr == comment) {
18                 tmpStr = "";
19                 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
20                 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
21                 openMenu("comment-edit-submit-wrapper-" + id);
22         }
23         textarea = document.getElementById("comment-edit-text-" + id);
24         if (document.selection) {
25                 textarea.focus();
26                 selected = document.selection.createRange();
27                 if (BBcode == "url") {
28                         selected.text = "["+BBcode+"]" + "http://" +  selected.text + "[/"+BBcode+"]";
29                 } else {
30                         selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
31                 }
32         } else if (textarea.selectionStart || textarea.selectionStart == "0") {
33                 var start = textarea.selectionStart;
34                 var end = textarea.selectionEnd;
35                 if (BBcode == "url") {
36                         textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]"
37                         + "http://" + textarea.value.substring(start, end)
38                         + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
39                 } else {
40                         textarea.value = textarea.value.substring(0, start)
41                         + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]"
42                         + textarea.value.substring(end, textarea.value.length);
43                 }
44         }
45         return true;
46 }
47
48 function cmtBbOpen(id) {
49         $(".comment-edit-bb-" + id).show();
50 }
51 function cmtBbClose(id) {
52     $(".comment-edit-bb-" + id).hide();
53 }
54
55 var doctitle = document.title;
56 function checkNotify() {
57         if(document.getElementById("notify-update").innerHTML != "") {
58                 document.title = "("+document.getElementById("notify-update").innerHTML+") " + doctitle;
59         } else {
60                 document.title = doctitle;
61     };
62     setInterval(function () {checkNotify();}, 10 * 1000);
63 }
64
65 $(document).ready(function(){
66 var doctitle = document.title;
67 function checkNotify() {
68 if(document.getElementById("notify-update").innerHTML != "")
69 document.title = "("+document.getElementById("notify-update").innerHTML+") " + doctitle;
70 else
71 document.title = doctitle;
72 };
73 setInterval(function () {checkNotify();}, 10 * 1000);
74 })
75
76 </script>