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