[Redizajn 1KA] - Testiranje --> Komentarji - IF in BLOKI - v delu

Manjka še funkcionalnost add_comment na if/blok
This commit is contained in:
tejagerjovic 2022-06-07 00:38:23 +02:00
parent b41d6cdd98
commit ad12c4e4b6
3 changed files with 1521 additions and 1473 deletions

View File

@ -7589,39 +7589,44 @@ class SurveyAdminSettings {
echo '</p>';
}
echo '<div class="question_comment editor">';
// komentarji na vprasanje
if ($row1['thread'] > 0) {
if (mysqli_num_rows($sqlt) > 0) {
echo '<p class="red"><b>'.$lang['srv_admin_comment'].'</b>';
//$rowss = mysqli_num_rows($sql);
//if ($rowss > 0)
echo '<img src="img_0/'.($sortpostorder==1?'up':'down').'.gif" style="float:right" title="'.($sortpostorder==1?$lang['forum_desc']:$lang['forum_asc']).'" />';
echo '</p>';
echo '<div class="comment_type">';
echo $lang['srv_admin_comment'].':';
echo '</div>';
$i = 0;
while ($rowt = mysqli_fetch_array($sqlt)) {
if ($_GET['only_unresolved'] == 1) {
if ($rowt['ocena'] == 0) echo '<span style="color:black">';
elseif ($rowt['ocena'] == 1) echo '<span style="color:darkgreen">';
elseif ($rowt['ocena'] == 2) echo '<span style="color:#999999">';
elseif ($rowt['ocena'] == 3) echo '<span style="color:#999999">';
else echo '<span>';
} else {
if ($rowt['ocena'] == 0) echo '<span style="color:#990000">';
elseif ($rowt['ocena'] == 1) echo '<span style="color:darkgreen">';
elseif ($rowt['ocena'] == 2) echo '<span style="color:black">';
elseif ($rowt['ocena'] == 3) echo '<span style="color:black">';
else echo '<span>';
}
echo '<b>'.$f->user($rowt['uid']).'</b> ('.$f->datetime1($rowt['time']).'):';
echo '<div class="comment_box">';
echo '<div class="by">';
echo $lang['srv_comments_user'].'<span class="user">'.$f->user($rowt['uid']).'</span>'.$lang['srv_comments_user2'];
echo '</div>';
$datetime = strtotime($rowt['time']);
$datetime = date("d.m.Y G:i", $datetime);
echo '<div class="date">';
echo $f->datetime1($rowt['time']);
echo '</div>';
echo '<div class="content">';
echo $rowt['vsebina'];
echo '</div>';
echo '<div class="bottom_options">';
if ($admin_type <= 1 || $rowi['insert_uid']==$global_user_id || $commentmarks_who==0) {
echo '<div style="float:right; text-align:right">';
if ($commentmarks == 1) {
echo ' <select name="ocena" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: this.value, id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});">
<option value="0"'.($rowt['ocena']==0?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option>
@ -7630,30 +7635,61 @@ class SurveyAdminSettings {
<option value="3"'.($rowt['ocena']==3?' selected="selected"':'').'>'.$lang['srv_not_relevant'].'</option>
</select>';
} else {
echo '<input type="checkbox" name="ocena_'.$rowt['id'].'" id="ocena_'.$rowt['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: (this.checked?\'2\':\'0\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});" value="2" '.($rowt['ocena'] >= 2?' checked':'').' /><label for="ocena_'.$rowt['id'].'">'.$lang['srv_done'].'</label>';
}
echo ' <br /><a href="javascript:comment_on_comment(\''.$rowt['id'].'\');">'.$lang['srv_comment_comment'].'</a>';
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 $lang['srv_comments_archive'].'</p>';
echo '<div class="reply_to" onClick="$(\'#comment_toggle_'.$spr_id.'\').toggle();">';
echo '<a href="javascript:comment_on_comment(\''.$rowt['id'].'\',\''.$f->user($rowt['uid']).'\',\''.$f->datetime1($rowt['time']).'\',\''.$spr_id.'\');"><span class="faicon fa-reply link-right"></span>'.$lang['srv_comment_comment'].'</a>';
echo '</div>';
}
echo '<br/>'.$rowt['vsebina'].'<span id="comment_on_comment_'.$rowt['id'].'"></span><hr>';
echo '</span>';
else {
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>'; // .bottom_options
echo '</div>'; // comment_box
echo '<div class="reply_to_text" id="comment_on_comment_'.$spr_id.'">';
echo '</div>';
}
}
}
if ($addfieldposition == '' || $addfieldposition == 0) {
echo '<div id="survey_comment_'.$spr_id.'_'.'4'.'" style="display:none"></div>';
echo '<p><a href="#" onclick="$(\'#comment_field_'.$spr_id.'\').toggle(); return false;">'.$lang['srv_comments_add_comment'].'</a></p>';
echo '<p id="comment_field_'.$spr_id.'" style="display:none">';
echo '<div id="comment_toggle_'.$spr_id.'" class="add_comment_toggle blue pointer" onClick="toggleAddComment(\''.$spr_id.'\')">';
echo '<span class="faicon link-right comments"></span>';
echo $lang['srv_add_comment_toggle'];
echo '</div>';
echo '<div class="comment_wrapper" id="comment_wrapper_'.$spr_id.'">';
echo '<div class="new_comment" id="survey_comment_'.$spr_id.'">';
$ba = new BranchingAjax($this->anketa);
$ba->add_comment_field($spr_id, '1', '4', false);
echo '</p>';
echo '</div>';
echo '</div>';
}
echo '</div>'; #editor
echo '<div class="question_comment resp">'; //prazen, respondenti ne komentirajo na IFe in bloke
echo '</div>';
echo '</div>';
echo '</div>'; #question_comment_holder
}
}
// Gre za navadno vprasanje

File diff suppressed because it is too large Load Diff

View File

@ -505,6 +505,14 @@ div#div_condition_editing {
}
}
//Izbira spremenljivke pri kalkulaciji
div.column.variable {
select {
margin-left: 8px !important;
}
}
//////ANALIZA//////
//Zoom