[Redizajn 1KA] - Testiranje --> Komentarji - archive/unarchive opcije

This commit is contained in:
tejagerjovic 2022-04-29 04:14:11 +02:00
parent 885c00642a
commit 8a229cec0a
5 changed files with 62 additions and 41 deletions

View File

@ -7053,7 +7053,7 @@ class SurveyAdminSettings {
echo '</div>'; echo '</div>';
echo '<div>'; echo '<div class="bottom_options">';
if ($commentmarks == 1) { if ($commentmarks == 1) {
echo ' <select name="ocena'.$row['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: this.value, id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});"> echo ' <select name="ocena'.$row['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: this.value, id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});">
<option value="0"'.($row['ocena']==0?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option> <option value="0"'.($row['ocena']==0?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option>
@ -7072,6 +7072,8 @@ class SurveyAdminSettings {
} }
else { else {
echo '<p class="archived_comment"><span class="faicon arhiv link-right"></span>'.$lang['srv_comments_archived'].'</p>'; echo '<p class="archived_comment"><span class="faicon arhiv link-right"></span>'.$lang['srv_comments_archived'].'</p>';
echo '<p class="unarchive_comment" onclick="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: (\'0\'), id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});"> <span class="faicon inv_sent_0 empty link-right"></span>';
echo $lang['srv_comments_unarchive'].'</p>';
} }
} }
echo '</div>'; echo '</div>';
@ -7127,26 +7129,24 @@ class SurveyAdminSettings {
elseif ($row['ocena'] == 3) echo '<span style="color:#999999">'; elseif ($row['ocena'] == 3) echo '<span style="color:#999999">';
else echo '<span>';*/ else echo '<span>';*/
echo '<div class="by">';
echo 'Respondent '.$lang['srv_comments_user2'];
echo '</div>';
$datetime = strtotime($row['comment_time']); $datetime = strtotime($row['comment_time']);
$datetime = date("d.m.Y G:i", $datetime); $datetime = date("d.m.Y G:i", $datetime);
if($row['usr_id'] == 0){ if($row['usr_id'] == 0){
$user = $lang['guest']; echo '<div class="by">';
echo 'Respondent '.$lang['srv_comments_user2'];
echo '</div>';
} }
else{ else{
$sqlU = sisplet_query("SELECT name FROM users WHERE id='$row[usr_id]'"); $sqlU = sisplet_query("SELECT name FROM users WHERE id='$row[usr_id]'");
$rowU = mysqli_fetch_array($sqlU); $rowU = mysqli_fetch_array($sqlU);
$user = $rowU['name']; $user = $rowU['name'];
}
echo '<div class="by">'; echo '<div class="by">';
echo $lang['srv_comments_user'].'<span class="user">'.$user.'</span>'.$lang['srv_comments_user2']; echo $lang['srv_comments_user'].'<span class="user">'.$user.'</span>'.$lang['srv_comments_user2'];
echo '</div>'; echo '</div>';
}
echo '<div class="date">'; echo '<div class="date">';
echo $datetime; echo $datetime;
@ -7157,7 +7157,7 @@ class SurveyAdminSettings {
echo '</div>'; echo '</div>';
echo '<div>'; echo '<div class="bottom_options">';
if ($commentmarks == 1) { if ($commentmarks == 1) {
echo ' <select name="ocena'.$row['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_survey_comment\', ocena: this.value, id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});"> echo ' <select name="ocena'.$row['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_survey_comment\', ocena: this.value, id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});">
<option value="0"'.($row['ocena']==0?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option> <option value="0"'.($row['ocena']==0?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option>
@ -7171,14 +7171,13 @@ class SurveyAdminSettings {
echo '<label for="ocena_'.$row['id'].'">'.$lang['srv_done'].'</label>'; */ echo '<label for="ocena_'.$row['id'].'">'.$lang['srv_done'].'</label>'; */
if ($row['ocena']==0) { if ($row['ocena']==0) {
echo $rowa['id']; echo '<p class="archive_comment" onclick="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_survey_comment\', ocena: (\'2\'), id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});"> <span class="faicon arhiv link-right"></span>';
echo $row['id'];
echo 'test2';
echo '<p class="archive_comment" onclick="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_survey_comment\', ocena: (\'2\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});"> <span class="faicon arhiv link-right"></span>';
echo $lang['srv_comments_archive'].'</p>'; echo $lang['srv_comments_archive'].'</p>';
} }
else { else {
echo '<p class="archived_comment"><span class="faicon arhiv link-right"></span>'.$lang['srv_comments_archived'].'</p>'; echo '<p class="archived_comment"><span class="faicon arhiv link-right"></span>'.$lang['srv_comments_archived'].'</p>';
echo '<p class="unarchive_comment" onclick="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_survey_comment\', ocena: (\'0\'), id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});"> <span class="faicon inv_sent_0 empty link-right"></span>';
echo $lang['srv_comments_unarchive'].'</p>';
} }
} }
echo '</div>'; echo '</div>';
@ -7206,7 +7205,7 @@ class SurveyAdminSettings {
echo '<div class="comment_wrapper" id="comment_wrapper_0_5">'; echo '<div class="comment_wrapper" id="comment_wrapper_0_5">';
echo '<div class="new_comment" id="survey_comment_0_5">'; echo '<div class="new_comment" id="survey_comment_0_5">';
$ba = new BranchingAjax($this->anketa); $ba = new BranchingAjax($this->anketa);
$ba->add_comment_field(0, '1', '5', false); $ba->add_comment_field(0, '4', '5', false);
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
@ -7819,19 +7818,21 @@ class SurveyAdminSettings {
</select>'; </select>';
} else { } else {
if ($row['ocena']==0) { if ($rowt['ocena']==0) {
echo '<p class="archive_comment" onclick="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: (\'2\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});"> <span class="faicon arhiv link-right"></span>'; echo '<p class="archive_comment" onclick="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: (\'2\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});"> <span class="faicon arhiv link-right"></span>';
echo $lang['srv_comments_archive'].'</p>'; echo $lang['srv_comments_archive'].'</p>';
echo '<div class="reply_to" onClick="$(\'#comment_toggle_'.$spr_id.'_4\').toggle();">';
echo '<a href="javascript:comment_on_comment(\''.$rowt['id'].'\',\''.$f->user($rowt['uid']).'\',\''.$datetime.'\',\''.$spr_id.'\');"><span class="faicon fa-reply link-right"></span>'.$lang['srv_comment_comment'].'</a>';
echo '</div>';
} }
else { else {
echo '<p class="archived_comment"><span class="faicon arhiv link-right"></span>'.$lang['srv_comments_archived'].'</p>'; echo '<p class="archived_comment"><span class="faicon arhiv link-right"></span>'.$lang['srv_comments_archived'].'</p>';
echo '<p class="unarchive_comment" onclick="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: (\'0\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});"> <span class="faicon inv_sent_0 empty link-right"></span>';
echo $lang['srv_comments_unarchive'].'</p>';
} }
} }
echo '<div class="reply_to" onClick="$(\'#comment_toggle_'.$spr_id.'_4\').toggle();">';
echo '<a href="javascript:comment_on_comment(\''.$rowt['id'].'\',\''.$f->user($rowt['uid']).'\',\''.$datetime.'\',\''.$spr_id.'\');"><span class="faicon fa-reply link-right"></span>'.$lang['srv_comment_comment'].'</a>';
echo '</div>';
echo '</div>'; echo '</div>';
} }
@ -7946,12 +7947,14 @@ class SurveyAdminSettings {
</select>'; </select>';
} else { } else {
if ($row['text2']==0) { if ($rowt['text2']==0) {
echo '<p class="archive_comment" onclick="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_comment\', text2: (\'2\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});"> <span class="faicon arhiv link-right"></span>'; echo '<p class="archive_comment" onclick="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_comment\', text2: (\'2\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});"> <span class="faicon arhiv link-right"></span>';
echo $lang['srv_comments_archive'].'</p>'; echo $lang['srv_comments_archive'].'</p>';
} }
else { else {
echo '<p class="archived_comment"><span class="faicon arhiv link-right"></span>'.$lang['srv_comments_archived'].'</p>'; echo '<p class="archived_comment"><span class="faicon arhiv link-right"></span>'.$lang['srv_comments_archived'].'</p>';
echo '<p class="unarchive_comment" onclick="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_comment\', text2: (\'0\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});"> <span class="faicon inv_sent_0 empty link-right"></span>';
echo $lang['srv_comments_unarchive'].'</p>';
} }
} }
echo '</div>'; echo '</div>';

View File

@ -4530,6 +4530,7 @@ $lang = array (
"srv_comments_user" => "Uporabnik ", "srv_comments_user" => "Uporabnik ",
"srv_comments_user2" => " je komentiral:", "srv_comments_user2" => " je komentiral:",
"srv_comments_archive" => "Arhiviraj komentar", "srv_comments_archive" => "Arhiviraj komentar",
"srv_comments_unarchive" => "Označi kot nerešeno",
"srv_comments_archived" => "Komentar je arhiviran", "srv_comments_archived" => "Komentar je arhiviran",
"srv_comments_new" => "Komentiraj", "srv_comments_new" => "Komentiraj",
"srv_zanka_profile_all" => "Brez", "srv_zanka_profile_all" => "Brez",

View File

@ -4505,6 +4505,7 @@ $lang = array (
"srv_comments_user" => "User ", "srv_comments_user" => "User ",
"srv_comments_user2" => " commented:", "srv_comments_user2" => " commented:",
"srv_comments_archive" => "Archive comment", "srv_comments_archive" => "Archive comment",
"srv_comments_unarchive" => "Unarchive",
"srv_comments_archived" => "Comment has already been archived", "srv_comments_archived" => "Comment has already been archived",
"srv_comments_new" => "Comment", "srv_comments_new" => "Comment",
"srv_zanka_profile_all" => "Without", "srv_zanka_profile_all" => "Without",

View File

@ -21887,16 +21887,24 @@ div.page_komentarji div.komentarji_anketa_holder div.komentarji_anketa fieldset
div.page_komentarji_anketa div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .content { div.page_komentarji_anketa div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .content {
margin: 16px 0; margin: 16px 0;
} }
div.page_komentarji div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .archive_comment, div.page_komentarji div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .bottom_options,
div.page_komentarji_anketa div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .archive_comment { div.page_komentarji_anketa div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .bottom_options {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 16px; margin-bottom: 16px;
}
div.page_komentarji div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .bottom_options .archive_comment,
div.page_komentarji div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .bottom_options .unarchive_comment,
div.page_komentarji_anketa div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .bottom_options .archive_comment,
div.page_komentarji_anketa div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .bottom_options .unarchive_comment {
cursor: pointer; cursor: pointer;
color: #1E88E5; color: #1E88E5;
transition: 0.2s; transition: 0.2s;
} }
div.page_komentarji div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .archived_comment, div.page_komentarji div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .bottom_options .archived_comment,
div.page_komentarji_anketa div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .archived_comment { div.page_komentarji_anketa div.komentarji_anketa_holder div.komentarji_anketa fieldset div.comment_box .bottom_options .archived_comment {
margin-bottom: 16px;
color: #808080; color: #808080;
} }
div.page_komentarji div.komentarji_anketa_holder div.komentarji_anketa fieldset div.add_comment_toggle, div.page_komentarji div.komentarji_anketa_holder div.komentarji_anketa fieldset div.add_comment_toggle,
@ -21988,14 +21996,15 @@ div.page_komentarji_anketa ul div.question_comment_holder div.question_comment d
margin-bottom: 16px; margin-bottom: 16px;
} }
div.page_komentarji ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .archive_comment, div.page_komentarji ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .archive_comment,
div.page_komentarji_anketa ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .archive_comment { div.page_komentarji ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .unarchive_comment,
div.page_komentarji_anketa ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .archive_comment,
div.page_komentarji_anketa ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .unarchive_comment {
cursor: pointer; cursor: pointer;
color: #1E88E5; color: #1E88E5;
transition: 0.2s; transition: 0.2s;
} }
div.page_komentarji ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .archived_comment, div.page_komentarji ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .archived_comment,
div.page_komentarji_anketa ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .archived_comment { div.page_komentarji_anketa ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .archived_comment {
margin-bottom: 16px;
color: #808080; color: #808080;
} }
div.page_komentarji ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .reply_to a, div.page_komentarji ul div.question_comment_holder div.question_comment div.comment_box .bottom_options .reply_to a,

View File

@ -76,21 +76,28 @@ div.page_komentarji_anketa {
margin: 16px 0; margin: 16px 0;
} }
.archive_comment { .bottom_options {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 16px; margin-bottom: 16px;
cursor: pointer; .archive_comment,
color: $blue; .unarchive_comment {
transition: 0.2s; cursor: pointer;
&:hover { color: $blue;
$color: darken ($blue, 3%);
transition: 0.2s;
&:hover {
$color: darken ($blue, 3%);
}
} }
}
.archived_comment { .archived_comment {
margin-bottom: 16px; color: $very-dark-gray2
color: $very-dark-gray2 }
} }
} }
@ -184,7 +191,8 @@ div.page_komentarji_anketa {
align-items: center; align-items: center;
margin-bottom: 16px; margin-bottom: 16px;
.archive_comment { .archive_comment,
.unarchive_comment {
cursor: pointer; cursor: pointer;
color: $blue; color: $blue;
@ -195,7 +203,6 @@ div.page_komentarji_anketa {
} }
.archived_comment { .archived_comment {
margin-bottom: 16px;
color: $very-dark-gray2 color: $very-dark-gray2
} }