[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 != '') {
// 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 ' <span class="faicon inline_comment"></span> ';
echo $lang['srv_add_comment'];
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);
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'},
function () {
if (view == 0) {
$('#surveycomment_'+spremenljivka+'_0').qtip("hide"); // pri opciji Dodaj komentar, skrijemo oblacek po submitu
$('#comment_add_'+spremenljivka).show(); // pokazemo opcijo Poglej komentarje
$("#comment_inline_add").toggleClass('displayNone'); // pri opciji Dodaj komentar, skrijemo oblacek po submitu
} else if (view == 4 || view == 5) {
window.location.reload();
}
@ -5721,3 +5720,9 @@ function toggleCommentDropdownTestSurvey () {
$("#comment_dropdown_test_survey").toggleClass('displayNone');
$(".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 a.surveycomment,
li.spr:hover div.surveycomment,
div.spr:hover .spr_edit,
div.spr:hover a.surveycomment,
div.spr:hover div.surveycomment,
.jezik_row:hover .spr_edit,
.jezik_row:hover a.surveycomment {
.jezik_row:hover a.surveycomment,
.jezik_row:hover div.surveycomment {
display: block;
}
li.spr a.surveycomment,
li.spr div.surveycomment,
div.spr a.surveycomment,
.jezik_row a.surveycomment {
div.spr div.surveycomment,
.jezik_row a.surveycomment,
.jezik_row div.surveycomment {
display: none;
}
li.spr .spr_edit,
@ -15640,8 +15646,10 @@ div.spr .spremenljivka_content .comment_container_inline button,
li.spr_editing .spr_edit,
li.spr_editing a.surveycomment,
li.spr_editing div.surveycomment,
div.spr_editing .spr_edit,
div.spr_editing a.surveycomment {
div.spr_editing a.surveycomment,
div.spr_editing div.surveycomment {
display: block;
}
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;
}
#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 {
position: relative;
text-decoration: none;
@ -25772,11 +25752,11 @@ div.page_komentarji_anketa ul div.question_comment_holder div.question_comment .
color: #1E88E5 !important;
font-size: 14px !important;
}
#quick_comments_link #comment_dropdown #first_holder_div {
#quick_comments_link #comment_dropdown .first_holder_div {
padding-top: 16px;
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;
width: 305px;
width: 100%;
@ -25794,54 +25774,67 @@ div.page_komentarji_anketa ul div.question_comment_holder div.question_comment .
margin: 0;
}
#quick_comments_link.newCss {
text-align: center;
.comment_container_inline {
position: relative;
}
#quick_comments_link.newCss img {
vertical-align: middle;
.comment_container_inline .comment_inline_popup {
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;
}
.comments_on_alert {
margin-bottom: 32px;
padding: 16px 32px;
border: 1px solid #E5E5E5;
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
.comment_container_inline .comment_inline_popup .comment_inline_top {
display: flex;
flex-direction: row;
justify-content: space-between;
align-content: center;
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-size: 16px;
text-transform: uppercase;
padding-bottom: 8px;
margin-bottom: 8px;
border-bottom: 1px #E5E5E5 solid;
font-size: 14px !important;
display: flex;
flex-direction: row;
align-content: center;
}
.comments_on_alert .title .faicon {
margin-right: 8px;
color: #1E88E5;
.comment_container_inline .comment_inline_popup .comment_inline_top .title span.faicon {
margin-right: 6px;
line-height: 17px !important;
}
.comments_on_alert a {
font-weight: 500;
.comment_container_inline .comment_inline_popup .comment_inline_top .title span.faicon::before {
color: #1E88E5 !important;
font-weight: 400;
font-size: 14px !important;
}
.comments_on_alert a:hover {
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;
.comment_container_inline .comment_inline_popup .comment_inline_top span {
font-size: 14px;
cursor: pointer;
}
#topSettingsHolder.komentarji #additional_navigation span.bold span,
#topSettingsHolder.komentarji_anketa #additional_navigation span.bold span {
.comment_container_inline .comment_inline_popup .first_holder_div textarea {
height: 130px;
width: 100%;
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 {

View File

@ -11,12 +11,14 @@ div.spr,
&:hover {
.spr_edit,
a.surveycomment {
a.surveycomment,
div.surveycomment {
display: block;
}
}
a.surveycomment {
a.surveycomment,
div.surveycomment {
display: none;
}
@ -474,7 +476,8 @@ li.spr_editing,
div.spr_editing{
.spr_edit,
a.surveycomment {
a.surveycomment,
div.surveycomment {
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 {
position:relative;
@ -832,7 +805,7 @@ div.page_komentarji_anketa {
}
#first_holder_div {
.first_holder_div {
padding-top: 16px;
border-top: 1px solid $gray;
@ -859,72 +832,84 @@ div.page_komentarji_anketa {
}
}
}
#quick_comments_link.newCss {
text-align: center;
img {
vertical-align: middle;
}
}
.comments_on_alert {
margin-bottom: 32px;
padding: 16px 32px;
//Inline v urejanju vprašalnika
.comment_container_inline {
position: relative;
border: 1px solid $gray;
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
.comment_inline_popup {
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: $white;
z-index: 99;
.comment_inline_top {
display: flex;
flex-direction: row;
justify-content: space-between;
align-content: center;
border-bottom: 1px $gray solid;
margin-bottom: 16px;
padding-bottom: 12px;
.title {
width: 100%;
.title{
font-weight: 600;
font-size: 16px;
text-transform: uppercase;
padding-bottom: 8px;
margin-bottom: 8px;
font-size: 14px !important;
border-bottom: 1px $gray solid;
display: flex;
flex-direction: row;
align-content: center;
.faicon{
margin-right: 8px;
color: $blue;
span.faicon {
margin-right: 6px;
line-height: 17px !important;
&::before{
color: $blue !important;
font-weight: 400;
font-size: 14px !important;
}
}
}
.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(){
}
#topSettingsHolder.komentarji,
#topSettingsHolder.komentarji_anketa {
#additional_navigation {
span.bold {
margin: 0 0 0 8px;
span {
font-size: 14px;
cursor: pointer;
}
}
span{
.first_holder_div {
textarea {
height: 130px;
width: 100%;
margin: 0;
padding: 0;
font-size: 14px;
}
}
.button_holder {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 0;
margin-top: 10px;
button {
min-width: 128px;
margin: 0 !important;
}
}
}