[Redizajn 1KA] Popupi: Podatki > Izračuni > Rekodiranje - Dodaj - v2

This commit is contained in:
tejagerjovic 2022-06-02 02:59:34 +02:00
parent 8b49cc72ea
commit 8642fd9701
5 changed files with 134 additions and 24 deletions

View File

@ -677,36 +677,46 @@ class RecodeValues {
echo '</div>'; echo '</div>';
if ((int)$recode_type == 1) { if ((int)$recode_type == 1) {
echo'<span id="divRecodeSprNew" class="floatRecodeSpremenljivka">'; echo'<div id="divRecodeSprNew" class="top16 bottom16">';
if ((int)$to_spr_id == 0) { if ((int)$to_spr_id == 0) {
echo '<div class="new-spr">'; echo '<div class="new-spr">';
//echo $lang['srv_recode_to_spr_add_spr'].'<br/>'; //echo $lang['srv_recode_to_spr_add_spr'].'<br/>';
echo '<div id="coding_spr_new" >'; echo '<div id="coding_spr_new" >';
echo '<p class="top16">'.$lang['srv_recode_to_spr_name'].' <input type="text" class="text large" id="rec_spremenljivka_naslov" name="spremenljivka_naslov" default="1" contenteditable="true" value="'.$sugestedName.'"/>'; echo '<p class="top16">'.$lang['srv_recode_to_spr_name'].' <input type="text" class="text medium" id="rec_spremenljivka_naslov" name="spremenljivka_naslov" default="1" contenteditable="true" value="'.$sugestedName.'"/>';
#echo '<a href="#" onclick="recodeSpremenljivkaNew(); return false;">'.$lang['add'].'</a>'; #echo '<a href="#" onclick="recodeSpremenljivkaNew(); return false;">'.$lang['add'].'</a>';
echo '<a href="#" onclick="recodeSpremenljivkaNew(); return false;""><span class="faicon add" title="'.$lang['add'].'"></span></a>'; echo '<button class="small blue" onclick="recodeSpremenljivkaNew(); return false;"">'.$lang['add'].'</button>';
echo '</p>'; echo '</p>';
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
} else { } else {
echo '<strong>'.$rowSpremenljivka['variable'].' - '.skrajsaj(strip_tags($rowSpremenljivka['naslov']), 40).'</strong><br/><br/>'; echo '<span class="semi-bold">'.$rowSpremenljivka['variable'].' - '.skrajsaj(strip_tags($rowSpremenljivka['naslov']), 40).'</span>';
$sql1 = sisplet_query("SELECT naslov FROM srv_vrednost WHERE spr_id='$to_spr_id' ORDER BY vrstni_red ASC"); $sql1 = sisplet_query("SELECT naslov FROM srv_vrednost WHERE spr_id='$to_spr_id' ORDER BY vrstni_red ASC");
$count = 0;
echo '<p class="top16 bottom16">'.$lang['srv_recode_valueset'];
while ($row1 = mysqli_fetch_array($sql1)) { while ($row1 = mysqli_fetch_array($sql1)) {
if ($rowSpremenljivka['tip'] == 1) { if ($rowSpremenljivka['tip'] == 1) {
echo '<input type="radio" onclick="return false;" /><label> '.$row1['naslov'].'</label>'; if ($count == 0) {
echo '<br/>'; $count = 1;
}
else {
echo ', ';
}
echo $row1['naslov'];
} }
} }
echo '</p>';
echo '<div class="setting_holder">';
if (mysqli_num_rows($sql1) == 0) { if (mysqli_num_rows($sql1) == 0) {
echo '&nbsp;'.$lang['srv_novavrednost'].': '; $margin='0'; echo '&nbsp;'.$lang['srv_novavrednost'].': '; $margin='0';
} else { $margin = '23px'; } else { $margin = 'none-left';
} }
echo '<input type="text" name="vrednost_new" value="" '.(mysqli_num_rows($sql1)>0?' placeholder="'.$lang['srv_novavrednost'].'" ':'').' style="margin-left:'.$margin.'; width: 80px" /> '; echo '<input class="text medium '.$margin.'" type="text" name="vrednost_new" value="" '.(mysqli_num_rows($sql1)>0?' placeholder="'.$lang['srv_novavrednost'].'" ':'').' /> ';
echo '<a href="#" onclick="recodeVrednostNew(); return false;"><span class="faicon add small icon-as_link" title="'.$lang['add'].'"></span></a>'; echo '<button class="small blue" onclick="recodeVrednostNew(); return false;">'.$lang['add'].'</button>';
echo '<br>Napredne spremembe:'.Help::display('srv_recode_advanced_edit'); echo '<p class="recode_end">Napredne spremembe:'.Help::display('srv_recode_advanced_edit').'</p>';
echo '</div>';
} }
echo '</span>'; echo '</div>';
} }
} }
if ( $displayType == 1 ) { if ( $displayType == 1 ) {
@ -720,22 +730,21 @@ class RecodeValues {
//echo '<table style="width:65% !important;">'; //echo '<table style="width:65% !important;">';
echo '<table class="question_recode_table">'; echo '<table class="question_recode_table">';
echo '<tr>'; echo '<tr>';
echo '<th class="halfWidth" colspan="2">'; echo '<th class="halfWidth center" colspan="2">';
echo $lang['srv_recode_original']; echo $lang['srv_recode_original'];
echo '</th>'; echo '</th>';
echo '<td rowspan="2" style="vertical-align:top;">&nbsp;<span class="sprites arrow_switch"></span>&nbsp;</td>'; echo '<th class="halfWidth center" rowspan="2" style="vertical-align:top;">';
echo '<th class="halfWidth" rowspan="2" style="vertical-align:top;">';
echo $lang['srv_recode_to']; echo $lang['srv_recode_to'];
echo '</th>'; echo '</th>';
echo '</tr>'; echo '</tr>';
echo '<tr>'; echo '<tr>';
echo '<td class="halfWidth anl_ac gray">'; echo '<th class="halfWidth anl_ac">';
echo $lang['srv_recode_to_label']; echo $lang['srv_label'];
echo '</td>'; echo '</th>';
echo '<td class="halfWidth anl_ac gray">'; echo '<th class="halfWidth anl_ac">';
echo $lang['srv_recode_to_value']; echo $lang['srv_vrednost'];
echo '</td>'; echo '</th>';
echo '</tr>'; echo '</tr>';
foreach (self::$variables AS $vKey => $variable) { foreach (self::$variables AS $vKey => $variable) {
@ -746,9 +755,6 @@ class RecodeValues {
echo '<td class="anl_ac">'; echo '<td class="anl_ac">';
echo '&nbsp;&nbsp;['.$variable['variable'].']'; echo '&nbsp;&nbsp;['.$variable['variable'].']';
echo '</td>'; echo '</td>';
# spacer
echo '<td>&nbsp</td>';
#
echo '<td>'; echo '<td>';
if ((int)$recode_type == 0) { if ((int)$recode_type == 0) {
# imamo klasično rekodiranje # imamo klasično rekodiranje

View File

@ -5283,6 +5283,7 @@ $lang = array (
"srv_coding_no_spr" => "Ta spremenljivka še nima kodiranih vrednosti", "srv_coding_no_spr" => "Ta spremenljivka še nima kodiranih vrednosti",
'srv_coding_new' => "Dodaj spremenljivko za kodiranje", 'srv_coding_new' => "Dodaj spremenljivko za kodiranje",
'srv_recoding_not_set_jet' => "Za ta tip vprašanja še ni omogočeno rekodiranje!", 'srv_recoding_not_set_jet' => "Za ta tip vprašanja še ni omogočeno rekodiranje!",
'srv_recode_valueset' => "<span class=\"semi-bold\">Možne vrednosti: </span>",
'srv_recode_original' => "Obstoječi odgovori", 'srv_recode_original' => "Obstoječi odgovori",
'srv_recode_to' => "Rekodirani odgovori", 'srv_recode_to' => "Rekodirani odgovori",
'srv_recode_number_if' => "Če je %s", 'srv_recode_number_if' => "Če je %s",

View File

@ -5254,6 +5254,7 @@ $lang = array (
"srv_coding_no_spr" => "There are no variables for coding yet", "srv_coding_no_spr" => "There are no variables for coding yet",
'srv_coding_new' => "New coding variable", 'srv_coding_new' => "New coding variable",
'srv_recoding_not_set_jet' => "Recoding is not supported for that type of question!", 'srv_recoding_not_set_jet' => "Recoding is not supported for that type of question!",
'srv_recode_valueset' => "<span class=\"semi-bold\">Possible values: </span>",
'srv_recode_original' => "Answer / value", 'srv_recode_original' => "Answer / value",
'srv_recode_to' => "will recode in", 'srv_recode_to' => "will recode in",
'srv_recode_number_if' => "If Answer is", 'srv_recode_number_if' => "If Answer is",

View File

@ -8488,6 +8488,56 @@ div#div_condition_editing div#div_condition_editing_container div#div_condition_
margin-right: 4px; margin-right: 4px;
} }
.question_recode_table {
width: 100%;
white-space: nowrap;
}
.question_recode_table td, .question_recode_table th {
font-size: 14px;
}
.question_recode_table td select, .question_recode_table th select {
width: 100% !important;
}
#divRecodeSprOption label {
font-size: 14px;
}
#divRecodeSprNew .setting_holder {
display: flex;
flex-direction: row;
align-items: center;
margin: 16px 0;
}
#divRecodeSprNew .setting_holder button {
width: fit-content;
min-width: auto;
}
#divRecodeSprNew .setting_holder input.text {
margin: 0 16px 0 16px;
}
#divRecodeSprNew .setting_holder input.text.none-left {
margin-left: 0;
}
#divRecodeSprNew .setting_holder .recode_end {
margin-left: 80px;
}
#coding_spr_new p, #coding_spr_new span,
#divRecodeSprNew p,
#divRecodeSprNew span {
font-size: 14px;
}
#coding_spr_new input,
#divRecodeSprNew input {
margin: 0 16px 0 16px;
}
#coding_spr_new button,
#divRecodeSprNew button {
width: fit-content;
min-width: auto;
}
div#inspect_div .setting_holder .horizontal { div#inspect_div .setting_holder .horizontal {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

View File

@ -224,7 +224,6 @@ div#div_analiza_archive_name {
} }
//Pošji arhiv //Pošji arhiv
#div_archives_email_left { #div_archives_email_left {
width: 75%; width: 75%;
} }
@ -453,6 +452,59 @@ div#div_condition_editing {
margin-right: 4px; margin-right: 4px;
} }
.question_recode_table {
width: 100%;
white-space: nowrap;
td, th {
font-size: 14px;
select {
width: 100% !important;
}
}
}
#divRecodeSprOption {
label {
font-size: 14px;
}
}
#divRecodeSprNew {
.setting_holder {
display: flex;
flex-direction: row;
align-items: center;
margin: 16px 0;
button {
width: fit-content;
min-width: auto;
}
input.text {
margin: 0 16px 0 16px;
&.none-left {
margin-left: 0;
}
}
.recode_end {
margin-left: 80px;
}
}
}
#coding_spr_new,
#divRecodeSprNew{
p, span {
font-size: 14px;
}
input {
margin: 0 16px 0 16px;
}
button {
width: fit-content;
min-width: auto;
}
}
//////ANALIZA////// //////ANALIZA//////
//Zoom //Zoom