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