2 * AUTOMATICALLY GENERATED TEMPLATE
3 * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
6 <script type="text/javascript" src="{{$baseurl}}/view/theme/smoothly/js/jquery.autogrow.textarea.js"></script>
7 <script type="text/javascript">
8 $(document).ready(function() {
11 function tautogrow(id) {
12 $("textarea#comment-edit-text-" + id).autogrow();
15 function insertFormatting(comment, BBcode, id) {
16 var tmpStr = $("#comment-edit-text-" + id).val();
17 if(tmpStr == comment) {
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);
23 textarea = document.getElementById("comment-edit-text-" + id);
24 if (document.selection) {
26 selected = document.selection.createRange();
27 if (BBcode == "url") {
28 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
30 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
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);
40 textarea.value = textarea.value.substring(0, start)
41 + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]"
42 + textarea.value.substring(end, textarea.value.length);
48 function cmtBbOpen(id) {
49 $(".comment-edit-bb-" + id).show();
51 function cmtBbClose(id) {
52 $(".comment-edit-bb-" + id).hide();