]> git.mxchange.org Git - friendica.git/blob - view/theme/smoothly/smarty3/bottom.tpl
add warning message about automatically generated templates
[friendica.git] / view / theme / smoothly / 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/smoothly/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
55
56 </script>