[Redizajn 1KA v2] Testiranje --> Komentarji - test survey dropdown - v delu

This commit is contained in:
tejagerjovic 2022-09-14 01:26:32 +02:00
parent e1a304a572
commit 34d853bd5c
8 changed files with 1392 additions and 1264 deletions

View File

@ -1434,7 +1434,6 @@ class SurveyAdmin
echo '</div>';
echo '<div class="settings">';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=urejanje" title="' . $lang['srv_settings_komentarji1'] . '">';
echo '<span class="faicon wheel_32"></span>';
echo '</a>';
echo '</div>';

View File

@ -5715,4 +5715,9 @@ function toggleAddUser(){
function toggleCommentDropdown () {
$("#comment_dropdown").toggleClass('displayNone');
}
function toggleCommentDropdownTestSurvey () {
$("#comment_dropdown").toggleClass('displayNone');
$(".open_comment_box").toggleClass('active');
}

View File

@ -3587,7 +3587,7 @@ $lang = array (
"srv_advanced_options_note" => "Za uporabo nekaterih naprednih opcij potrebujete status managerja!<br/><a href=\"https://www.1ka.si/d/sl/o-1ka/splosen-opis/nivoji-uporabnikov/manager?from1ka=1\" target=\"_blank\">Zaprosite za status managerja</a>.",
"user_see_hour_views" => "Uporabnik vidi vpoglede v svoje &#269;asovnice",
"srv_survey_comment" => "Dodaj komentarje o anketi",
"srv_survey_general_comment" => "Dodaj splošni komentar na anketo",
"srv_survey_general_comment" => "Dodaj splošni komentar",
"srv_survey_comments" => "Poglej komentarje o anketi",
"srv_question_comment" => "Dodaj komentar na vprašanje",
"srv_question_comments" => "Poglej komentarje o vpra&#353;anju",

View File

@ -3558,7 +3558,7 @@ $lang = array (
"srv_advanced_options_note" => "Some advanced options are only available for users with the status of manager.<br/>For manager status contact us at email: <a href=\"mailto:info@1ka.si\">info@1ka.si</a> or phone: 01/5805278.",
"user_see_hour_views" => "User sees views of his timetables",
"srv_survey_comment" => "Comment survey",
"srv_survey_general_comment" => "Add a general survey comment",
"srv_survey_general_comment" => "Add a general comment",
"srv_survey_comments" => "View survey comments",
"srv_question_comment" => "Add a question comment",
"srv_question_comments" => "View question comments",

View File

@ -2341,7 +2341,7 @@ class BodyController extends Controller
// Komentarji urednikov na anketo
if (get('userAutor')) {
echo '<div style="margin: 20px 0 15px; width: 100%;">';
echo '<div id="comments_bottom_line">';
$view = 1;
$survey_comment = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment');
@ -2350,48 +2350,43 @@ class BodyController extends Controller
$_GET['testdata'] == 'on')
) {
echo '<span class="stngs floatLeft">';
echo '<div class="open_comment_box" id="surveycomment_0_' . $view . '" type="0" view="' . $view . '" spremenljivka="0" onclick="toggleCommentDropdownTestSurvey();">';
echo '<span class="faicon fa-comment empty"></span>';
echo self::$lang['srv_survey_general_comment'] . ' ';
echo '</a>';
$show_survey_comment = $_GET['show_survey_comment'];
if ($row['forum'] == 0 || $row['thread'] == 0) {
echo '<a href="#" onclick="return false;" class="surveycomment bold" id="surveycomment_0_' . $view . '" type="0" view="' . $view . '" spremenljivka="0">';
echo self::$lang['srv_comment_splosen'] . ' ';
echo '<span class="faicon comment" title="' . self::$lang['srv_survey_comment'] . '" alt="' . self::$lang['srv_survey_comment'] . '"></span>';
echo '</a>';
} else {
$sqlf = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread]'");
$rowf = mysqli_fetch_array($sqlf);
$rowf['count']--; //zaradi 1. avtomatskega posta
echo '<a href="#" onclick="return false;" class="surveycomment bold" id="surveycomment_0_' . $view . '" type="0" view="' . $view . '" spremenljivka="0">';
echo self::$lang['srv_comment_splosen'] . ' ';
echo '<span class="faicon comment" title="' . self::$lang['srv_survey_comment'] . '" alt="' . self::$lang['srv_survey_comment'] . '"></span>';
// ali prikazemo okno odprto - je dodan tak admin komentar
$sqlf1 = sisplet_query("SELECT * FROM post p WHERE p.tid='$row[thread]' AND p.ocena='5'");
while ($rowf1 = mysqli_fetch_array($sqlf1)) {
$s = sisplet_query("SELECT * FROM views WHERE pid='$rowf1[id]' AND uid='self::$global_user_id'");
if (mysqli_num_rows($s) == 0)
$show_survey_comment = 1;
}
echo '</a>';
}
echo '</div>'; //.open_comment_box
echo '<script type="text/javascript" src="' . self::$site_url . '/admin/survey/script/js-lang.php?lang='.self::$lang['lang_short'].'&amp;v=13.06.07"></script>';
// Ce je tole vklopljeno se js porusi?
//echo '<script type="text/javascript" src="'.self::$site_url.'/admin/survey/minify/g=jsnew?v=13.06.07"></script>';
echo '<script type="text/javascript" src="' . self::$site_url . '/admin/survey/script/jquery/jquery.qtip-1.0.js"></script>';
echo '<script type="text/javascript" src="' . self::$site_url . '/admin/survey/script/script.js"></script>';
echo '<script> $(function() { load_comment(\'#surveycomment_0_' . $view . '\'' . ($show_survey_comment == '1' ? ', \'2\'' : '') . '); });</script>';
echo '</span>';
}
// Uredniske nastavitve link
echo '<span class="floatRight bold"><a href="' . self::$site_url . '/admin/survey/index.php?anketa=' . get('anketa') . '&a=testiranje&popup=open" target="_blank" title="' . self::$lang['srv_uredniske_nastavitve'] . '">' . self::$lang['settings'] . ' <span class="faicon settings"></span></a></span>';
echo '<a href="' . self::$site_url . '/admin/survey/index.php?anketa=' . get('anketa') . '&a=testiranje&popup=open" target="_blank" title="' . self::$lang['srv_uredniske_nastavitve'] . '">';
echo '<div id="comment_settings">';
echo '<span class="faicon settings"></span>';
echo '</div></a>';
echo '</div>'; // #comments_bottom_line
//dropdown na klik ikone
echo '<div id="comment_dropdown" class="displayNone">';
echo 'test';
$anketa = get('anketa');
echo '<div id="survey_comment_0_1">';
$ba = new BranchingAjax($anketa);
$ba->add_comment_field(0, '0', '1', false, false);
echo '</div>';
echo '<div class="button_holder">';
echo '<button class="small white-blue" onclick="toggleCommentDropdown(); return false;">'.$lang['edit1338'].'</button>';
echo '<button class="small blue" onclick="add_comment(\'0\', \'0\', \'1\', $(\'#vsebina_0_1\').val()); actionNotePopup(\'comment_added\', \'success\');return false;">'.$lang['srv_comments_new'].'</button>';
echo '</div>';
echo '</div>'; //comment_dropdown
}
// Komentarji respondentov na anketo
elseif (self::$global_user_id > 0 || true) {

File diff suppressed because it is too large Load Diff

View File

@ -15,3 +15,5 @@ and open the template in the editor.
@import "main/footer";
@import "main/content";
@import "main/admin";
@import "main/test_survey_comments"

View File

@ -0,0 +1,70 @@
.displayNone {
display: none;
}
.fa-comment:before {
content: "\f075";
}
span.faicon.empty {
font-weight: 400 !important;
}
//Vrstica za dodajanje komentarja in nastavitve na dnu okna
#comments_bottom_line {
display: flex;
flex-direction: row;
align-content: center;
justify-content: space-between;
margin: 0 15px 15px 15px;
.open_comment_box {
display: flex;
flex-direction: row;
align-content: center;
justify-content: center;
cursor: pointer;
border-radius: 2px;
border: 1px solid #E5E5E5;
padding: 4px;
span.faicon {
margin-right: 8px;
&::before{
color: #1E88E5 !important;
font-size: 16px !important;
line-height: 17px !important;
}
}
&.active {
color: #1E88E5;
border-color: #1E88E5;
background-color: #F4F9FE;
}
}
a {
#comment_settings {
display: flex;
flex-direction: row;
align-content: center;
justify-content: center;
border-radius: 2px;
border: 1px solid #E5E5E5;
padding: 4px;
span.faicon {
&::before{
color: #1E88E5 !important;
font-size: 16px !important;
line-height: 17px !important;
}
}
}
}
}