[Redizajn 1KA] - Podatki --> Izračuni --> Ročno kodiranje - popupi
This commit is contained in:
parent
46c1765c25
commit
f06b27f784
@ -666,7 +666,9 @@ class SurveyPostProcess {
|
||||
} else {
|
||||
$coding_id = $spr_id;
|
||||
}
|
||||
echo '<h3 style="margin: 7px 10px">'.$lang['srv_hand_coding'].'</h3>';
|
||||
echo '<div class="popup_close"><a href="#" onClick="toggle_coding_div(); return false;">✕</a></div>';
|
||||
echo '<h2><span class="faicon fa-code-branch blue"></span>'.$lang['srv_hand_coding'].'</h2>';
|
||||
|
||||
echo '<form id="coding_'.$usr_id.'">';
|
||||
|
||||
echo '<input type="hidden" value="'.$usr_id.'" name="usr_id">';
|
||||
@ -679,23 +681,34 @@ class SurveyPostProcess {
|
||||
|
||||
echo '<fieldset style="position: relative">';
|
||||
|
||||
echo '<p style="float:left; min-height:20px"><strong>'.skrajsaj(strip_tags($row['naslov']), 20).'</strong> <a href="" onclick="$(\'.edit_'.$row['id'].'\').toggle(); return false;" title="'.$lang['edit2'].'"><span class="faicon edit"></span></a></p>';
|
||||
echo '<p class="edit_'.$row['id'].'" style="display:none; float:left; margin-left:10px">'.$lang['srv_tip'].': ';
|
||||
echo '<select name="tip" onchange="if (confirm(\''.$lang['srv_change_q_tip'].'\')) {coding_tip(\''.$row['id'].'\', \''.$usr_id.'\', $(this).val());} return false;"><option value="1" '.($row['tip']==1?'selected':'').'>'.$lang['srv_vprasanje_tip_1'].'</option><option value="2" '.($row['tip']==2?'selected':'').'>'.$lang['srv_vprasanje_tip_2'].'</option><option value="3" '.($row['tip']==3?'selected':'').'>'.$lang['srv_vprasanje_tip_3'].'</option></select>';
|
||||
//echo '<a href="#" onclick="if (confirm(\''.$lang['srv_change_q_tip'].'\')) {coding_tip(\''.$row['id'].'\', \''.$usr_id.'\', \''.($row['tip']==1?'2':'1').'\');} return false;" title="'.$lang['srv_change_q_tip'].'">'.($row['tip']==1?$lang['srv_vprasanje_tip_1']:$lang['srv_vprasanje_tip_2']).'</a>';
|
||||
echo ' <a href="index.php?anketa='.$this->anketa.'&spr_id='.$row['id'].'#branching_'.$row['id'].'">'.$lang['srv_napredno_urejanje'].'</a> <a href="" onclick="brisi_spremenljivko(\''.$row['id'].'\'); return false;" title="'.$lang['srv_brisispremenljivko'].'"><span class="faicon delete icon-grey_dark_link"></span></a></p>';
|
||||
//Zgornji sivi del
|
||||
echo '<div class="variable_name">';
|
||||
|
||||
echo '<div class="osnovno">';
|
||||
echo '<p class=semi-bold>'.skrajsaj(strip_tags($row['naslov']), 20).'</p>';
|
||||
echo '<span class="faicon edit pointer blue" onclick="$(\'.edit_'.$row['id'].'\').toggle(); return false;" title="'.$lang['edit2'].'"></span>';
|
||||
echo '<span class="faicon delete empty blue pointer" onclick="brisi_spremenljivko(\''.$row['id'].'\'); return false;" title="'.$lang['srv_brisispremenljivko'].'"></span>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="urejanje edit_'.$row['id'].'" style="display:none;">'.$lang['srv_tip'].': ';
|
||||
echo '<select name="tip" class="dropdown small" onchange="if (confirm(\''.$lang['srv_change_q_tip'].'\')) {coding_tip(\''.$row['id'].'\', \''.$usr_id.'\', $(this).val());} return false;"><option value="1" '.($row['tip']==1?'selected':'').'>'.$lang['srv_vprasanje_tip_1'].'</option><option value="2" '.($row['tip']==2?'selected':'').'>'.$lang['srv_vprasanje_tip_2'].'</option><option value="3" '.($row['tip']==3?'selected':'').'>'.$lang['srv_vprasanje_tip_3'].'</option></select>';
|
||||
echo '<a class="noline" href="index.php?anketa='.$this->anketa.'&spr_id='.$row['id'].'#branching_'.$row['id'].'">'.$lang['srv_napredno_urejanje'].'</a></div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
//Spodnji del
|
||||
echo '<div class="variable_content">';
|
||||
|
||||
echo '<input id="visible_'.$row['row'].'" type="hidden" value="1" name="visible_'.$row['id'].'">';
|
||||
|
||||
//echo '<input type="hidden" value="'.$row['id'].'" name="spr_id">';
|
||||
|
||||
echo '<p style="clear:both">';
|
||||
if ($row['tip'] == 3) {
|
||||
echo '<select name="vrednost_'.$row['id'].'">';
|
||||
}
|
||||
$sql1 = sisplet_query("SELECT id, naslov FROM srv_vrednost WHERE spr_id='$row[id]' ORDER BY vrstni_red ASC");
|
||||
while ($row1 = mysqli_fetch_array($sql1)) {
|
||||
|
||||
echo '<div class="setting_holder horizontal">';
|
||||
|
||||
$sql2 = sisplet_query("SELECT * FROM srv_data_vrednost".$this->db_table." WHERE spr_id='$row[id]' AND vre_id='$row1[id]' AND usr_id='$usr_id'");
|
||||
if (mysqli_num_rows($sql2) > 0)
|
||||
$checked = 'checked="checked"'; else $checked = '';
|
||||
@ -709,46 +722,48 @@ class SurveyPostProcess {
|
||||
}
|
||||
|
||||
if ($row['tip'] == 1 || $row['tip'] == 2) {
|
||||
echo '<span style="display:none; color:gray; float:right" class="edit_'.$row['id'].'"><select onchange="coding_merge(\''.$row['id'].'\', \''.$row1['id'].'\', \''.$usr_id.'\', this.value)" style="width:150px">';
|
||||
echo '<span style="display:none;" class="edit_'.$row['id'].'"><select class="dropdown small" onchange="coding_merge(\''.$row['id'].'\', \''.$row1['id'].'\', \''.$usr_id.'\', this.value)" style="width:150px">';
|
||||
echo '<option value="0">'.$lang['srv_coding_merge'].':</option>';
|
||||
|
||||
$sql2 = sisplet_query("SELECT id, naslov FROM srv_vrednost WHERE spr_id='$row[id]' AND id != '$row1[id]' ORDER BY vrstni_red ASC");
|
||||
while ($row2 = mysqli_fetch_array($sql2))
|
||||
echo '<option value="'.$row2['id'].'">'.$row2['naslov'].'</option>';
|
||||
|
||||
echo '</select></span><br />';
|
||||
echo '</select>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
|
||||
}
|
||||
if ($row['tip'] == 3) {
|
||||
echo '</select>';
|
||||
}
|
||||
echo '<input type="text" name="vrednost_new_'.$row['id'].'" value="" placeholder="'.$lang['srv_novavrednost'].'" style="margin-left:23px; width: 80px" /> <a href="#" onclick="coding_vrednost_new(\''.$row['id'].'\', \''.$usr_id.'\', $(\'input[name=vrednost_new_'.$row['id'].']\').val()); return false;"><span class="faicon add small icon-as_link" title="'.$lang['add'].'"></span></a>';
|
||||
echo '</p>';
|
||||
echo '<input type="text" class="text small" name="vrednost_new_'.$row['id'].'" value="" placeholder="'.$lang['srv_novavrednost'].'"/> <a href="#" onclick="coding_vrednost_new(\''.$row['id'].'\', \''.$usr_id.'\', $(\'input[name=vrednost_new_'.$row['id'].']\').val()); return false;"><span class="faicon add blue pointer" title="'.$lang['add'].'"></span></a>';
|
||||
|
||||
echo '</div>'; #div.variable_content
|
||||
echo '</fieldset>';
|
||||
}
|
||||
} else {
|
||||
echo '<fieldset>';
|
||||
echo '<p>'.$lang['srv_coding_no_spr'].'</p>';
|
||||
echo '</fieldset>';
|
||||
echo '<p class="italic">'.$lang['srv_coding_no_spr'].'</p>';
|
||||
}
|
||||
|
||||
echo '<div class="new-spr">';
|
||||
echo '<a href="#" onclick="'.(true?' $(\'#coding_spr_new\').toggle();':'').' return false;">'.$lang['srv_coding_new'].'</a>';
|
||||
echo '<div id="coding_spr_new" '.(true?' style="display:none"':'').'>';
|
||||
echo '<p>'.$lang['name'].': <input type="text" name="spremenljivka_new" value="" style="width: 123px" /> <a href="#" onclick="coding_spremenljivka_new(\''.$coding_id.'\', \''.$usr_id.'\', $(\'input[name=spremenljivka_new]\').val()); return false;">'.$lang['add'].'</a></p>';
|
||||
|
||||
echo '<div class="button_holder" id="dodaj_spr">';
|
||||
echo '<button class="medium blue" onclick="'.(true?' $(\'#coding_spr_new\').toggle(); $(\'#dodaj_spr\').toggle();':'').' return false;">'.$lang['srv_coding_new'].'</button>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="setting_holder horizontal" id="coding_spr_new" '.(true?' style="display:none"':'').'>';
|
||||
echo '<p>'.$lang['name'].':</p>';
|
||||
echo '<div class="button_holder inline">';
|
||||
echo '<input type="text" class="text large" name="spremenljivka_new" value=""/>';
|
||||
echo '<button class="medium blue" onclick="coding_spremenljivka_new(\''.$coding_id.'\', \''.$usr_id.'\', $(\'input[name=spremenljivka_new]\').val()); return false;">'.$lang['add'].'</button>';
|
||||
echo '<button class="medium white-blue" onclick="$(\'#coding_spr_new\').toggle(); $(\'#dodaj_spr\').toggle(); return false;">'.$lang['edit1338'].'</button>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
|
||||
|
||||
echo '<p style="margin:20px 10px 10px 10px">';
|
||||
|
||||
if (mysqli_num_rows($sql) > 0) {
|
||||
//echo '<input type="submit" value="'.$lang['srv_close_profile'].'" onclick="coding_save(\''.$usr_id.'\'); return false;"> ';
|
||||
}
|
||||
echo '<a href="#" onclick="coding_save(\''.$usr_id.'\'); return false;">'.$lang['srv_close_profile'].'</a>';
|
||||
echo '</p>';
|
||||
echo '<div class="button_holder">';
|
||||
echo '<button class="medium white-blue" onclick="coding_save(\''.$usr_id.'\'); return false;">'.$lang['save'].'</button>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
@ -404,6 +404,12 @@ function coding_filter (seq) {
|
||||
});
|
||||
}
|
||||
|
||||
function toggle_coding_div () {
|
||||
|
||||
$('#coding').hide();
|
||||
|
||||
}
|
||||
|
||||
function coding_merge (spr_id, vre_id, usr_id, merge) {
|
||||
|
||||
if (spr_id > 0 && vre_id > 0 && merge > 0) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -108,18 +108,171 @@ div.subpage_coding {
|
||||
|
||||
position: absolute;
|
||||
|
||||
min-width: 500px;
|
||||
width: 600px;
|
||||
min-height: 100px;
|
||||
display: none;
|
||||
|
||||
.new-spr {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
background-color: white;
|
||||
padding: 5px;
|
||||
text-align: right;
|
||||
box-shadow: 0px 2px 7px 1px rgba(0, 0, 0, 0.25);
|
||||
|
||||
div.button_holder {
|
||||
margin-bottom: 16px;
|
||||
&:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
h2{
|
||||
width: 100%;
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 8px;
|
||||
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
text-transform: uppercase;
|
||||
|
||||
border-bottom: 1px $gray solid;
|
||||
|
||||
margin-block-start: 0;
|
||||
|
||||
span.faicon,
|
||||
span.fa-brands {
|
||||
margin-right: 6px;
|
||||
|
||||
color: $blue;
|
||||
|
||||
&:before{
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup_close{
|
||||
position: absolute !important;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: 9999;
|
||||
|
||||
font-size: 12px !important;
|
||||
color: $very-dark-gray;
|
||||
|
||||
&:hover{
|
||||
color: $black;
|
||||
}
|
||||
|
||||
a{
|
||||
color: $very-dark-gray;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover{
|
||||
color: $black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fieldset {
|
||||
padding: 0;
|
||||
|
||||
margin-bottom: 16px;
|
||||
|
||||
div.variable_name {
|
||||
background-color: $light-gray;
|
||||
display:flex;
|
||||
flex-direction: row;
|
||||
padding: 8px 11px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
|
||||
min-height: 45px;
|
||||
|
||||
div.osnovno {
|
||||
|
||||
display:flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
p, span {
|
||||
margin-right: 8px;
|
||||
|
||||
&.faicon {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.urejanje {
|
||||
font-size: 14px !important;
|
||||
|
||||
select.dropdown {
|
||||
margin: 0 16px 0 8px !important;
|
||||
width: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.variable_content {
|
||||
box-sizing: border-box;
|
||||
padding: 8px 11px;
|
||||
|
||||
div.setting_holder {
|
||||
|
||||
margin-bottom: 8px;
|
||||
min-height: 28px;
|
||||
|
||||
&.horizontal {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
div.setting_item {
|
||||
label {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
select.dropdown {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input.text {
|
||||
width: 140px;
|
||||
margin: 0 8px 0 0;
|
||||
}
|
||||
|
||||
span.faicon {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.setting_holder {
|
||||
|
||||
&.horizontal {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
|
||||
div.inline {
|
||||
margin-top: 0;
|
||||
|
||||
button {
|
||||
margin: 0 0 0 8px;
|
||||
min-width: 110px;
|
||||
}
|
||||
|
||||
input {
|
||||
margin: 0 0 0 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
ul.recode_number_sort {
|
||||
padding: 0px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user