[Redizajn 1KA v2] Testiranje --> Komentarji - urejanje inline - dodaj komentar

This commit is contained in:
tejagerjovic 2022-09-15 08:57:02 +02:00
parent 1f191833a7
commit 01e2b9e50a
5 changed files with 180 additions and 161 deletions

View File

@ -6113,14 +6113,47 @@ class Branching {
if ($admin_type <= $question_comment && $question_comment != '') { if ($admin_type <= $question_comment && $question_comment != '') {
// Dodaj komentar // Dodaj komentar
echo '<a href="#" id="surveycomment_'.$spremenljivka.'_0" class="surveycomment noline" type="1" subtype="q_admin_add" spremenljivka="'.$spremenljivka.'" view="0" onclick="return false;" title="'.$lang['srv_question_comment'].'">'; echo '<div onClick="toggleCommentPopupInline(1); return false;" id="surveycomment_'.$spremenljivka.'_0" class="surveycomment noline" type="1" subtype="q_admin_add" spremenljivka="'.$spremenljivka.'" view="0" title="'.$lang['srv_question_comment'].'">';
echo ' <button class="small-rounded white-gray">'; echo ' <button class="small-rounded white-gray">';
echo ' <span class="faicon inline_comment"></span> '; echo ' <span class="faicon inline_comment"></span> ';
echo $lang['srv_add_comment']; echo $lang['srv_add_comment'];
echo ' </button>'; echo ' </button>';
echo '</a>'; echo '</div>';
echo '<script> $(function() { load_comment(\'#surveycomment_'.$spremenljivka.'_0\'); }); </script>'; echo '<div class="comment_inline_popup displayNone" id="comment_inline_add">';
echo '<div class="comment_inline_top">';
echo '<div class="title">';
echo '<span class="faicon fa-comment"></span>';
echo $lang['srv_add_comment'];
echo '</div>';
echo '<span class="gray" onClick="toggleCommentPopupInline(1); return false;">✕</span>';
echo '</div>';
echo '<div class="first_holder_div" id="survey_comment_'.$spremenljivka.'_0">';
$ba = new BranchingAjax($this->anketa);
$ba->add_comment_field($spremenljivka, '1', '0', false, false);
echo '</div>';
echo '<div class="button_holder">';
echo '<button class="small white-blue" onclick="toggleCommentPopupInline(1); return false;">'.$lang['edit1338'].'</button>';
echo '<button class="small blue" onclick="add_comment(\''.$spremenljivka.'\', \'1\', \'0\', $(\'#vsebina_'.$spremenljivka.'_0\').val()); actionNotePopup(\'comment_added\', \'success\'); return false;">'.$lang['srv_comments_new'].'</button>';
echo '</div>';
echo '</div>'; //comment_inline_popup
// Klik izven - zapremo popup
echo '<script>
$(document).mouseup(function(e){
var container = $("#comment_inline_add");
if (!container.is(e.target) && container.has(e.target).length === 0){
$("#comment_inline_add").addClass("displayNone");
}
});
</script>';
//echo '<script> $(function() { load_comment(\'#surveycomment_'.$spremenljivka.'_0\'); }); </script>';
$row = Cache::srv_spremenljivka($spremenljivka); $row = Cache::srv_spremenljivka($spremenljivka);
if ($row['thread'] == 0) { if ($row['thread'] == 0) {

View File

@ -2159,8 +2159,7 @@ function add_comment (spremenljivka, type, view, vsebina) {
$('div#survey_comment_'+spremenljivka+'_'+view).load(siteurl+'ajax.php?t=branching&a=comment_manage', {type: type, view: view, spremenljivka: spremenljivka, vsebina: vsebina, anketa: srv_meta_anketa_id, refresh: '1'}, $('div#survey_comment_'+spremenljivka+'_'+view).load(siteurl+'ajax.php?t=branching&a=comment_manage', {type: type, view: view, spremenljivka: spremenljivka, vsebina: vsebina, anketa: srv_meta_anketa_id, refresh: '1'},
function () { function () {
if (view == 0) { if (view == 0) {
$('#surveycomment_'+spremenljivka+'_0').qtip("hide"); // pri opciji Dodaj komentar, skrijemo oblacek po submitu $("#comment_inline_add").toggleClass('displayNone'); // pri opciji Dodaj komentar, skrijemo oblacek po submitu
$('#comment_add_'+spremenljivka).show(); // pokazemo opcijo Poglej komentarje
} else if (view == 4 || view == 5) { } else if (view == 4 || view == 5) {
window.location.reload(); window.location.reload();
} }
@ -5720,4 +5719,10 @@ function toggleCommentDropdown () {
function toggleCommentDropdownTestSurvey () { function toggleCommentDropdownTestSurvey () {
$("#comment_dropdown_test_survey").toggleClass('displayNone'); $("#comment_dropdown_test_survey").toggleClass('displayNone');
$(".open_comment_box").toggleClass('active'); $(".open_comment_box").toggleClass('active');
}
function toggleCommentPopupInline ($type) {
if ($type==1) // dodaj komentar
$("#comment_inline_add").toggleClass('displayNone');
} }

View File

@ -15047,15 +15047,21 @@ div.spr,
} }
li.spr:hover .spr_edit, li.spr:hover .spr_edit,
li.spr:hover a.surveycomment, li.spr:hover a.surveycomment,
li.spr:hover div.surveycomment,
div.spr:hover .spr_edit, div.spr:hover .spr_edit,
div.spr:hover a.surveycomment, div.spr:hover a.surveycomment,
div.spr:hover div.surveycomment,
.jezik_row:hover .spr_edit, .jezik_row:hover .spr_edit,
.jezik_row:hover a.surveycomment { .jezik_row:hover a.surveycomment,
.jezik_row:hover div.surveycomment {
display: block; display: block;
} }
li.spr a.surveycomment, li.spr a.surveycomment,
li.spr div.surveycomment,
div.spr a.surveycomment, div.spr a.surveycomment,
.jezik_row a.surveycomment { div.spr div.surveycomment,
.jezik_row a.surveycomment,
.jezik_row div.surveycomment {
display: none; display: none;
} }
li.spr .spr_edit, li.spr .spr_edit,
@ -15640,8 +15646,10 @@ div.spr .spremenljivka_content .comment_container_inline button,
li.spr_editing .spr_edit, li.spr_editing .spr_edit,
li.spr_editing a.surveycomment, li.spr_editing a.surveycomment,
li.spr_editing div.surveycomment,
div.spr_editing .spr_edit, div.spr_editing .spr_edit,
div.spr_editing a.surveycomment { div.spr_editing a.surveycomment,
div.spr_editing div.surveycomment {
display: block; display: block;
} }
li.spr_editing span.display_editor, li.spr_editing span.display_editor,
@ -25627,34 +25635,6 @@ div.page_komentarji_anketa ul div.question_comment_holder div.question_comment .
margin-bottom: 16px; margin-bottom: 16px;
} }
#placeholder.komentarji {
margin: 0px;
}
.comment {
font-style: italic;
color: #FF0000;
width: auto;
padding-right: 10px;
padding-top: 3px;
display: block;
float: left;
}
.if_comment {
font-style: italic;
color: #E5E5E5;
width: auto;
margin: 0px 3px;
}
.spr_comment {
font-style: italic;
color: #E5E5E5;
width: auto;
margin: 0px 3px;
}
#quick_comments_link { #quick_comments_link {
position: relative; position: relative;
text-decoration: none; text-decoration: none;
@ -25772,11 +25752,11 @@ div.page_komentarji_anketa ul div.question_comment_holder div.question_comment .
color: #1E88E5 !important; color: #1E88E5 !important;
font-size: 14px !important; font-size: 14px !important;
} }
#quick_comments_link #comment_dropdown #first_holder_div { #quick_comments_link #comment_dropdown .first_holder_div {
padding-top: 16px; padding-top: 16px;
border-top: 1px solid #E5E5E5; border-top: 1px solid #E5E5E5;
} }
#quick_comments_link #comment_dropdown #first_holder_div textarea { #quick_comments_link #comment_dropdown .first_holder_div textarea {
height: 130px; height: 130px;
width: 305px; width: 305px;
width: 100%; width: 100%;
@ -25794,54 +25774,67 @@ div.page_komentarji_anketa ul div.question_comment_holder div.question_comment .
margin: 0; margin: 0;
} }
#quick_comments_link.newCss { .comment_container_inline {
text-align: center; position: relative;
} }
#quick_comments_link.newCss img { .comment_container_inline .comment_inline_popup {
vertical-align: middle; position: absolute;
bottom: 20px;
right: -320px;
width: 341px;
padding: 12px;
box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.12);
border-radius: 2px;
background-color: #FFFFFF;
z-index: 99;
} }
.comment_container_inline .comment_inline_popup .comment_inline_top {
.comments_on_alert { display: flex;
margin-bottom: 32px; flex-direction: row;
padding: 16px 32px; justify-content: space-between;
border: 1px solid #E5E5E5; align-content: center;
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); border-bottom: 1px #E5E5E5 solid;
margin-bottom: 16px;
padding-bottom: 12px;
} }
.comments_on_alert .title { .comment_container_inline .comment_inline_popup .comment_inline_top .title {
width: 100%;
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
text-transform: uppercase; text-transform: uppercase;
padding-bottom: 8px; font-size: 14px !important;
margin-bottom: 8px; display: flex;
border-bottom: 1px #E5E5E5 solid; flex-direction: row;
align-content: center;
} }
.comments_on_alert .title .faicon { .comment_container_inline .comment_inline_popup .comment_inline_top .title span.faicon {
margin-right: 8px; margin-right: 6px;
color: #1E88E5; line-height: 17px !important;
} }
.comments_on_alert a { .comment_container_inline .comment_inline_popup .comment_inline_top .title span.faicon::before {
font-weight: 500; color: #1E88E5 !important;
font-weight: 400;
font-size: 14px !important;
} }
.comments_on_alert a:hover { .comment_container_inline .comment_inline_popup .comment_inline_top span {
color: #1E88E5;
}
.comment_qtip_title_secondLine {
color: #E5E5E5;
font-weight: normal !important;
padding-top: 5px;
}
#topSettingsHolder.komentarji #additional_navigation span.bold,
#topSettingsHolder.komentarji_anketa #additional_navigation span.bold {
margin: 0 0 0 8px;
font-size: 14px; font-size: 14px;
cursor: pointer;
} }
#topSettingsHolder.komentarji #additional_navigation span.bold span, .comment_container_inline .comment_inline_popup .first_holder_div textarea {
#topSettingsHolder.komentarji_anketa #additional_navigation span.bold span { height: 130px;
width: 100%;
margin: 0; margin: 0;
padding: 0; }
font-size: 14px; .comment_container_inline .comment_inline_popup .button_holder {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 0;
margin-top: 10px;
}
.comment_container_inline .comment_inline_popup .button_holder button {
min-width: 128px;
margin: 0 !important;
} }
div.subpage_testnipodatki fieldset fieldset:first-of-type { div.subpage_testnipodatki fieldset fieldset:first-of-type {

View File

@ -11,12 +11,14 @@ div.spr,
&:hover { &:hover {
.spr_edit, .spr_edit,
a.surveycomment { a.surveycomment,
div.surveycomment {
display: block; display: block;
} }
} }
a.surveycomment { a.surveycomment,
div.surveycomment {
display: none; display: none;
} }
@ -474,7 +476,8 @@ li.spr_editing,
div.spr_editing{ div.spr_editing{
.spr_edit, .spr_edit,
a.surveycomment { a.surveycomment,
div.surveycomment {
display: block; display: block;
} }

View File

@ -645,33 +645,6 @@ div.page_komentarji_anketa {
} }
} }
////////////////////////////////
#placeholder.komentarji{
margin: 0px;
}
.comment {
font-style: italic;
color: $red;
width: auto;
padding-right: 10px;
padding-top: 3px;
display: block;
float: left;
}
.if_comment {
font-style: italic;
color: $gray;
width: auto;
margin: 0px 3px;
}
.spr_comment {
font-style: italic;
color: $gray;
width: auto;
margin: 0px 3px;
}
#quick_comments_link { #quick_comments_link {
position:relative; position:relative;
@ -832,7 +805,7 @@ div.page_komentarji_anketa {
} }
#first_holder_div { .first_holder_div {
padding-top: 16px; padding-top: 16px;
border-top: 1px solid $gray; border-top: 1px solid $gray;
@ -859,73 +832,85 @@ div.page_komentarji_anketa {
} }
} }
} }
#quick_comments_link.newCss {
text-align: center;
img { //Inline v urejanju vprašalnika
vertical-align: middle; .comment_container_inline {
} position: relative;
}
.comments_on_alert {
margin-bottom: 32px;
padding: 16px 32px;
border: 1px solid $gray; .comment_inline_popup {
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); position: absolute;
bottom: 20px;
right: -320px;
.title{ width: 341px;
font-weight: 600; padding: 12px;
font-size: 16px; box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.12);
text-transform: uppercase; border-radius: 2px;
background-color: $white;
z-index: 99;
padding-bottom: 8px; .comment_inline_top {
margin-bottom: 8px;
border-bottom: 1px $gray solid; display: flex;
flex-direction: row;
justify-content: space-between;
align-content: center;
.faicon{ border-bottom: 1px $gray solid;
margin-right: 8px; margin-bottom: 16px;
color: $blue; padding-bottom: 12px;
}
}
.text{
}
a{
//color: white;
font-weight: 500;
&:hover{
color: $blue;
}
}
}
.comment_qtip_title_secondLine {
color: $gray;
font-weight: normal !important;
padding-top: 5px;
}
@mixin sub_settings_comments(){
.title {
width: 100%;
} font-weight: 600;
font-size: 16px;
#topSettingsHolder.komentarji, text-transform: uppercase;
#topSettingsHolder.komentarji_anketa {
#additional_navigation { font-size: 14px !important;
display: flex;
flex-direction: row;
align-content: center;
span.faicon {
margin-right: 6px;
line-height: 17px !important;
&::before{
color: $blue !important;
font-weight: 400;
font-size: 14px !important;
}
}
}
span.bold { span {
margin: 0 0 0 8px;
font-size: 14px;
span{
margin: 0;
padding: 0;
font-size: 14px; font-size: 14px;
cursor: pointer;
} }
} }
}
.first_holder_div {
textarea {
height: 130px;
width: 100%;
margin: 0;
}
}
.button_holder {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 0;
margin-top: 10px;
button {
min-width: 128px;
margin: 0 !important;
}
}
}
} }