[Redizajn 1KA v2] Testiranje --> Komentarji - urejanje inline - popup za prikaz komentarjev - v delu
This commit is contained in:
parent
01e2b9e50a
commit
e993da1d79
@ -6172,14 +6172,43 @@ class Branching {
|
||||
|
||||
// Poglej komentarje
|
||||
if ($admin_type <= $question_comment_viewadminonly || $question_comment_viewauthor==1) {
|
||||
echo '<a href="#" id="surveycomment_'.$spremenljivka.'_1" class="surveycomment noline" type="1" subtype="q_admin_all" spremenljivka="'.$spremenljivka.'" view="1" onclick="return false;" title="'.$lang['srv_question_comments'].'">';
|
||||
echo '<div onClick="toggleCommentPopupInline(2); return false;" id="surveycomment_'.$spremenljivka.'_1" class="surveycomment noline" type="1" subtype="q_admin_all" spremenljivka="'.$spremenljivka.'" view="1" title="'.$lang['srv_question_comments'].'">';
|
||||
echo ' <button class="small-rounded white-gray" id="comment_add_'.$spremenljivka.'"'.($row['count']== 0 ? ' style="display:none;"' : '').'>';
|
||||
echo ' <span class="faicon inline_double_comment"></span> ';
|
||||
echo $lang['srv_view_comment'].($row['count'] > 0 ? ' ('.$row['count'].')':'');
|
||||
echo $lang['srv_admin_comment'].($row['count'] > 0 ? ' ('.$row['count'].')':'');
|
||||
echo ' </button>';
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<script> $(function() { load_comment(\'#surveycomment_'.$spremenljivka.'_1\'); }); </script>';
|
||||
echo '<div class="comment_inline_popup displayNone" id="comment_inline_editor">';
|
||||
|
||||
echo '<div class="comment_inline_top">';
|
||||
echo '<div class="title">';
|
||||
echo '<span class="faicon fa-comment"></span>';
|
||||
echo $lang['srv_admin_comment'];
|
||||
echo '</div>';
|
||||
echo '<span class="gray" onClick="toggleCommentPopupInline(2); return false;">✕</span>';
|
||||
echo '</div>';
|
||||
|
||||
echo 'TODO: load editor commments';
|
||||
|
||||
echo '<div class="button_holder">';
|
||||
echo '<button class="small blue" onclick="toggleCommentPopupInline(2); return false;">'.$lang['srv_zapri'].'</button>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>'; //comment_inline_popup
|
||||
|
||||
// Klik izven - zapremo popup
|
||||
echo '<script>
|
||||
$(document).mouseup(function(e){
|
||||
var container = $("#comment_inline_editor");
|
||||
|
||||
if (!container.is(e.target) && container.has(e.target).length === 0){
|
||||
$("#comment_inline_editor").addClass("displayNone");
|
||||
}
|
||||
});
|
||||
</script>';
|
||||
|
||||
//echo '<script> $(function() { load_comment(\'#surveycomment_'.$spremenljivka.'_1\'); }); </script>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -6190,14 +6219,44 @@ class Branching {
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
||||
if ($row['count'] > 0) {
|
||||
echo '<a href="#" id="surveycomment_'.$spremenljivka.'_2" class="surveycomment noline" type="2" subtype="q_resp_all" spremenljivka="'.$spremenljivka.'" onclick="return false;">';
|
||||
echo '<div onClick="toggleCommentPopupInline(3); return false;" id="surveycomment_'.$spremenljivka.'_2" class="surveycomment noline" type="2" subtype="q_resp_all" spremenljivka="'.$spremenljivka.'">';
|
||||
echo ' <button class="small-rounded white-gray">';
|
||||
echo ' <span class="faicon inline_comment icon-orange"></span> ';
|
||||
echo $lang['srv_repondent_comment'].' ('.$row['count'].')';
|
||||
echo ' </button>';
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<script> $(function() { load_comment(\'#surveycomment_'.$spremenljivka.'_2\'); }); </script>';
|
||||
echo '<div class="comment_inline_popup displayNone" id="comment_inline_respondent">';
|
||||
|
||||
echo '<div class="comment_inline_top">';
|
||||
echo '<div class="title">';
|
||||
echo '<span class="faicon fa-comment"></span>';
|
||||
echo $lang['srv_repondent_comment'];
|
||||
echo '</div>';
|
||||
echo '<span class="gray" onClick="toggleCommentPopupInline(3); return false;">✕</span>';
|
||||
echo '</div>';
|
||||
|
||||
echo 'TODO: load respondent commments';
|
||||
|
||||
echo '<div class="button_holder">';
|
||||
echo '<button class="small blue" onclick="toggleCommentPopupInline(3); return false;">'.$lang['srv_zapri'].'</button>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>'; //comment_inline_popup
|
||||
|
||||
// Klik izven - zapremo popup
|
||||
echo '<script>
|
||||
$(document).mouseup(function(e){
|
||||
var container = $("#comment_inline_respondent");
|
||||
|
||||
if (!container.is(e.target) && container.has(e.target).length === 0){
|
||||
$("#comment_inline_respondent").addClass("displayNone");
|
||||
}
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
||||
//echo '<script> $(function() { load_comment(\'#surveycomment_'.$spremenljivka.'_2\'); }); </script>';
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
|
@ -5723,6 +5723,11 @@ function toggleCommentDropdownTestSurvey () {
|
||||
|
||||
function toggleCommentPopupInline ($type) {
|
||||
|
||||
if ($type==3) // komentarji respondentov
|
||||
$("#comment_inline_respondent").toggleClass('displayNone');
|
||||
if ($type==2) // komentarji urednikov
|
||||
$("#comment_inline_editor").toggleClass('displayNone');
|
||||
if ($type==1) // dodaj komentar
|
||||
$("#comment_inline_add").toggleClass('displayNone');
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user