aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook-aerith/theme.php
diff options
context:
space:
mode:
authortommy tomson <thomas.bierey@gmx.de>2012-04-10 00:55:39 +0200
committertommy tomson <thomas.bierey@gmx.de>2012-04-10 00:55:39 +0200
commit0d4fab4ee3cba6db669d6b7e608bfbbba8e8d3dc (patch)
tree31876f26f919cb896021fd235ccde8bf6e2ca744 /view/theme/diabook-aerith/theme.php
parentd25a9df99600b0ce204d88114f07f5ed1db9d5d3 (diff)
downloadvolse-hubzilla-0d4fab4ee3cba6db669d6b7e608bfbbba8e8d3dc.tar.gz
volse-hubzilla-0d4fab4ee3cba6db669d6b7e608bfbbba8e8d3dc.tar.bz2
volse-hubzilla-0d4fab4ee3cba6db669d6b7e608bfbbba8e8d3dc.zip
bbcode toolbar attached to the comment text field
minor css-fixes
Diffstat (limited to 'view/theme/diabook-aerith/theme.php')
-rwxr-xr-xview/theme/diabook-aerith/theme.php33
1 files changed, 30 insertions, 3 deletions
diff --git a/view/theme/diabook-aerith/theme.php b/view/theme/diabook-aerith/theme.php
index 40093e545..1b26e47f8 100755
--- a/view/theme/diabook-aerith/theme.php
+++ b/view/theme/diabook-aerith/theme.php
@@ -3,13 +3,13 @@
/*
* Name: Diabook-aerith
* Description: Diabook-aerith : report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
- * Version: (Version: 1.015)
+ * Version: (Version: 1.016)
* Author:
*/
//print diabook-version for debugging
-$diabook_version = "Diabook-aerith (Version: 1.015)";
+$diabook_version = "Diabook-aerith (Version: 1.016)";
$a->page['htmlhead'] .= sprintf('<script "%s" ></script>', $diabook_version);
@@ -507,4 +507,31 @@ function restore_boxes(){
$.cookie("close_lastlikes","2", { expires: 365, path: "/" });
alert("Right-hand column was restored. Please refresh your browser");
}
-</script>';} \ No newline at end of file
+</script>';}
+
+$a->page['htmlhead'] .= '
+
+<script type="text/javascript">
+function insertFormatting(BBcode,id) {
+
+ var tmpStr = $("#comment-edit-text-" + id).val();
+ if(tmpStr == "Kommentar") {
+ 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();
+ selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
+ } else if (textarea.selectionStart || textarea.selectionStart == "0") {
+ var start = textarea.selectionStart;
+ var end = textarea.selectionEnd;
+ textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
+ }
+ return true;
+}
+</script> '; \ No newline at end of file