Browse Source

Vier: Now there are buttons for inserting bbcode elements in the comments

pull/546/head
Michael Vogel 8 years ago
parent
commit
330960f8f7
4 changed files with 99 additions and 7 deletions
  1. +2
    -1
      view/de/strings.php
  2. +50
    -0
      view/theme/vier/comment_item.tpl
  3. +42
    -3
      view/theme/vier/style.css
  4. +5
    -3
      view/theme/vier/theme.php

+ 2
- 1
view/de/strings.php View File

@ -1024,6 +1024,7 @@ $a->strings["Delegate Page Management"] = "Delegiere das Management für die Sei
$a->strings["Delegates are able to manage all aspects of this account/page except for basic account settings. Please do not delegate your personal account to anybody that you do not trust completely."] = "Bevollmächtigte sind in der Lage, alle Aspekte dieses Kontos/dieser Seite zu verwalten, abgesehen von den Grundeinstellungen des Kontos. Bitte gib niemandem eine Bevollmächtigung für deinen privaten Account, dem du nicht absolut vertraust!";
$a->strings["Existing Page Managers"] = "Vorhandene Seiten Manager";
$a->strings["Existing Page Delegates"] = "Vorhandene Bevollmächtigte für die Seite";
$a->strings["Delegations"] = "Bevollmächtigungen";
$a->strings["Potential Delegates"] = "Potentielle Bevollmächtigte";
$a->strings["Add"] = "Hinzufügen";
$a->strings["No entries."] = "Keine Einträge";
@ -2076,7 +2077,7 @@ $a->strings["Birthday Reminders"] = "Geburtstagserinnerungen";
$a->strings["Birthdays this week:"] = "Geburtstage diese Woche:";
$a->strings["[No description]"] = "[keine Beschreibung]";
$a->strings["Event Reminders"] = "Veranstaltungserinnerungen";
$a->strings["Events this week:"] = "Veranstaltungen diese Woche";
$a->strings["Events this week:"] = "Veranstaltungen diese Woche:";
$a->strings["Status Messages and Posts"] = "Statusnachrichten und Beiträge";
$a->strings["Profile Details"] = "Profildetails";
$a->strings["Events and Calendar"] = "Ereignisse und Kalender";


+ 50
- 0
view/theme/vier/comment_item.tpl View File

@ -0,0 +1,50 @@
{{ if $threaded }}
<div class="comment-wwedit-wrapper threaded" id="comment-edit-wrapper-$id" style="display: block;">
{{ else }}
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
{{ endif }}
<form class="comment-edit-form" style="display: block;" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
<input type="hidden" name="type" value="$type" />
<input type="hidden" name="profile_uid" value="$profile_uid" />
<input type="hidden" name="parent" value="$parent" />
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
</div>
<div class="comment-edit-photo-end"></div>
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);">$comment</textarea>
{{ if $qcomment }}
<select id="qcomment-select-$id" name="qcomment-$id" class="qcomment" onchange="qCommentInsert(this,$id);" >
<option value=""></option>
{{ for $qcomment as $qc }}
<option value="$qc">$qc</option>
{{ endfor }}
</select>
{{ endif }}
<div class="comment-edit-text-end"></div>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
<div class="comment-edit-bb-$id">
<a class="icon bb-image" style="cursor: pointer;" title="$edimg" onclick="insertFormatting('$comment','img',$id);">img</a>
<a class="icon bb-url" style="cursor: pointer;" title="$edurl" onclick="insertFormatting('$comment','url',$id);">url</a>
<a class="icon bb-video" style="cursor: pointer;" title="$edvideo" onclick="insertFormatting('$comment','video',$id);">video</a>
<a class="icon underline" style="cursor: pointer;" title="$eduline" onclick="insertFormatting('$comment','u',$id);">u</a>
<a class="icon italic" style="cursor: pointer;" title="$editalic" onclick="insertFormatting('$comment','i',$id);">i</a>
<a class="icon bold" style="cursor: pointer;" title="$edbold" onclick="insertFormatting('$comment','b',$id);">b</a>
<a class="icon quote" style="cursor: pointer;" title="$edquote" onclick="insertFormatting('$comment','quote',$id);">quote</a>
</div>
<input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" />
<span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="fakelink">$preview</span>
<div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>
</div>
<div class="comment-edit-end"></div>
</form>
</div>

+ 42
- 3
view/theme/vier/style.css View File

@ -86,6 +86,34 @@
#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;
margin-top: 2px;}
.icon.underline{
background-image: url("../../../view/theme/diabook/icons/underline.png");
float: right;
margin-top: 2px;}
.icon.italic{
background-image: url("../../../view/theme/diabook/icons/italic.png");
float: right;
margin-top: 2px;}
.icon.bb-image{
background-image: url("../../../view/theme/diabook/icons/bb-image.png");
float: right;
margin-top: 2px;}
.icon.bb-video{
background-image: url("../../../view/theme/diabook/icons/bb-video.png");
float: right;
margin-top: 2px;}
.article { background-position: -50px 0px;}
.audio { background-position: -70px 0px;}
@ -1243,7 +1271,7 @@ border-bottom: 1px solid #D2D2D2;
}
.comment-edit-preview {
width: 710px;
width: 660px;
border: 1px solid #2d2d2d;
margin-top: 10px;
}
@ -1307,6 +1335,10 @@ border-bottom: 1px solid #D2D2D2;
height: 100px;
}
#jot-preview-content {
padding-top: 25px;
}
#jot-preview-content .tread-wrapper {
background-color: #fce94f;
}
@ -1698,10 +1730,15 @@ ul.tabs li {
/*ul.tabs li .active {
border-bottom: 1px solid #005c94;
}*/
ul.tabs a {
display: block;
float: left;
padding: 0px 10px 1px 10px;
}
ul.tabs a, #jot-preview-link, .comment-edit-submit-wrapper .fakelink {
/* padding: 0px 10px 1px 10px; */
padding: 0px 5px 1px 5px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
@ -1719,7 +1756,9 @@ ul.tabs a {
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ececf2',GradientType=0 );
background: linear-gradient(top, #ffffff 0%,#ececf2 100%);
}
ul.tabs li .active, ul.tabs a:hover {
ul.tabs li .active, ul.tabs a:hover, #jot-preview-link:hover, .comment-edit-submit-wrapper .fakelink:hover {
color: #fff;
text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
border: 1px solid #ececf2;


+ 5
- 3
view/theme/vier/theme.php View File

@ -12,7 +12,7 @@ $a->theme_info = array();
function vier_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
/*function insertFormatting(comment,BBcode,id) {
function insertFormatting(comment,BBcode,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == comment) {
@ -41,7 +41,7 @@ $a->page['htmlhead'] .= <<< EOT
}
return true;
}
*/
function showThread(id) {
$("#collapsed-comments-" + id).show()
@ -52,13 +52,15 @@ function hideThread(id) {
$("#collapsed-comments-" + id + " .collapsed-comments").hide()
}
/*
function cmtBbOpen(id) {
$("#comment-edit-bb-" + id).show();
}
function cmtBbClose(id) {
$("#comment-edit-bb-" + id).hide();
}
/*
$(document).ready(function() {
$('html').click(function() { $("#nav-notifications-menu" ).hide(); });


Loading…
Cancel
Save