From 6a2f0eb475356ebe946a499a7a8bdee487b7ff32 Mon Sep 17 00:00:00 2001 From: Simon L'nu <simon.lnu@gmail.com> Date: Sun, 15 Apr 2012 03:18:55 -0400 Subject: REALLY fix fpostit this time Signed-off-by: Simon L'nu <simon.lnu@gmail.com> --- view/theme/dispy/bottom.tpl | 1 + 1 file changed, 1 insertion(+) create mode 100644 view/theme/dispy/bottom.tpl (limited to 'view/theme/dispy/bottom.tpl') diff --git a/view/theme/dispy/bottom.tpl b/view/theme/dispy/bottom.tpl new file mode 100644 index 000000000..1b7dda8f8 --- /dev/null +++ b/view/theme/dispy/bottom.tpl @@ -0,0 +1 @@ +<script type="text/javascript" src="$baseurl/view/theme/dispy/js/jquery.autogrow.textarea.js"></script> -- cgit v1.2.3 From eb9ddb884a9fa2c9a1cc351830e953cf477a3a40 Mon Sep 17 00:00:00 2001 From: Simon L'nu <simon.lnu@gmail.com> Date: Fri, 20 Apr 2012 05:56:54 -0400 Subject: optimise imgs; add some comment editing knobs Signed-off-by: Simon L'nu <simon.lnu@gmail.com> --- view/theme/dispy/bottom.tpl | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'view/theme/dispy/bottom.tpl') diff --git a/view/theme/dispy/bottom.tpl b/view/theme/dispy/bottom.tpl index 1b7dda8f8..a0298a7de 100644 --- a/view/theme/dispy/bottom.tpl +++ b/view/theme/dispy/bottom.tpl @@ -1 +1,52 @@ <script type="text/javascript" src="$baseurl/view/theme/dispy/js/jquery.autogrow.textarea.js"></script> +<script type="text/javascript"> +$(document).ready(function() { + +}); +function tautogrow(id) { + $("textarea#comment-edit-text-" + id).autogrow(); +}; + +function insertFormatting(comment, BBcode, id) { + var tmpStr = $("#comment-edit-text-" + id).val(); + if(tmpStr == comment) { + tmpStr = ""; + $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); + $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); + openMenu("comment-edit-submit-wrapper-" + id); + } + textarea = document.getElementById("comment-edit-text-" + id); + if (document.selection) { + textarea.focus(); + selected = document.selection.createRange(); + if (BBcode == "url") { + selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]"; + } else { + selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]"; + } + } else if (textarea.selectionStart || textarea.selectionStart == "0") { + var start = textarea.selectionStart; + var end = textarea.selectionEnd; + if (BBcode == "url") { + textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + + "http://" + textarea.value.substring(start, end) + + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); + } else { + textarea.value = textarea.value.substring(0, start) + + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + + textarea.value.substring(end, textarea.value.length); + } + } + return true; +} + +function cmtBbOpen(id) { + $(".comment-edit-bb-" + id).show(); + $(".comment-edit-bb-" + id + "> li").css({visibility: 'visible'}); + +} +function cmtBbClose(id) { + $(".comment-edit-bb-" + id).hide(); + $(".comment-edit-bb-" + id + "> li").css({visibility: 'none'}); +} +</script> -- cgit v1.2.3 From 5d2dd5798bcb8d9b100f0a19b822b0477c546160 Mon Sep 17 00:00:00 2001 From: Simon L'nu <simon.lnu@gmail.com> Date: Fri, 20 Apr 2012 06:42:08 -0400 Subject: fix the buttons. don't hide the buttons once shown Signed-off-by: Simon L'nu <simon.lnu@gmail.com> --- view/theme/dispy/bottom.tpl | 6 ------ 1 file changed, 6 deletions(-) (limited to 'view/theme/dispy/bottom.tpl') diff --git a/view/theme/dispy/bottom.tpl b/view/theme/dispy/bottom.tpl index a0298a7de..130bfb25a 100644 --- a/view/theme/dispy/bottom.tpl +++ b/view/theme/dispy/bottom.tpl @@ -42,11 +42,5 @@ function insertFormatting(comment, BBcode, id) { function cmtBbOpen(id) { $(".comment-edit-bb-" + id).show(); - $(".comment-edit-bb-" + id + "> li").css({visibility: 'visible'}); - -} -function cmtBbClose(id) { - $(".comment-edit-bb-" + id).hide(); - $(".comment-edit-bb-" + id + "> li").css({visibility: 'none'}); } </script> -- cgit v1.2.3