[Redizajn 1KA v2] Testiranje --> Komentarji - novo okno v testiranju ankete - v delu

This commit is contained in:
tejagerjovic 2022-09-08 07:12:53 +02:00
parent 70137bf9c8
commit c961bce07a
2 changed files with 202 additions and 10 deletions

View File

@ -2350,7 +2350,7 @@ class BodyController extends Controller
$_GET['testdata'] == 'on')
) {
echo '<span class="stngs floatLeft">';
echo '<span id="test_comments" class="stngs floatLeft">';
$show_survey_comment = $_GET['show_survey_comment'];
if ($row['forum'] == 0 || $row['thread'] == 0) {
@ -2364,7 +2364,7 @@ class BodyController extends Controller
$rowf = mysqli_fetch_array($sqlf);
$rowf['count']--; //zaradi 1. avtomatskega posta
echo '<a href="#" onclick="return false;" class="surveycomment bold" id="surveycomment_0_' . $view . '" type="0" view="' . $view . '" spremenljivka="0">';
echo '<span class="blue bold" id="surveycomment_0_' . $view . '" type="0" view="' . $view . '" spremenljivka="0">';
echo self::$lang['srv_comment_splosen'] . ' ';
echo '<span class="faicon comment" title="' . self::$lang['srv_survey_comment'] . '" alt="' . self::$lang['srv_survey_comment'] . '"></span>';
@ -2375,15 +2375,65 @@ class BodyController extends Controller
if (mysqli_num_rows($s) == 0)
$show_survey_comment = 1;
}
echo '</a>';
echo '</span>';
//dropdown na klik ikone
echo '<div id="comment_dropdown" class="displayNone">';
echo '<div class="title">';
echo '<span class="faicon comment_dropdown"></span>';
echo $lang['comments'];
echo '</div>';
$comment_link = 'window.location.href=\'' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=komentarji\'; return false;';
echo '<div class="links" onclick="'.$comment_link.'">';
echo $lang['srv_testiranje_komentarji_anketa_title'];
echo ' (' . $comment_count['question']['unresolved'];
echo '/' . $comment_count['question']['all'] . ')';
echo '<span class="faicon fa-angle-right"></span>';
echo '</div>';
$comment_link = 'window.location.href=\'' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=komentarji_anketa\'; return false;';
echo '<div class="links" onclick="'.$comment_link.'">';
echo $lang['srv_testiranje_komentarji_title'];
echo ' (' . ($comment_count['survey_resp']['unresolved'] + $comment_count['survey_admin']['unresolved']); //nerešeni
echo '/' . ($comment_count['survey_resp']['all'] + $comment_count['survey_admin']['all']) . ')'; //vsi
echo '<span class="faicon fa-angle-right"></span>';
echo '</div>';
echo '<div id="survey_comment_0_1">';
$ba = new BranchingAjax($this->anketa);
$ba->add_comment_field(0, '0', '1', false, false);
echo '</div>';
echo '<div class="button_holder">';
echo ' <button class="small blue" onclick="toggleCommentDropdown(); return false;">'.$lang['srv_zapri'].'</button>';
echo '<div class="options">';
echo '<div class="square" onclick="toggleCommentDropdown(); return false;">';
echo '<span class="faicon fa-times"></span>';
echo '</div>';
echo '<div class="square blue" onclick="add_comment(\'0\', \'0\', \'1\', $(\'#vsebina_0_1\').val()); return false;">';
echo '<span class="faicon fa-paper-plane"></span>';
echo '</div>';
echo '</div>';
echo '</div>'; //button holder
echo '</div>'; //comment_dropdown
// Klik izven - zapremo dropdown
echo '<script>
$(document).mouseup(function(e){
var container = $("#comment_dropdown");
if (!container.is(e.target) && container.has(e.target).length === 0){
$("#comment_dropdown").addClass("displayNone");
}
});
</script>';
}
echo '<script type="text/javascript" src="' . self::$site_url . '/admin/survey/script/js-lang.php?lang='.self::$lang['lang_short'].'&amp;v=13.06.07"></script>';
// Ce je tole vklopljeno se js porusi?
//echo '<script type="text/javascript" src="'.self::$site_url.'/admin/survey/minify/g=jsnew?v=13.06.07"></script>';
echo '<script type="text/javascript" src="' . self::$site_url . '/admin/survey/script/jquery/jquery.qtip-1.0.js"></script>';
echo '<script type="text/javascript" src="' . self::$site_url . '/admin/survey/script/script.js"></script>';
echo '<script> $(function() { load_comment(\'#surveycomment_0_' . $view . '\'' . ($show_survey_comment == '1' ? ', \'2\'' : '') . '); });</script>';
echo '</span>';
}
@ -2417,7 +2467,7 @@ class BodyController extends Controller
$sqlf = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread_resp]'");
$rowf = mysqli_fetch_array($sqlf);
$rowf['count']--; //zaradi 1. avtomatskega posta
echo '<a href="#" onclick="return false;" class="surveycomment bold" id="surveycomment_0_' . $view . '" type="4" view="' . $view . '" spremenljivka="0">';
echo '<span onclick="return false;" class="surveycomment bold" id="surveycomment_0_' . $view . '" type="4" view="' . $view . '" spremenljivka="0">';
echo self::$lang['srv_comment_splosen'] . ' ';
echo '<span class="faicon comment" title="' . self::$lang['srv_survey_comment'] . '" alt="' . self::$lang['srv_survey_comment'] . '"></span>';

View File

@ -876,6 +876,148 @@ div.page_komentarji_anketa {
}
}
}
span#test_comments {
position: relative;
#comment_dropdown {
position: absolute;
background-color: $white;
top: 35px;
right: 0;
width: 305px;
z-index: 9999;
box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.12);
border-radius: 2px;
font-family: $font_family;
padding: 12px;
cursor: auto !important;
.title {
width: 100%;
margin-bottom: 16px;
padding-bottom: 12px;
font-weight: 600;
font-size: 16px;
text-transform: uppercase;
border-bottom: 1px $gray solid;
font-size: 14px !important;
color: $black;
display: flex;
flex-direction: row;
align-content: center;
span.faicon.comment_dropdown {
margin-right: 6px;
line-height: 17px !important;
&::before{
color: $blue !important;
font-weight: 400;
font-size: 14px !important;
content: "\f27a";
}
}
}
.links {
margin-bottom: 16px;
color: $blue;
font-weight: 400;
font-size: 14px !important;
display: flex;
flex-direction: row;
align-content: center;
cursor: pointer;
width: fit-content;
span.faicon {
margin-left: 8px;
line-height: 17px !important;
&::before{
color: $blue !important;
font-size: 14px !important;
}
}
}
#comment_field {
padding-top: 16px;
border-top: 1px solid $gray;
margin-bottom: 10px;
textarea {
height: 130px;
width: 100%;
margin: 0;
}
}
.button_holder {
display: flex;
flex-direction: row;
justify-content: space-between;
padding-top: 8px;
border-top: 1px solid $gray;
margin-bottom: 0;
button {
min-width: 128px;
}
.options {
display: flex;
flex-direction: row;
.square {
box-sizing: border-box;
border: 1px solid $blue;
width: 28px;
height: 28px;
margin-left: 8px;
display: flex;
justify-content: center;
align-content: center;
color: $blue;
font-size: 14px !important;
cursor: pointer;
&.blue {
background-color: $blue;
span.faicon::before {
font-size: 14px !important;
color: $white;
}
}
span.faicon::before {
$font_weight: 400;
font-size: 16px !important;
}
}
}
}
}
}
#quick_comments_link.newCss {
text-align: center;