diff options
Diffstat (limited to 'view/theme/diabook-blue')
-rw-r--r-- | view/theme/diabook-blue/comment_item.tpl | 4 | ||||
-rw-r--r-- | view/theme/diabook-blue/icons/bb-url.png | bin | 0 -> 939 bytes | |||
-rw-r--r-- | view/theme/diabook-blue/icons/quote.png | bin | 0 -> 631 bytes | |||
-rw-r--r-- | view/theme/diabook-blue/style.css | 8 | ||||
-rwxr-xr-x | view/theme/diabook-blue/theme.php | 6 |
5 files changed, 17 insertions, 1 deletions
diff --git a/view/theme/diabook-blue/comment_item.tpl b/view/theme/diabook-blue/comment_item.tpl index 4668b9ce3..6e455b726 100644 --- a/view/theme/diabook-blue/comment_item.tpl +++ b/view/theme/diabook-blue/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-blue/icons/bb-url.png b/view/theme/diabook-blue/icons/bb-url.png Binary files differnew file mode 100644 index 000000000..071fc1865 --- /dev/null +++ b/view/theme/diabook-blue/icons/bb-url.png diff --git a/view/theme/diabook-blue/icons/quote.png b/view/theme/diabook-blue/icons/quote.png Binary files differnew file mode 100644 index 000000000..a464f2859 --- /dev/null +++ b/view/theme/diabook-blue/icons/quote.png diff --git a/view/theme/diabook-blue/style.css b/view/theme/diabook-blue/style.css index 2f2369c46..f4eebe072 100644 --- a/view/theme/diabook-blue/style.css +++ b/view/theme/diabook-blue/style.css @@ -82,6 +82,14 @@ #adminpage table tr:hover { background-color: #eeeeee; } #adminpage .selectall { text-align: right; } /* icons */ +.icon.bb-url{ + background-image: url("../../../view/theme/diabook-blue/icons/bb-url.png"); + float: right; + margin-top: 2px;} +.icon.quote{ + background-image: url("../../../view/theme/diabook-blue/icons/quote.png"); + float: right; + margin-top: 2px;} .icon.bold{ background-image: url("../../../view/theme/diabook-blue/icons/bold.png"); float: right; diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index f63f15fd9..435ecaf92 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -527,10 +527,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; |