aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/dispy/bottom.tpl
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2012-04-24 02:18:51 +0100
committerThomas Willingham <founder@kakste.com>2012-04-24 02:18:51 +0100
commit8a80ea24d1d8039be6dc532c9db23c60e71eb467 (patch)
tree7f94f8d1e2336bbb7e69a327a003b6880f0610c0 /view/theme/dispy/bottom.tpl
parentc4f4715a541ad89dfd348f14c4e25a83006e74e7 (diff)
parentaf7abcea2715824cbd6460a7323c8bb64bd5b829 (diff)
downloadvolse-hubzilla-8a80ea24d1d8039be6dc532c9db23c60e71eb467.tar.gz
volse-hubzilla-8a80ea24d1d8039be6dc532c9db23c60e71eb467.tar.bz2
volse-hubzilla-8a80ea24d1d8039be6dc532c9db23c60e71eb467.zip
Merge remote-tracking branch 'upstream/master'
Merge upstream
Diffstat (limited to 'view/theme/dispy/bottom.tpl')
-rw-r--r--view/theme/dispy/bottom.tpl46
1 files changed, 46 insertions, 0 deletions
diff --git a/view/theme/dispy/bottom.tpl b/view/theme/dispy/bottom.tpl
new file mode 100644
index 000000000..130bfb25a
--- /dev/null
+++ b/view/theme/dispy/bottom.tpl
@@ -0,0 +1,46 @@
+<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();
+}
+</script>