2 * AUTOMATICALLY GENERATED TEMPLATE
3 * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
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() {
10 function tautogrow(id) {
11 $("textarea#comment-edit-text-" + id).autogrow();
14 function insertFormatting(comment, BBcode, id) {
15 var tmpStr = $("#comment-edit-text-" + id).val();
16 if(tmpStr == comment) {
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);
22 textarea = document.getElementById("comment-edit-text-" + id);
23 if (document.selection) {
25 selected = document.selection.createRange();
26 if (BBcode == "url") {
27 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
29 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
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);
39 textarea.value = textarea.value.substring(0, start)
40 + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]"
41 + textarea.value.substring(end, textarea.value.length);
47 function cmtBbOpen(id) {
48 $(".comment-edit-bb-" + id).show();
50 function cmtBbClose(id) {
51 $(".comment-edit-bb-" + id).hide();