[Redizajn 1KA v2] Testiranje --> Komentarji - odstanjen 3rd nav row, hover v urejanju vprašalnika, brisanje OK

This commit is contained in:
tejagerjovic 2022-08-26 10:42:16 +02:00
parent 0e1991e418
commit 5790520931
7 changed files with 45 additions and 16 deletions

View File

@ -4919,7 +4919,11 @@ class SurveyAdminAjax {
} elseif ($_GET['a'] == 'comment_delete') {
$id = $_POST['id'];
$sql = sisplet_query("DELETE FROM post WHERE id='$id'");
if (isset($_POST['id']) && $_POST['id'] != "" && $_POST['id'] > 0) {
$id = $_POST['id'];
$sql = sisplet_query("DELETE FROM post WHERE id='$id'");
//$sql = sisplet_query("DELETE FROM post WHERE parent='$id'"); Ker so odgovori v bistvu appendani v vsebino osnovnega komentarja.
}
} elseif ($_GET['a'] == 'archivePopup') {
echo '<div class="survey_archive_popup">';

View File

@ -6746,7 +6746,7 @@ class SurveyAdminSettings {
return $txt;
}
function menu_komentarji () {
public function menu_komentarji () {
global $lang;
// Prestejemo komentarje (nereseni/vsi)
@ -6754,12 +6754,12 @@ class SurveyAdminSettings {
$comment_count = $sas->testiranje_komentarji_count();
echo '<div id="additional_navigation">';
echo '<div id="menu">';
echo '<div id="komentarji_menu">';
// Komentarji na vprasanja
echo '<span '.($_GET['a'] == A_KOMENTARJI_ANKETA ? 'class="active"' : '').'>';
echo '<a href="index.php?anketa=' . $this->sid . '&amp;a=' . A_KOMENTARJI_ANKETA . '" title="' . $lang['srv_testiranje_komentarji_anketa_title'] . '">';
echo '<a href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_KOMENTARJI_ANKETA . '" title="' . $lang['srv_testiranje_komentarji_anketa_title'] . '">';
echo $lang['srv_testiranje_komentarji_anketa_title'];
echo '</a>';
@ -6778,7 +6778,7 @@ class SurveyAdminSettings {
// Komentarji na anketo
echo '<span '.($_GET['a'] == A_KOMENTARJI ? ' class="active"' : '').'>';
echo '<a href="index.php?anketa=' . $this->sid . '&amp;a=' . A_KOMENTARJI . '" title="' . $lang['srv_testiranje_komentarji_title'] . '">';
echo '<a href="index.php?anketa=' . $this->anketa . '&amp;a=' . A_KOMENTARJI . '" title="' . $lang['srv_testiranje_komentarji_title'] . '">';
echo $lang['srv_testiranje_komentarji_title'];
echo '</a>';
@ -7730,7 +7730,7 @@ class SurveyAdminSettings {
while ($rowt = mysqli_fetch_array($sqlt)) {
echo '<div class="comment_box '.($rowt['ocena']==0 ? '' : 'archived').'">';
echo '<div class="comment_box '.($rowt['ocena']==0 ? '' : 'archived').'" id="comment_box_'.$rowt['id'].'">';
echo '<div class="by">';

View File

@ -295,6 +295,11 @@ class SurveyStaticHtml
return;
}
//V komentarjih ni tega menija
if($podstran == "komentarji" || $podstran == "komentarji_anketa") {
return;
}
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
$userAccess = UserAccess::getInstance($global_user_id);

View File

@ -763,7 +763,11 @@ function comment_on_comment (id, user, date, spr_id) {
}
function comment_delete (id) {
$.post("ajax.php?a=comment_delete\', {id: \''+id+'\', anketa: srv_meta_anketa_id}");
$.post("ajax.php?a=comment_delete", {id: id, anketa: srv_meta_anketa_id}, function(){
$(".options_dropdown").addClass("displayNone");
$("#comment_box_"+id).remove();
});
}

View File

@ -14969,10 +14969,18 @@ div.spr,
color: #333333;
}
li.spr:hover .spr_edit,
li.spr:hover a.surveycomment,
div.spr:hover .spr_edit,
.jezik_row:hover .spr_edit {
div.spr:hover a.surveycomment,
.jezik_row:hover .spr_edit,
.jezik_row:hover a.surveycomment {
display: block;
}
li.spr a.surveycomment,
div.spr a.surveycomment,
.jezik_row a.surveycomment {
display: none;
}
li.spr .spr_edit,
div.spr .spr_edit,
.jezik_row .spr_edit {
@ -15554,7 +15562,9 @@ div.spr .spremenljivka_content .comment_container_inline button,
}
li.spr_editing .spr_edit,
div.spr_editing .spr_edit {
li.spr_editing a.surveycomment,
div.spr_editing .spr_edit,
div.spr_editing a.surveycomment {
display: block;
}
li.spr_editing span.display_editor,
@ -24990,8 +25000,8 @@ div.page_komentarji_anketa #additional_navigation {
display: flex;
justify-content: center;
}
div.page_komentarji #additional_navigation #menu,
div.page_komentarji_anketa #additional_navigation #menu {
div.page_komentarji #additional_navigation #komentarji_menu,
div.page_komentarji_anketa #additional_navigation #komentarji_menu {
width: fit-content;
}
div.page_komentarji div#comment_question_note,

View File

@ -10,11 +10,16 @@ div.spr,
color: $black;
&:hover {
.spr_edit {
.spr_edit,
a.surveycomment {
display: block;
}
}
a.surveycomment {
display: none;
}
// Nastavitve v naslovu vprasanja ki se prikazejo na hover
.spr_edit{
@ -468,7 +473,8 @@ div.spr,
li.spr_editing,
div.spr_editing{
.spr_edit {
.spr_edit,
a.surveycomment {
display: block;
}

View File

@ -6,7 +6,7 @@ div.page_komentarji_anketa {
display: flex;
justify-content: center;
#menu {
#komentarji_menu {
width: fit-content;
}
}