[Redizajn 1KA] - Podatki --> Izračuni --> Izračunane vrednosti - v1
This commit is contained in:
parent
7cef39131d
commit
1a2aed7d77
@ -8822,28 +8822,38 @@ class Branching {
|
||||
|
||||
echo '<div id="bottom_space">';
|
||||
|
||||
echo '<div class="setting_horizontal_wrapper">';
|
||||
|
||||
$row = Cache::srv_spremenljivka(-$condition);
|
||||
if ($condition < 0) {
|
||||
echo '<p style="float:left; padding:0; margin:0; margin-left:20px">'.$lang['srv_variable'].': <input type="text" id="variable_'.(-$condition).'" value="'.$row['variable'].'" onkeyup="calculation_edit_variable(\''.-$condition.'\');" style="width:60px" /></p>';
|
||||
if ($condition < 0) {
|
||||
echo '<div class="setting_holder">';
|
||||
echo '<label for="variable_'.(-$condition).'">'.$lang['srv_variable'].'</label>';
|
||||
echo '<input type="text" class="large" id="variable_'.(-$condition).'" value="'.$row['variable'].'" onkeyup="calculation_edit_variable(\''.-$condition.'\');" />';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Nastavitev števila decimalk
|
||||
echo '<p style="clear:both;float:left; padding:0; margin:10px 0 0 20px;">'.$lang['srv_results_num_digits'].':';
|
||||
echo ' <select id="decimalna_'.(-$condition).'" onChange="calculation_edit_decimalna(\''.-$condition.'\');">';
|
||||
echo '<div class="setting_holder">';
|
||||
echo '<label for="decimalna_'.(-$condition).'">'.$lang['srv_results_num_digits'].'</label>';
|
||||
echo ' <select class="dropdown large w130" id="decimalna_'.(-$condition).'" onChange="calculation_edit_decimalna(\''.-$condition.'\');">';
|
||||
for($i=0; $i<=10; $i++){
|
||||
echo ' <option value="'.$i.'" '.($row['decimalna'] == $i ? ' selected="selected"' : '').'>'.$i.'</option>';
|
||||
}
|
||||
echo '</select>';
|
||||
echo '</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// Nastavitev kako se obravnava missing v kalkulaciji (kot 0 ali za celo kalkulacijo kot -88)
|
||||
// Nastavitev, kako se obravnava missing v kalkulaciji (kot 0 ali za celo kalkulacijo kot -88)
|
||||
$newParams = new enkaParameters($row['params']);
|
||||
$calcMissing = $newParams->get('calcMissing', '0');
|
||||
echo '<p style="float:left; padding:0; margin:10px 0 0 20px;">';
|
||||
echo '<input type="checkbox" class="enka-admin-custom" value="1" '.($calcMissing == 1 ? ' checked="checked"' : '').' id="calcMissing_'.(-$condition).'" onChange="calculation_edit_missing(\''.-$condition.'\');"> ';
|
||||
echo '<span class="enka-checkbox-radio"></span>';
|
||||
echo '<label for="calcMissing_'.(-$condition).'">'.$lang['srv_editcalculation_missing'].'</label> '.Help::display('srv_calculation_missing');
|
||||
echo '</p>';
|
||||
echo '<div class="setting_holder">';
|
||||
echo '<input type="checkbox" value="1" '.($calcMissing == 1 ? ' checked="checked"' : '').' id="calcMissing_'.(-$condition).'" onChange="calculation_edit_missing(\''.-$condition.'\');"> ';
|
||||
echo '<label for="calcMissing_'.(-$condition).'">'.$lang['srv_editcalculation_missing'].' '.Help::display('srv_calculation_missing').'</label>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="condition_editing_close">';
|
||||
|
||||
@ -8862,7 +8872,6 @@ class Branching {
|
||||
echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="calculation_editing_close(\''.$condition.'\', \''.$vrednost.'\'); return false;"><span>'.$lang['srv_potrdi'].'</span></a>';
|
||||
echo '</span>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="arrows_more_calculation" onclick=" $(\'#calculation_editing_inner\').animate({ scrollTop: $(\'#calculation_editing_inner\').attr(\'scrollHeight\') }, 2000); "><img src="img_0/bullet_arrow_down.png" /> '.$lang['srv_more'].'</div>';
|
||||
@ -8918,7 +8927,7 @@ class Branching {
|
||||
<a href="#" onclick="calculation_add(\''.$condition.'\', \'1\', \''.$vrednost.'\'); return false;"><strong style="font-size:18px"> - </strong></a>,
|
||||
<a href="#" onclick="calculation_add(\''.$condition.'\', \'2\', \''.$vrednost.'\'); return false;"><strong style="font-size:18px"> * </strong></a>,
|
||||
<a href="#" onclick="calculation_add(\''.$condition.'\', \'3\', \''.$vrednost.'\'); return false;"><strong style="font-size:18px"> / </strong></a>
|
||||
</p><br><br>';
|
||||
</p>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -41,26 +41,33 @@ class SurveyPostProcess {
|
||||
function displayTab () {
|
||||
global $lang;
|
||||
|
||||
echo '<fieldset><legend>'.$lang['srv_compute'].'</legend>';
|
||||
echo '<fieldset id="calculations"><legend>'.$lang['srv_compute'].'</legend>';
|
||||
echo '<script>__vnosi=1;</script>';
|
||||
|
||||
$b = new Branching($this->anketa);
|
||||
|
||||
$sql = sisplet_query("SELECT s.id, s.naslov, s.variable FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND s.tip='22'");
|
||||
$count = 0;
|
||||
if (mysqli_num_rows($sql) > 0) {
|
||||
|
||||
echo '<p>'.$lang['srv_compute_list'].'</p>';
|
||||
echo '<p class="bottom16">'.$lang['srv_compute_list'].'</p>';
|
||||
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
|
||||
echo '<p>'.$row['naslov'].': <a href="" onclick="calculation_editing(\'-'.$row['id'].'\'); return false;"><b> '.$row['variable'].'= '.$b->calculations_display(-$row['id'], 1).'</b></a></p>';
|
||||
$count +=1;
|
||||
echo '<div class="icon_holder">';
|
||||
echo '<p>'.$row['naslov'].' '.$count.': '.$b->calculations_display(-$row['id'], 1).'</p>';
|
||||
echo '<span class="faicon edit aslink" onclick="calculation_editing(\'-'.$row['id'].'\'); return false;"></span>';
|
||||
echo '<span class="faicon trash empty aslink" onclick="brisi_spremenljivko(\''.$row['id'].'\'); return false;"></span>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '<p><a href="" onclick="spremenljivka_new(0, 0, 1, 0, 22); return false;">'.$lang['srv_add_compute'].'</a></p>';
|
||||
echo '<a class="noline" href="#" onClick="spremenljivka_new(0, 0, 1, 0, 22); return false;"><span class="faicon plus_circle link-right"></span>'.$lang['srv_add_compute'].'</a>';
|
||||
|
||||
if (mysqli_num_rows($sql) > 0) {
|
||||
echo '<span class="buttonwrapper floatLeft"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="postprocess_start_calculation(); return false;">'.$lang['srv_compute_start'].'</a></span>';
|
||||
echo '<div class="button_holder">';
|
||||
echo '<button class="medium blue" onclick="postprocess_start_calculation(); return false;">'.$lang['srv_compute_start'].'</button>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '</legend>';
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user