aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-10 16:07:05 -0700
committerfriendica <info@friendica.com>2012-04-10 16:07:05 -0700
commit703bfcb6d4bd21e68aaabd5f1b256106c505f0e9 (patch)
treec4fc85a1c8cdacaed03fb358a11a714f4e556e18 /view/theme/diabook
parent14d68a0dc031b271d26e735160651da52b55d562 (diff)
parent0e97e2338a697141965e74ed3c68f7cd1aff4f7f (diff)
downloadvolse-hubzilla-703bfcb6d4bd21e68aaabd5f1b256106c505f0e9.tar.gz
volse-hubzilla-703bfcb6d4bd21e68aaabd5f1b256106c505f0e9.tar.bz2
volse-hubzilla-703bfcb6d4bd21e68aaabd5f1b256106c505f0e9.zip
Merge https://github.com/friendica/friendica into pull
Diffstat (limited to 'view/theme/diabook')
-rw-r--r--view/theme/diabook/comment_item.tpl4
-rw-r--r--view/theme/diabook/icons/bb-url.pngbin0 -> 939 bytes
-rw-r--r--view/theme/diabook/icons/quote.pngbin0 -> 631 bytes
-rw-r--r--view/theme/diabook/style.css8
-rwxr-xr-xview/theme/diabook/theme.php6
5 files changed, 17 insertions, 1 deletions
diff --git a/view/theme/diabook/comment_item.tpl b/view/theme/diabook/comment_item.tpl
index 4668b9ce3..535134256 100644
--- a/view/theme/diabook/comment_item.tpl
+++ b/view/theme/diabook/comment_item.tpl
@@ -13,7 +13,9 @@
<div class="comment-edit-photo-end"></div>
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);" onBlur="commentClose(this,$id);" >$comment</textarea>
<a class="icon bb-video" onclick="insertFormatting('video',$id);">video</a>
- <a class="icon bb-image" onclick="insertFormatting('img',$id);">img</a>
+ <a class="icon bb-image" onclick="insertFormatting('img',$id);">img</a>
+ <a class="icon bb-url" onclick="insertFormatting('url',$id);">url</a>
+ <a class="icon quote" onclick="insertFormatting('quote',$id);">quote</a>
<a class="icon italic" onclick="insertFormatting('i',$id);">i</a>
<a class="icon underline" onclick="insertFormatting('u',$id);">u</a>
<a class="icon bold" onclick="insertFormatting('b',$id);">b</a>
diff --git a/view/theme/diabook/icons/bb-url.png b/view/theme/diabook/icons/bb-url.png
new file mode 100644
index 000000000..071fc1865
--- /dev/null
+++ b/view/theme/diabook/icons/bb-url.png
Binary files differ
diff --git a/view/theme/diabook/icons/quote.png b/view/theme/diabook/icons/quote.png
new file mode 100644
index 000000000..a464f2859
--- /dev/null
+++ b/view/theme/diabook/icons/quote.png
Binary files differ
diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css
index 229076484..7105ad0e3 100644
--- a/view/theme/diabook/style.css
+++ b/view/theme/diabook/style.css
@@ -83,6 +83,14 @@
#adminpage .selectall { text-align: right; }
/* icons */
+.icon.bb-url{
+ background-image: url("../../../view/theme/diabook/icons/bb-url.png");
+ float: right;
+ margin-top: 2px;}
+.icon.quote{
+ background-image: url("../../../view/theme/diabook/icons/quote.png");
+ float: right;
+ margin-top: 2px;}
.icon.bold{
background-image: url("../../../view/theme/diabook/icons/bold.png");
float: right;
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index bf31c08eb..4acb058e5 100755
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php
@@ -538,10 +538,16 @@ function insertFormatting(BBcode,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;