GDPR seznam anket - popravki Nejceve kode, dokoncano filtriranje
This commit is contained in:
parent
e8316ae853
commit
ed67398d05
@ -55,113 +55,87 @@ class GDPR{
|
||||
global $site_url;
|
||||
global $lang;
|
||||
|
||||
$survey_list = array();
|
||||
$survey_list = $this->getUserSurveys();
|
||||
|
||||
// Dobimo seznam vseh anket in stevilke
|
||||
list($survey_list, $survey_count) = $this->getUserSurveys();
|
||||
|
||||
|
||||
// echo '<fieldset>';
|
||||
// echo '<legend>'.$lang['srv_anketalist'].'</legend>';
|
||||
// 3 boxi na vrhu za filtriranje tabele (gdpr ankete, ne-gdpr ankete, potencialno gdpr ankete)
|
||||
echo '<div class="gdpr-box-container">';
|
||||
|
||||
echo '<div class="box-container">';
|
||||
// Box 1 - gdpr ankete
|
||||
echo ' <div class= "num_box num_box1 checked" id="num_box1" onclick="gdpr_ankete()">';
|
||||
|
||||
echo '<div class= "num_box num_box1 checked" id="num_box1" onclick="gdpr_ankete()">';
|
||||
|
||||
echo '<div class="box_flex" id="box_flex">';
|
||||
echo '<input type="checkbox" name="GDPR ankete checkbox" id="gdpr_ankete_check" checked="checked" onclick="gdpr_ankete()">';
|
||||
echo '<div class="naslov_gdpr"> GDPR ANKETE</div>';
|
||||
echo '</div>';
|
||||
|
||||
// echo '<div class="box_text" id="box_text1">';
|
||||
// echo '<div class="num_of_surveys" id="num_of_surveys1"> 0 </div>';
|
||||
// echo ' <p> anket vsebuje GDPR občutljive podatke </p>';
|
||||
// echo '</div>';
|
||||
|
||||
echo '<div class="box_text">';
|
||||
echo '<p id="p_num_of_surveys1"> <span class="num_of_surveys" id="num_of_surveys1"> 5 </span> anket vsebuje GDPR občutljive podatke </p>';
|
||||
// echo '<p id="num_of_surveys1"> anket vsebuje GDPR občutljive podatke </p>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo ' <div class="box_flex" id="box_flex">';
|
||||
echo ' <input type="checkbox" name="GDPR ankete checkbox" id="gdpr_ankete_check" checked="checked" onclick="gdpr_ankete()">';
|
||||
echo ' <div class="naslov_gdpr"> GDPR ANKETE</div>';
|
||||
echo ' </div>';
|
||||
|
||||
|
||||
echo '<div class= "num_box num_box2 checked" id="num_box2" onclick="potenc_gdpr_ankete()">';
|
||||
echo ' <div class="box_text">';
|
||||
echo ' <p id="p_num_of_surveys1"> <span class="num_of_surveys" id="num_of_surveys1"> '.$survey_count['gdpr'].' </span> anket vsebuje GDPR občutljive podatke </p>';
|
||||
echo ' </div>';
|
||||
echo ' </div>';
|
||||
|
||||
echo '<div class="box_flex" id="box_flex potenc_gdpr">';
|
||||
echo '<input type="checkbox" name="Potencialno GDPR ankete" id="potenc_gdpr_ankete_check" checked="checked" onclick="potenc_gdpr_ankete()">';
|
||||
echo '<div class="naslov_gdpr"> POTENCIALNO GDPR ANKETE</div>';
|
||||
echo '</div>';
|
||||
// Box 2 - gdpr ankete
|
||||
echo ' <div class= "num_box num_box2 checked" id="num_box2" onclick="potenc_gdpr_ankete()">';
|
||||
|
||||
// echo '<div class="box_text">';
|
||||
// echo '<div class="num_of_surveys" id="num_of_surveys2"> 0 </div>';
|
||||
// echo '<p> anket lahko vsebuje GDPR občutljive podatke. </p>';
|
||||
// echo '</div>';
|
||||
echo ' <div class="box_flex" id="box_flex potenc_gdpr">';
|
||||
echo ' <input type="checkbox" name="Potencialno GDPR ankete" id="potenc_gdpr_ankete_check" checked="checked" onclick="potenc_gdpr_ankete()">';
|
||||
echo ' <div class="naslov_gdpr"> POTENCIALNO GDPR ANKETE</div>';
|
||||
echo ' </div>';
|
||||
|
||||
echo '<div class="box_text">';
|
||||
echo '<p id="p_num_of_surveys2"> <span class="num_of_surveys" id="num_of_surveys2"> 0 </span> anket lahko vsebuje GDPR občutljive podatke. </p>';
|
||||
echo '</div>';
|
||||
echo ' <div class="box_text">';
|
||||
echo ' <p id="p_num_of_surveys2"> <span class="num_of_surveys" id="num_of_surveys2"> '.$survey_count['potential_gdpr'].' </span> anket lahko vsebuje GDPR občutljive podatke. </p>';
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '<div class= "num_box num_box3 checked" id="num_box3" onclick="ne_gdpr_ankete()">';
|
||||
echo ' </div>';
|
||||
|
||||
// Box 3 - gdpr ankete
|
||||
echo ' <div class= "num_box num_box3 checked" id="num_box3" onclick="ne_gdpr_ankete()">';
|
||||
|
||||
echo '<div class="box_flex" id="box_flex">';
|
||||
echo '<input type="checkbox" name="ne-gdpr ankete" id="ne_gdpr_ankete" checked="checked" onclick="ne_gdpr_ankete()" >';
|
||||
echo '<div class="naslov_gdpr"> NE-GDPR ANKETE</div>';
|
||||
echo '</div>';
|
||||
echo ' <div class="box_flex" id="box_flex">';
|
||||
echo ' <input type="checkbox" name="ne-gdpr ankete" id="ne_gdpr_ankete" checked="checked" onclick="ne_gdpr_ankete()" >';
|
||||
echo ' <div class="naslov_gdpr"> NE-GDPR ANKETE</div>';
|
||||
echo ' </div>';
|
||||
|
||||
// echo '<div class="box_text">';
|
||||
// echo ' <div class="num_of_surveys" id="num_of_surveys3"> 0 </div>';
|
||||
// echo '<p> anket ne vsebuje GDPR občutljivih podatkov </p>';
|
||||
// echo '</div>';
|
||||
|
||||
echo '<div class="box_text">';
|
||||
echo '<p id="p_num_of_surveys3"> <span class="num_of_surveys" id="num_of_surveys3"> 0 </span> anket ne vsebuje GDPR občutljivih podatkov </p>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '<script src="/admin/survey/script/GDPR_seznam_anket.js"></script>';
|
||||
echo ' <div class="box_text">';
|
||||
echo ' <p id="p_num_of_surveys3"> <span class="num_of_surveys" id="num_of_surveys3"> '.$survey_count['no_gdpr'].' </span> anket ne vsebuje GDPR občutljivih podatkov </p>';
|
||||
echo ' </div>';
|
||||
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// Text med nastavitvami in tabelo
|
||||
echo '<p class="bottom16">'.$lang['srv_gdpr_survey_list_text'].'</p>';
|
||||
|
||||
// echo $lang['srv_gdpr_survey_list_text2'].'<ul style="margin-top:2px;">';
|
||||
// echo ' <li>'.$lang['srv_gdpr_survey_list_li_1'].'</li>';
|
||||
// echo ' <li>'.$lang['srv_gdpr_survey_list_li_2'].'</li>';
|
||||
// echo ' <li>'.$lang['srv_gdpr_survey_list_li_3'].'</li>';
|
||||
// echo ' <li>'.$lang['srv_gdpr_survey_list_li_4'].'</li>';
|
||||
// echo '</ul>';
|
||||
|
||||
echo '<p class="top16 bottom16">'.$lang['srv_gdpr_survey_list_text3'].'</p>';
|
||||
|
||||
|
||||
// Tabela anket
|
||||
echo '<table class="gdpr_surveys">';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<th class="center">GDPR</th>';
|
||||
echo '<th>'.$lang['srv_gdpr_survey_list_survey'].'</th>';
|
||||
echo '<th>'.$lang['srv_gdpr_survey_list_activity'].'</th>';
|
||||
echo '<th>'.$lang['srv_gdpr_survey_list_pot_gdpr'].'</th>';
|
||||
echo '</tr>';
|
||||
// Naslovna vrstica
|
||||
echo ' <tr>';
|
||||
echo ' <th class="center">GDPR</th>';
|
||||
echo ' <th>'.$lang['srv_gdpr_survey_list_survey'].'</th>';
|
||||
echo ' <th>'.$lang['srv_gdpr_survey_list_activity'].'</th>';
|
||||
echo ' <th>'.$lang['srv_gdpr_survey_list_pot_gdpr'].'</th>';
|
||||
echo ' </tr>';
|
||||
|
||||
foreach($survey_list as $anketa){
|
||||
|
||||
// Nastavimo barvo vrstice
|
||||
if($anketa['gdpr'] == 1)
|
||||
//green
|
||||
$color = ' class="green_row" id="green_row"';
|
||||
$color = 'green_row';
|
||||
elseif($anketa['potential_gdpr'] == 1)
|
||||
//Red
|
||||
$color = ' class="red_row" id="red_row"';
|
||||
$color = 'red_row';
|
||||
else
|
||||
//grey
|
||||
$color = 'class="grey_row" id="grey_row"';
|
||||
$color = 'grey_row';
|
||||
|
||||
echo '<tr '.$color.'>';
|
||||
echo '<tr class="'.$color.'">';
|
||||
|
||||
if($anketa['active']==1)
|
||||
$anketa_active = $lang['yes'];
|
||||
@ -173,22 +147,15 @@ class GDPR{
|
||||
else
|
||||
$anketa_potential_gdpr = $lang['no'];
|
||||
|
||||
|
||||
echo '<td class="center"><input type="checkbox" id="gdpr_'.$anketa['id'].'" value="1" onClick="setGDPRSurvey(\''.$anketa['id'].'\', this.checked); return false;" '.($anketa['gdpr'] == '1' ? ' checked="checked"' : '').'><label class="empty" for="gdpr_'.$anketa['id'].'"></label></td>';
|
||||
echo '<td><a href="'.$site_url.'admin/survey/index.php?anketa='.$anketa['id'].'&a=gdpr_settings">'.$anketa['naslov'].'</a></td>';
|
||||
echo '<td>'.$anketa_active.'</td>';
|
||||
echo '<td>'.$anketa_potential_gdpr.'</td>';
|
||||
|
||||
echo ' <td class="center"><input type="checkbox" id="gdpr_'.$anketa['id'].'" value="1" onClick="setGDPRSurvey(\''.$anketa['id'].'\', this.checked); return false;" '.($anketa['gdpr'] == '1' ? ' checked="checked"' : '').'><label class="empty" for="gdpr_'.$anketa['id'].'"></label></td>';
|
||||
echo ' <td><a href="'.$site_url.'admin/survey/index.php?anketa='.$anketa['id'].'&a=gdpr_settings">'.$anketa['naslov'].'</a></td>';
|
||||
echo ' <td>'.$anketa_active.'</td>';
|
||||
echo ' <td>'.$anketa_potential_gdpr.'</td>';
|
||||
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
|
||||
// echo '</fieldset>';
|
||||
|
||||
echo '<script src="/admin/survey/script/GDPR_seznam_anket.js"></script>';
|
||||
|
||||
}
|
||||
|
||||
// Prikazemo vsebino zavihka gdpr - nastavitve uporabnika
|
||||
@ -1440,12 +1407,24 @@ class GDPR{
|
||||
$temp_naslov = array();
|
||||
$temp_active = array();
|
||||
|
||||
$count_gdpr = 0;
|
||||
$count_potential_gdpr = 0;
|
||||
$count_no_gdpr = 0;
|
||||
|
||||
$key = 0;
|
||||
foreach($surveys as $anketa){
|
||||
|
||||
$potential_gdpr = $this->potentialGDPRSurvey($anketa['id']);
|
||||
$gdpr = $this->isGDPRSurvey($anketa['id']);
|
||||
|
||||
// Prestejemo ankete v posamezni skupini
|
||||
if($gdpr == '1')
|
||||
$count_gdpr++;
|
||||
elseif($potential_gdpr == '1')
|
||||
$count_potential_gdpr++;
|
||||
else
|
||||
$count_no_gdpr++;
|
||||
|
||||
$temp_gdpr[$key] = $gdpr;
|
||||
$temp_gdpr_p[$key] = $potential_gdpr;
|
||||
$temp_naslov[$key] = $anketa['naslov'];
|
||||
@ -1464,7 +1443,13 @@ class GDPR{
|
||||
|
||||
array_multisort($temp_gdpr, SORT_DESC, $temp_gdpr_p, SORT_DESC, $temp_active, SORT_DESC, $temp_naslov, SORT_DESC, $survey_list);
|
||||
|
||||
return $survey_list;
|
||||
$survey_count = array(
|
||||
'gdpr' => $count_gdpr,
|
||||
'potential_gdpr' => $count_potential_gdpr,
|
||||
'no_gdpr' => $count_no_gdpr
|
||||
);
|
||||
|
||||
return array($survey_list, $survey_count);
|
||||
}
|
||||
|
||||
// Pridobimo vse zahteve za izbris za userja (za vse ankete ali samo za doloceno anketo)
|
||||
|
@ -370,10 +370,8 @@ class SurveyTheme {
|
||||
}
|
||||
|
||||
//Gumbi
|
||||
echo '<script src="/admin/survey/script/urejanje_oblika.js"> </script>';
|
||||
echo '<div class="options option1" >';
|
||||
|
||||
// echo '<button id="btn-1" class="faicon dots" onclick="teme_options()"> ';
|
||||
echo '<span class="faicon dots" onclick="teme_options()" > </span>';
|
||||
|
||||
// echo '<img src="\public\img\icons\dots.svg">';
|
||||
|
@ -607,7 +607,6 @@ class SurveyAnalysis {
|
||||
}
|
||||
|
||||
|
||||
echo '<script src="\admin\survey\script\urejanje_oblika.js"> </script>';
|
||||
echo '<table class="table_desc" >';
|
||||
|
||||
echo '<tr class="row1">';
|
||||
@ -1010,7 +1009,6 @@ class SurveyAnalysis {
|
||||
|
||||
|
||||
# tekst vprašanja
|
||||
echo '<script src="\admin\survey\script\urejanje_oblika.js"> </script>';
|
||||
echo '<table class="table_freq">';
|
||||
|
||||
# naslovna vrstica
|
||||
@ -1733,8 +1731,6 @@ class SurveyAnalysis {
|
||||
echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleKumulativa'] .'</td>';
|
||||
|
||||
echo '</tr>';
|
||||
|
||||
echo '<script src="\admin\survey\script\urejanje_oblika.js"> </script>';
|
||||
// konec naslovne vrstice
|
||||
|
||||
|
||||
|
@ -213,3 +213,79 @@ function setGDPRRequestCommentSurvey(request_id, text){
|
||||
|
||||
$("#survey_requests").load('ajax.php?t=gdpr&a=gdpr_request_comment_survey', {request_id: request_id, value:value, ank_id:ank_id});
|
||||
}
|
||||
|
||||
|
||||
// Filter po gdpr anketah - seznam anket
|
||||
function gdpr_ankete(){
|
||||
|
||||
var check_gdpr_ankete = document.getElementById('gdpr_ankete_check');
|
||||
|
||||
if (check_gdpr_ankete.checked){
|
||||
check_gdpr_ankete.checked = false;
|
||||
|
||||
// box-u odstranimo barvo
|
||||
$('#num_box1').removeClass('checked');
|
||||
|
||||
// skrijemo vrstice v tabeli
|
||||
$('.green_row').hide();
|
||||
}
|
||||
else {
|
||||
check_gdpr_ankete.checked = true;
|
||||
|
||||
// box-u dodamo barvo
|
||||
$('#num_box1').addClass('checked');
|
||||
|
||||
// prikazemo vrstice v tabeli
|
||||
$('.green_row').show();
|
||||
}
|
||||
}
|
||||
|
||||
// Filter po potencialnih gdpr anketah - seznam anket
|
||||
function potenc_gdpr_ankete(){
|
||||
|
||||
var check_potenc_gdpr = document.getElementById('potenc_gdpr_ankete_check');
|
||||
|
||||
if (check_potenc_gdpr.checked){
|
||||
check_potenc_gdpr.checked = false;
|
||||
|
||||
// box-u odstranimo barvo
|
||||
$('#num_box2').removeClass('checked');
|
||||
|
||||
// skrijemo vrstice v tabeli
|
||||
$('.red_row').hide();
|
||||
}
|
||||
else {
|
||||
check_potenc_gdpr.checked = true;
|
||||
|
||||
// box-u dodamo barvo
|
||||
$('#num_box2').addClass('checked');
|
||||
|
||||
// prikazemo vrstice v tabeli
|
||||
$('.red_row').show();
|
||||
}
|
||||
}
|
||||
|
||||
// Filter po ne-gdpr anketah - seznam anket
|
||||
function ne_gdpr_ankete(){
|
||||
|
||||
var check_negdpr_ankete = document.getElementById('ne_gdpr_ankete');
|
||||
|
||||
if (check_negdpr_ankete.checked){
|
||||
check_negdpr_ankete.checked = false;
|
||||
|
||||
// box-u odstranimo barvo
|
||||
$('#num_box3').removeClass('checked');
|
||||
|
||||
// skrijemo vrstice v tabeli
|
||||
$('.grey_row').hide();
|
||||
}
|
||||
else {
|
||||
check_negdpr_ankete.checked = true;
|
||||
|
||||
// box-u dodamo barvo
|
||||
$('#num_box3').addClass('checked');
|
||||
|
||||
// prikazemo vrstice v tabeli
|
||||
$('.grey_row').show();
|
||||
}
|
||||
}
|
||||
|
@ -1,204 +0,0 @@
|
||||
var green_row_count = document.getElementsByClassName("green_row").length;
|
||||
var red_row_count = document.getElementsByClassName("red_row").length;
|
||||
var grey_row_count = document.getElementsByClassName("grey_row").length;
|
||||
|
||||
var text_box1 = document.getElementById("num_of_surveys1");
|
||||
var text_box2 = document.getElementById("num_of_surveys2");
|
||||
var text_box3 = document.getElementById("num_of_surveys3");
|
||||
|
||||
var text_box1_p = document.getElementById("p_num_of_surveys1");
|
||||
var text_box2_p = document.getElementById("p_num_of_surveys2");
|
||||
var text_box3_p = document.getElementById("p_num_of_surveys3");
|
||||
|
||||
|
||||
// izpis ŠTEVILA posameznih anket (gdpr / potencialno gdpr / ne-gdpr)
|
||||
// text_box1.innerHTML = green_row_count;
|
||||
// text_box2.innerHTML = red_row_count;
|
||||
// text_box3.innerHTML = grey_row_count;
|
||||
|
||||
|
||||
// tekst popravljen glede na število anket
|
||||
|
||||
//green row
|
||||
if (green_row_count == 1){
|
||||
text_box1_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+green_row_count+' </span> anketa vsebuje GDPR občutljive podatke';
|
||||
}
|
||||
else if (green_row_count == 2){
|
||||
text_box1_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+green_row_count+' </span> anketi vsebujeta GDPR občutljive podatke';
|
||||
}
|
||||
else if (green_row_count == 3){
|
||||
text_box1_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+green_row_count+' </span> ankete vsebujejo GDPR občutljive podatke';
|
||||
}
|
||||
else {
|
||||
text_box1_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+green_row_count+' </span> anket vsebuje GDPR občutljive podatke';
|
||||
}
|
||||
//red row
|
||||
if (red_row_count == 1){
|
||||
text_box2_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+red_row_count+' </span> anketa lahko vsebuje GDPR občutljive podatke';
|
||||
}
|
||||
else if (red_row_count == 2){
|
||||
text_box2_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+red_row_count+' </span> anketi lahko vsebujeta GDPR občutljive podatke';
|
||||
}
|
||||
else if (red_row_count == 3){
|
||||
text_box2_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+red_row_count+' </span> ankete lahko vsebujejo GDPR občutljive podatke';
|
||||
}
|
||||
else {
|
||||
text_box2_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+red_row_count+' </span> anket lahko vsebuje GDPR občutljive podatke';
|
||||
}
|
||||
//grey row
|
||||
if (grey_row_count == 1){
|
||||
text_box3_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+grey_row_count+' </span> anketa ne vsebuje GDPR občutljivih podatkov';
|
||||
}
|
||||
else if (grey_row_count == 2){
|
||||
text_box3_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+grey_row_count+' </span> anketi ne vsebujeta GDPR občutljivih podatkov';
|
||||
}
|
||||
else if (grey_row_count == 3){
|
||||
text_box3_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+grey_row_count+' </span> ankete ne vsebujejo GDPR občutljivih podatkov';
|
||||
}
|
||||
else {
|
||||
text_box3_p.innerHTML = ' <span class="num_of_surveys" id="num_of_surveys1"> '+grey_row_count+' </span> anket ne vsebuje GDPR občutljivih podatkov';
|
||||
}
|
||||
|
||||
// Seznam anket - togle checkbox prikaz anket
|
||||
|
||||
function test_function() {
|
||||
var inputs = document.getElementById("gdpr_ankete_check");
|
||||
var potenc_gdpr = document.getElementById("potenc_gdpr_ankete_check");
|
||||
var ne_gdpr_ankete = document.getElementById("ne_gdpr_ankete");
|
||||
|
||||
var green_row = document.getElementsByClassName("green_row");
|
||||
var red_row = document.getElementsByClassName("red_row");
|
||||
var grey_row = document.getElementsByClassName("grey_row");
|
||||
|
||||
console.log(green_row.length);
|
||||
|
||||
|
||||
// GDPR ANKETE togle
|
||||
var box1 = document.getElementsByClassName("num_box1")[0];
|
||||
var box1_Color = document.getElementById("num_box1");
|
||||
|
||||
box1_Color.style.backgroundColor="rgba(20, 255, 0, 0.05)";
|
||||
|
||||
if (!inputs.checked){
|
||||
|
||||
box1_Color.style.background="#ffffff";
|
||||
|
||||
box1.classList.remove("checked");
|
||||
|
||||
// skrije vsak element z green_row classom
|
||||
for(var i=0; i < green_row.length; i++){
|
||||
green_row[i].style.display="none";
|
||||
};
|
||||
}
|
||||
else{
|
||||
|
||||
box1_Color.style.background="rgba(20, 255, 0, 0.05)";
|
||||
|
||||
// box1.classList.toggle("checked");
|
||||
box1.classList.add("checked");
|
||||
|
||||
// prikaže vsak element z green_row classom
|
||||
for(var i=0; i < green_row.length; i++){
|
||||
green_row[i].style.display="table-row";
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// potencialno GDPR ankete togle
|
||||
var box2 = document.getElementsByClassName("num_box2")[0];
|
||||
var box2_Color = document.getElementById("num_box2");
|
||||
|
||||
|
||||
if (!potenc_gdpr.checked){
|
||||
box2_Color.style.backgroundColor="#ffffff";
|
||||
box2.classList.remove("checked");
|
||||
|
||||
for(var i=0; i < red_row.length; i++){
|
||||
red_row[i].style.display="none";
|
||||
};
|
||||
}
|
||||
else{
|
||||
box2_Color.style.backgroundColor="rgba(255, 0, 0, 0.05)";
|
||||
box2.classList.add("checked");
|
||||
|
||||
for(var i=0; i < red_row.length; i++){
|
||||
red_row[i].style.display="table-row";
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ne-GDPR ankete
|
||||
var box3 = document.getElementsByClassName("num_box3")[0];
|
||||
if (!ne_gdpr_ankete.checked){
|
||||
|
||||
box3.classList.remove("checked");
|
||||
|
||||
for(var i=0; i < grey_row.length; i++){
|
||||
grey_row[i].style.display="none";
|
||||
};
|
||||
}
|
||||
else{
|
||||
box3.classList.add("checked");
|
||||
|
||||
for(var i=0; i < grey_row.length; i++){
|
||||
grey_row[i].style.display="table-row";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function gdpr_ankete(){
|
||||
var check_gdpr_ankete = document.getElementById('gdpr_ankete_check');
|
||||
|
||||
//GDOR ANKETE
|
||||
if (check_gdpr_ankete.checked){
|
||||
check_gdpr_ankete.checked = false;
|
||||
test_function();
|
||||
}
|
||||
else {
|
||||
check_gdpr_ankete.checked = true;
|
||||
test_function();
|
||||
}
|
||||
}
|
||||
|
||||
function potenc_gdpr_ankete(){
|
||||
|
||||
var check_potenc_gdpr = document.getElementById('potenc_gdpr_ankete_check');
|
||||
|
||||
//POTENCGDOR ANKETE
|
||||
if (check_potenc_gdpr.checked){
|
||||
check_potenc_gdpr.checked = false;
|
||||
test_function();
|
||||
}
|
||||
else {
|
||||
check_potenc_gdpr.checked = true;
|
||||
test_function();
|
||||
}
|
||||
}
|
||||
|
||||
function ne_gdpr_ankete(){
|
||||
|
||||
var check_negdpr_ankete = document.getElementById('ne_gdpr_ankete');
|
||||
|
||||
//NE GDPR ANKETE
|
||||
if (check_negdpr_ankete.checked){
|
||||
check_negdpr_ankete.checked = false;
|
||||
test_function();
|
||||
}
|
||||
else {
|
||||
check_negdpr_ankete.checked = true;
|
||||
test_function();
|
||||
}
|
||||
}
|
||||
|
||||
function teme_options(){
|
||||
var toggle = document.getElementsByClassName('buttons-window');
|
||||
toggle.onclick = function(){
|
||||
toggle.classList.toggle('active');
|
||||
}
|
||||
}
|
||||
|
||||
// var toggle = document.getElementById();
|
||||
// toggle.onclick = function(){
|
||||
// toggle.classList.toggle('active');
|
||||
// }
|
@ -27,13 +27,6 @@ function themes_init() {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/*$("#div_theme_group span.theme_links_rename").live('click', function(event) {
|
||||
var theme = $(this).attr('theme');
|
||||
$('#fade').fadeTo('slow', 1);
|
||||
$('#fullscreen').html('').fadeIn('slow');
|
||||
$("#fullscreen").load('ajax.php?t=theme&a=theme_rename', {anketa:srv_meta_anketa_id, theme:theme});
|
||||
});*/
|
||||
|
||||
$("#theme_rename_confirm").live('click', function(event) {
|
||||
var theme_new_name = $("#theme_new_name").val();
|
||||
@ -219,4 +212,69 @@ function changeTheme (gid, css) {
|
||||
$('#div_theme_group_holder').append('<div id="success_save">'+lang['srv_success_save']+'</div>');
|
||||
actionNotePopup('success_save', 'success');
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
function teme_options(){
|
||||
|
||||
var toggle_id = document.getElementById("buttons-window1");
|
||||
|
||||
document.onclick = function(e){
|
||||
if(e.target.id !== 'buttons-window1' && e.target.id !== 'btn-1' ){
|
||||
toggle_id.classList.addClass('displayNone');
|
||||
}
|
||||
}
|
||||
toggle_id.classList.toggle('displayNone');
|
||||
}
|
||||
|
||||
function teme_options2(){
|
||||
var toggle_id = document.getElementById("buttons-window2");
|
||||
|
||||
document.onclick = function(e){
|
||||
if(e.target.id !== 'buttons-window2' && e.target.id !== 'btn-2' ){
|
||||
toggle_id.classList.addClass('displayNone');
|
||||
}
|
||||
}
|
||||
toggle_id.classList.toggle('displayNone');
|
||||
}
|
||||
|
||||
function show_settings(id_of_element){
|
||||
|
||||
if($('#additional_settings_'+id_of_element).hasClass('displayNone')){
|
||||
$('.buttons-window').addClass('displayNone');
|
||||
$('#additional_settings_'+id_of_element).removeClass('displayNone');
|
||||
}
|
||||
else{
|
||||
$('.buttons-window').addClass('displayNone');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function show_settings_mobile(id_of_element){
|
||||
|
||||
// var options = document.getElementsByClassName("options_mobile"+id_of_element)[0];
|
||||
var options = document.getElementById("options_mobile"+id_of_element);
|
||||
var additional_settings = document.getElementById("additional_settings_mobile_"+id_of_element);
|
||||
|
||||
additional_settings.classList.toggle("active");
|
||||
|
||||
|
||||
if($('#additional_settings_mobile_'+id_of_element).hasClass('displayNone')){
|
||||
$('.buttons-window').addClass('displayNone');
|
||||
$('#additional_settings_mobile_'+id_of_element).removeClass('displayNone');
|
||||
}
|
||||
else{
|
||||
$('.buttons-window').addClass('displayNone');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function show_settings_survey_analysis(id_of_element){
|
||||
if($('#options'+id_of_element).hasClass('displayNone')){
|
||||
$('.options').addClass('displayNone');
|
||||
$('#options'+id_of_element).removeClass('displayNone');
|
||||
}
|
||||
else{
|
||||
$('.options').addClass('displayNone');
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
|
||||
|
||||
|
||||
function teme_options(){
|
||||
|
||||
var toggle_id = document.getElementById("buttons-window1");
|
||||
|
||||
document.onclick = function(e){
|
||||
if(e.target.id !== 'buttons-window1' && e.target.id !== 'btn-1' ){
|
||||
toggle_id.classList.addClass('displayNone');
|
||||
}
|
||||
}
|
||||
toggle_id.classList.toggle('displayNone');
|
||||
}
|
||||
|
||||
function teme_options2(){
|
||||
var toggle_id = document.getElementById("buttons-window2");
|
||||
|
||||
document.onclick = function(e){
|
||||
if(e.target.id !== 'buttons-window2' && e.target.id !== 'btn-2' ){
|
||||
toggle_id.classList.addClass('displayNone');
|
||||
}
|
||||
}
|
||||
toggle_id.classList.toggle('displayNone');
|
||||
}
|
||||
|
||||
function show_settings(id_of_element){
|
||||
|
||||
// var options_id = ("options"+id_of_element)
|
||||
// var additional_settings = document.getElementById("additional_settings_"+id_of_element);
|
||||
// var additional_settings_id = ("additional_settings_"+id_of_element);
|
||||
|
||||
// console.log(options_id);
|
||||
// console.log(additional_settings_id);
|
||||
|
||||
|
||||
// // document.onclick = function(e){
|
||||
// // if(e.target.id !== additional_settings_id && e.target.id !==options_id ){
|
||||
// // additional_settings.classList.remove('active');
|
||||
// // }
|
||||
// // }
|
||||
// additional_settings.classList.toggle("active");
|
||||
|
||||
if($('#additional_settings_'+id_of_element).hasClass('displayNone')){
|
||||
$('.buttons-window').addClass('displayNone');
|
||||
$('#additional_settings_'+id_of_element).removeClass('displayNone');
|
||||
}
|
||||
else{
|
||||
$('.buttons-window').addClass('displayNone');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function show_settings_mobile(id_of_element){
|
||||
|
||||
// var options = document.getElementsByClassName("options_mobile"+id_of_element)[0];
|
||||
var options = document.getElementById("options_mobile"+id_of_element);
|
||||
var additional_settings = document.getElementById("additional_settings_mobile_"+id_of_element);
|
||||
|
||||
|
||||
// document.onclick = function(e){
|
||||
// if(e.target.id !== additional_settings && e.target.id !== options ){
|
||||
// additional_settings.classList.remove('active');
|
||||
// }
|
||||
// }
|
||||
additional_settings.classList.toggle("active");
|
||||
|
||||
|
||||
|
||||
if($('#additional_settings_mobile_'+id_of_element).hasClass('displayNone')){
|
||||
$('.buttons-window').addClass('displayNone');
|
||||
$('#additional_settings_mobile_'+id_of_element).removeClass('displayNone');
|
||||
}
|
||||
else{
|
||||
$('.buttons-window').addClass('displayNone');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function show_settings_survey_analysis(id_of_element){
|
||||
if($('#options'+id_of_element).hasClass('displayNone')){
|
||||
$('.options').addClass('displayNone');
|
||||
$('#options'+id_of_element).removeClass('displayNone');
|
||||
}
|
||||
else{
|
||||
$('.options').addClass('displayNone');
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,9 @@
|
||||
|
||||
|
||||
|
||||
.box-container{
|
||||
.gdpr-box-container{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
margin: 16px 0px;
|
||||
|
||||
|
||||
|
||||
.num_box{
|
||||
border: 1px solid #E5E5E5;
|
||||
background-color: #FFFF;
|
||||
@ -26,22 +21,16 @@
|
||||
.naslov_gdpr{
|
||||
font-size: 16px !important;
|
||||
font-weight: 600;
|
||||
// margin: 12px 0px 12px 0px;
|
||||
|
||||
}
|
||||
|
||||
input {
|
||||
|
||||
position: unset;
|
||||
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
|
||||
margin-right: 8px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.box_text{
|
||||
@ -57,9 +46,7 @@
|
||||
font-size: 32px;
|
||||
color: #333;
|
||||
font-weight: 400;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,13 +58,13 @@
|
||||
margin: 0px 32px ;
|
||||
}
|
||||
|
||||
#num_box1 {
|
||||
#num_box1.checked{
|
||||
background-color: rgba(20, 255, 0, 0.05);
|
||||
}
|
||||
#num_box2{
|
||||
#num_box2.checked{
|
||||
background-color: rgba(255, 0, 0, 0.05);
|
||||
}
|
||||
#num_box3{
|
||||
#num_box3.checked{
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user