Redesign - analize - povprecja
This commit is contained in:
parent
64ac039f1a
commit
153f0677fe
@ -237,28 +237,26 @@ class SurveyMeans{
|
|||||||
|
|
||||||
function displayDropdowns() {
|
function displayDropdowns() {
|
||||||
global $lang;
|
global $lang;
|
||||||
|
|
||||||
$variables1 = $this->getVariableList(1);
|
$variables1 = $this->getVariableList(1);
|
||||||
$variables2 = $this->getVariableList(2);
|
$variables2 = $this->getVariableList(2);
|
||||||
|
|
||||||
echo '<div id="meansLeftDropdowns" >';
|
|
||||||
if ((int)$this->variabla1['0']['seq'] > 0) {
|
echo '<div id="meansLeftHolder">';
|
||||||
echo '<span class="pointer space_means_new" > </span>';
|
|
||||||
}
|
echo '<span class="title">'.$lang['srv_means_label1'].'</span>';
|
||||||
echo $lang['srv_means_label1'];
|
|
||||||
echo '<br />';
|
|
||||||
# iz header datoteke preberemo spremenljivke
|
# iz header datoteke preberemo spremenljivke
|
||||||
#js: $("#means_variable_1, #means_variable_2").live('click', function() {})
|
#js: $("#means_variable_1, #means_variable_2").live('click', function() {})
|
||||||
if (count($this->variabla1) > 0) {
|
if (count($this->variabla1) > 0) {
|
||||||
$br=null;
|
|
||||||
if ((int)$this->variabla1['0']['seq'] > 0) {
|
echo '<div id="meansLeftDropdowns">';
|
||||||
echo '<span class="pointer" id="means_add_new" onclick="means_add_new_variable(\'1\');"><span class="faicon add small icon-as_link" title=""></span></span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($this->variabla1 AS $_key => $variabla1) {
|
foreach($this->variabla1 AS $_key => $variabla1) {
|
||||||
echo $_br;
|
|
||||||
echo '<span id="v1_'.$_key.'">';
|
|
||||||
|
|
||||||
echo '<select name="means_variable_1" id="means_variable_1" onchange="change_means(); return false;" autocomplete="off">';
|
echo '<div id="v1_'.$_key.'" class="variabla_line">';
|
||||||
|
|
||||||
|
echo '<select name="means_variable_1" id="means_variable_1" class="dropdown large" onchange="change_means(); return false;" autocomplete="off">';
|
||||||
|
|
||||||
# ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
|
# ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
|
||||||
if ( $variabla1['seq'] == null || $variabla1['seq'] == 0 ) {
|
if ( $variabla1['seq'] == null || $variabla1['seq'] == 0 ) {
|
||||||
@ -276,38 +274,39 @@ class SurveyMeans{
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo '</select>';
|
echo '</select>';
|
||||||
|
|
||||||
if (count($this->variabla1) > 1) {
|
if (count($this->variabla1) > 1) {
|
||||||
echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
|
echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle" title=""></span></span>';
|
||||||
} else {
|
|
||||||
#echo '<span class="space_means_new"> </span>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$_br = '<br/><span class="space_means_new"> </span>';
|
echo '</div>';
|
||||||
echo '</span>';
|
|
||||||
}
|
|
||||||
$_br = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div id="meansRightDropdowns">';
|
// Gumb za dodajanje spremenljivke
|
||||||
if ((int)$this->variabla1['0']['seq'] > 0) {
|
if ((int)$this->variabla1['0']['seq'] > 0) {
|
||||||
echo '<span class="pointer space_means_new" > </span>';
|
echo '<button class="blue small" id="means_add_new" onclick="means_add_new_variable(\'1\');">'.$lang['srv_multicrosstabs_add'].'</span>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo $lang['srv_means_label2'];
|
|
||||||
echo '<br />';
|
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
echo '<div id="meansRightHolder">';
|
||||||
|
|
||||||
|
echo '<span class="title">'.$lang['srv_means_label2'].'</span>';
|
||||||
|
|
||||||
# za vsako novo spremenljivko 2 nardimo svoj select
|
# za vsako novo spremenljivko 2 nardimo svoj select
|
||||||
if (count($this->variabla2) > 0) {
|
if (count($this->variabla2) > 0) {
|
||||||
if ((int)$this->variabla1['0']['seq'] > 0) {
|
|
||||||
echo '<span class="pointer" id="means_add_new" onclick="means_add_new_variable(\'2\');"><span class="faicon add small icon-as_link" title="'.'"></span></span>';
|
echo '<div id="meansRightDropdowns">';
|
||||||
}
|
|
||||||
|
|
||||||
foreach($this->variabla2 AS $_key => $variabla2) {
|
foreach($this->variabla2 AS $_key => $variabla2) {
|
||||||
echo $_br;
|
|
||||||
echo '<span id="v2_'.$_key.'">';
|
echo '<div id="v2_'.$_key.'" class="variabla_line">';
|
||||||
echo '<select name="means_variable_2" id="means_variable_2" onchange="change_means(); return false;" autocomplete="off"'
|
|
||||||
|
echo '<select name="means_variable_2" id="means_variable_2" class="dropdown large" onchange="change_means(); return false;" autocomplete="off"'
|
||||||
. ((int)$this->variabla1['0']['seq'] > 0 ? '' : ' disabled="disabled" ')
|
. ((int)$this->variabla1['0']['seq'] > 0 ? '' : ' disabled="disabled" ')
|
||||||
.'>';
|
.'>';
|
||||||
|
|
||||||
@ -332,28 +331,44 @@ class SurveyMeans{
|
|||||||
|
|
||||||
}
|
}
|
||||||
echo '</select>';
|
echo '</select>';
|
||||||
|
|
||||||
if (count($this->variabla2) > 1) {
|
if (count($this->variabla2) > 1) {
|
||||||
echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
|
echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
|
||||||
} else {
|
|
||||||
echo '<span class="space_means_new"> </span>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$_br = '<br/><span class="space_means_new"> </span>';
|
echo '</div>';
|
||||||
echo '</span>';
|
}
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
// Gumb za dodajanje spremenljivke
|
||||||
|
if ((int)$this->variabla1['0']['seq'] > 0) {
|
||||||
|
echo '<button class="blue small" id="means_add_new" onclick="means_add_new_variable(\'2\');">'.$lang['srv_multicrosstabs_add'].'</button>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<span id="meansSubSetting" class="floatLeft spaceLeft">';
|
|
||||||
|
echo '<div id="meansSubSetting">';
|
||||||
|
|
||||||
|
echo '<span class="title">'.$lang['settings'].':</span>';
|
||||||
|
|
||||||
if (count($this->variabla2) > 1) {
|
if (count($this->variabla2) > 1) {
|
||||||
echo '<label><input id="chkMeansSeperate" type="checkbox" onchange="changeMeansSubSetting();" '.($this->sessionData['means']['meansSeperateTables']==true?' checked="checked"':'' ).'> '.$lang['srv_means_setting_1'].'</label>';
|
|
||||||
|
|
||||||
echo '<br /><span id="spanMeansJoinPercentage"'.($this->sessionData['means']['meansSeperateTables']!=true?'':' class="displayNone"').'><label><input id="chkMeansJoinPercentage" type="checkbox" onchange="changeMeansSubSetting();" '.($this->sessionData['means']['meansJoinPercentage']==true?' checked="checked"':'' ).'> '.$lang['srv_means_setting_2'].'</label></span>';
|
echo '<div class="setting_line">';
|
||||||
|
echo ' <input id="chkMeansSeperate" type="checkbox" onchange="changeMeansSubSetting();" '.($this->sessionData['means']['meansSeperateTables']==true?' checked="checked"':'' ).'><label for="chkMeansSeperate">'.$lang['srv_means_setting_1'].'</label>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
echo '<div class="setting_line">';
|
||||||
|
echo ' <span id="spanMeansJoinPercentage"'.($this->sessionData['means']['meansSeperateTables']!=true?'':' class="displayNone"').'><input id="chkMeansJoinPercentage" type="checkbox" onchange="changeMeansSubSetting();" '.($this->sessionData['means']['meansJoinPercentage']==true?' checked="checked"':'' ).'><label for="chkMeansJoinPercentage">'.$lang['srv_means_setting_2'].'</label></span>';
|
||||||
|
echo '</div>';
|
||||||
}
|
}
|
||||||
echo '<br /><label><input id="showChart" type="checkbox" onchange="showTableChart(\'mean\');" '.($this->sessionData['mean_charts']['showChart']==true?' checked="checked"':'' ).'> '.$lang['srv_show_charts'].'</label>';
|
|
||||||
echo '</span>';
|
|
||||||
|
|
||||||
echo '<br class="clr"/>';
|
echo '<div class="setting_line">';
|
||||||
|
echo ' <input id="showChart" type="checkbox" onchange="showTableChart(\'mean\');" '.($this->sessionData['mean_charts']['showChart']==true?' checked="checked"':'' ).'><label for="showChart">'.$lang['srv_show_charts'].'</label>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
// Ikone za izvoz (so tukaj da se refreshajo ob ajax klicu)
|
// Ikone za izvoz (so tukaj da se refreshajo ob ajax klicu)
|
||||||
$this->displayExport();
|
$this->displayExport();
|
||||||
@ -363,7 +378,6 @@ class SurveyMeans{
|
|||||||
global $lang;
|
global $lang;
|
||||||
global $admin_type;
|
global $admin_type;
|
||||||
|
|
||||||
$br='';
|
|
||||||
$means = array();
|
$means = array();
|
||||||
|
|
||||||
# če ne uporabljamo privzetega časovnega profila izpišemo opozorilo
|
# če ne uporabljamo privzetega časovnega profila izpišemo opozorilo
|
||||||
@ -379,6 +393,7 @@ class SurveyMeans{
|
|||||||
$SR = new SurveyRecoding($this->sid);
|
$SR = new SurveyRecoding($this->sid);
|
||||||
$SR -> getProfileString();
|
$SR -> getProfileString();
|
||||||
|
|
||||||
|
|
||||||
if ($this->getSelectedVariables(1) !== null && $this->getSelectedVariables(2) !== null) {
|
if ($this->getSelectedVariables(1) !== null && $this->getSelectedVariables(2) !== null) {
|
||||||
$variables1 = $this->getSelectedVariables(2);
|
$variables1 = $this->getSelectedVariables(2);
|
||||||
$variables2 = $this->getSelectedVariables(1);
|
$variables2 = $this->getSelectedVariables(1);
|
||||||
@ -423,9 +438,8 @@ class SurveyMeans{
|
|||||||
if (is_array($means) && count($means) > 0) {
|
if (is_array($means) && count($means) > 0) {
|
||||||
$counter=0;
|
$counter=0;
|
||||||
foreach ($means AS $mean_sub_grup) {
|
foreach ($means AS $mean_sub_grup) {
|
||||||
echo($br);
|
|
||||||
$this->displayMeansTable($mean_sub_grup);
|
echo '<div class="means_table_holder">';
|
||||||
$br='<br />';
|
|
||||||
|
|
||||||
// Zvezdica za vkljucitev v porocilo
|
// Zvezdica za vkljucitev v porocilo
|
||||||
$spr2 = $mean_sub_grup[0]['v1']['seq'].'-'.$mean_sub_grup[0]['v1']['spr'].'-'.$mean_sub_grup[0]['v1']['grd'];
|
$spr2 = $mean_sub_grup[0]['v1']['seq'].'-'.$mean_sub_grup[0]['v1']['spr'].'-'.$mean_sub_grup[0]['v1']['grd'];
|
||||||
@ -433,12 +447,17 @@ class SurveyMeans{
|
|||||||
SurveyAnalysis::Init($this->sid);
|
SurveyAnalysis::Init($this->sid);
|
||||||
SurveyAnalysis::addCustomReportElement($type=6, $sub_type=0, $spr1, $spr2);
|
SurveyAnalysis::addCustomReportElement($type=6, $sub_type=0, $spr1, $spr2);
|
||||||
|
|
||||||
|
// Izris tabele
|
||||||
|
$this->displayMeansTable($mean_sub_grup);
|
||||||
|
|
||||||
// Izrisemo graf za tabelo - zaenkrat samo admin
|
// Izrisemo graf za tabelo - zaenkrat samo admin
|
||||||
if($this->sessionData['mean_charts']['showChart'] && $_GET['m'] != 'analysis_creport'){
|
if($this->sessionData['mean_charts']['showChart'] && $_GET['m'] != 'analysis_creport'){
|
||||||
$tableChart = new SurveyTableChart($this->sid, $this, 'mean', $counter);
|
$tableChart = new SurveyTableChart($this->sid, $this, 'mean', $counter);
|
||||||
$tableChart->display();
|
$tableChart->display();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
$counter++;
|
$counter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -472,14 +491,19 @@ class SurveyMeans{
|
|||||||
$href_pdf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=mean_izpis&anketa=' . $this->sid);
|
$href_pdf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=mean_izpis&anketa=' . $this->sid);
|
||||||
$href_rtf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=mean_izpis_rtf&anketa=' . $this->sid);
|
$href_rtf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=mean_izpis_rtf&anketa=' . $this->sid);
|
||||||
$href_xls = makeEncodedIzvozUrlString('izvoz.php?b=export&m=mean_izpis_xls&anketa=' . $this->sid);
|
$href_xls = makeEncodedIzvozUrlString('izvoz.php?b=export&m=mean_izpis_xls&anketa=' . $this->sid);
|
||||||
|
|
||||||
|
|
||||||
echo '<script>';
|
echo '<script>';
|
||||||
|
|
||||||
# nastavimopravilne linke
|
# nastavimopravilne linke
|
||||||
echo '$("#secondNavigation_links a#meansDoPdf").attr("href", "'.$href_pdf.'");';
|
echo '$("#secondNavigation_links a#meansDoPdf").attr("href", "'.$href_pdf.'");';
|
||||||
echo '$("#secondNavigation_links a#meansDoRtf").attr("href", "'.$href_rtf.'");';
|
echo '$("#secondNavigation_links a#meansDoRtf").attr("href", "'.$href_rtf.'");';
|
||||||
echo '$("#secondNavigation_links a#meansDoXls").attr("href", "'.$href_xls.'");';
|
echo '$("#secondNavigation_links a#meansDoXls").attr("href", "'.$href_xls.'");';
|
||||||
|
|
||||||
# prikažemo linke
|
# prikažemo linke
|
||||||
echo '$("#hover_export_icon").removeClass("hidden");';
|
echo '$("#hover_export_icon").removeClass("hidden");';
|
||||||
echo '$("#secondNavigation_links a").removeClass("hidden");';
|
echo '$("#secondNavigation_links a").removeClass("hidden");';
|
||||||
|
|
||||||
echo '</script>';
|
echo '</script>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1071,36 +1095,25 @@ class SurveyMeans{
|
|||||||
|
|
||||||
$showSingleUnits = $this->sessionData['means']['meansJoinPercentage']==true && $this->sessionData['means']['meansSeperateTables'] == false;
|
$showSingleUnits = $this->sessionData['means']['meansJoinPercentage']==true && $this->sessionData['means']['meansSeperateTables'] == false;
|
||||||
|
|
||||||
# izrišemo tabelo
|
|
||||||
echo '<table class="anl_tbl_crosstab fullWidth" style="margin-top:10px;">';
|
|
||||||
echo '<colgroup>';
|
|
||||||
echo '<col style="width:auto; min-width:30px;" />';
|
|
||||||
echo '<col style="width:auto; min-width:30px; " />';
|
|
||||||
for ($i = 0; $i < $cols; $i++) {
|
|
||||||
echo '<col style="width:auto; min-width:30px;" />';
|
|
||||||
if ($showSingleUnits == false) {
|
|
||||||
echo '<col style="width:auto; min-width:30px;" />';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($showSingleUnits == true) {
|
|
||||||
echo '<col style="width:auto; min-width:30px;" />';
|
|
||||||
}
|
|
||||||
echo '</colgroup>';
|
|
||||||
|
|
||||||
echo '<tr>';
|
# izrišemo tabelo
|
||||||
#echo '<td>xx </td>';
|
echo '<table class="table_means">';
|
||||||
|
|
||||||
|
|
||||||
|
echo '<tr class="row1">';
|
||||||
|
|
||||||
# ime variable
|
# ime variable
|
||||||
# teksti labele:
|
# teksti labele:
|
||||||
$label2 = $this->getSpremenljivkaTitle($_means[0]['v2']);
|
$label2 = $this->getSpremenljivkaTitle($_means[0]['v2']);
|
||||||
if ($showSingleUnits == false) {
|
if ($showSingleUnits == false) {
|
||||||
$span = ' colspan="2"';
|
$span = ' colspan="2"';
|
||||||
}
|
}
|
||||||
echo '<td class="anl_bt anl_bl anl_ac rsdl_bck_title ctbCll" rowspan="2">';
|
echo '<td class="cell_question" rowspan="2">';
|
||||||
echo $label2;
|
echo $label2;
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
for ($i = 0; $i < $cols; $i++) {
|
for ($i = 0; $i < $cols; $i++) {
|
||||||
echo '<td class="anl_bt anl_bl anl_br anl_ac rsdl_bck_title ctbCll"'.$span.'>';
|
echo '<td class="cell_question" '.$span.'>';
|
||||||
$label1 = $this->getSpremenljivkaTitle($_means[$i]['v1']);
|
$label1 = $this->getSpremenljivkaTitle($_means[$i]['v1']);
|
||||||
echo $label1;
|
echo $label1;
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
@ -1109,30 +1122,38 @@ class SurveyMeans{
|
|||||||
echo '<td class="anl_bl"> </td>';
|
echo '<td class="anl_bl"> </td>';
|
||||||
}
|
}
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
echo '<tr>';
|
|
||||||
|
|
||||||
|
echo '<tr class="row2">';
|
||||||
|
|
||||||
for ($i = 0; $i < $cols; $i++) {
|
for ($i = 0; $i < $cols; $i++) {
|
||||||
|
|
||||||
#Povprečje
|
#Povprečje
|
||||||
echo '<td class="anl_bt anl_bl anl_br anl_ac rsdl_bck_variable1 ctbCll" >';
|
echo '<td class="cell_value">';
|
||||||
echo $lang['srv_means_label'];
|
echo $lang['srv_means_label'];
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
#enote
|
#enote
|
||||||
if ($showSingleUnits == false) {
|
if ($showSingleUnits == false) {
|
||||||
echo '<td class="anl_bl anl_bt anl_br anl_ac red anl_ita anl_bck_text_0 rsdl_bck_variable1 ctbCll">'.$lang['srv_means_label4'].'</td>';
|
echo '<td class="cell_value">'.$lang['srv_means_label4'].'</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($showSingleUnits == true) {
|
if ($showSingleUnits == true) {
|
||||||
echo '<td class="anl_bl anl_bt anl_br anl_ac red anl_ita anl_bck_text_0 rsdl_bck_variable1 ctbCll">'.$lang['srv_means_label4'].'</td>';
|
echo '<td class="cell_value">'.$lang['srv_means_label4'].'</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
|
|
||||||
if (count($_means[0]['options']) > 0) {
|
if (count($_means[0]['options']) > 0) {
|
||||||
|
|
||||||
foreach ($_means[0]['options'] as $ckey2 =>$crossVariabla2) {
|
foreach ($_means[0]['options'] as $ckey2 =>$crossVariabla2) {
|
||||||
$units_per_row = 0;
|
$units_per_row = 0;
|
||||||
|
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td class="anl_bt anl_bl anl_ac rsdl_bck_variable1 ctbCll">';
|
|
||||||
|
echo '<td class="cell_question">';
|
||||||
echo $crossVariabla2['naslov'];
|
echo $crossVariabla2['naslov'];
|
||||||
# če ni tekstovni odgovor dodamo key
|
# če ni tekstovni odgovor dodamo key
|
||||||
if ($crossVariabla2['type'] !== 't' ) {
|
if ($crossVariabla2['type'] !== 't' ) {
|
||||||
@ -1145,48 +1166,61 @@ class SurveyMeans{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
# celice z vsebino
|
# celice z vsebino
|
||||||
for ($i = 0; $i < $cols; $i++) {
|
for ($i = 0; $i < $cols; $i++) {
|
||||||
echo '<td class="ct_in_cell anl_br'.'" k1="'.$ckey1.'" k2="'.$ckey2.'" n1="'.$crossVariabla1['naslov'].'" n2="'.$crossVariabla2['naslov'].'" v1="'.$crossVariabla1['vr_id'].'" v2="'.$crossVariabla2['vr_id'].'">';
|
echo '<td class="cell_value" k1="'.$ckey1.'" k2="'.$ckey2.'" n1="'.$crossVariabla1['naslov'].'" n2="'.$crossVariabla2['naslov'].'" v1="'.$crossVariabla1['vr_id'].'" v2="'.$crossVariabla2['vr_id'].'">';
|
||||||
echo $this->formatNumber($_means[$i]['result'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
|
echo $this->formatNumber($_means[$i]['result'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
if ($showSingleUnits == false) {
|
if ($showSingleUnits == false) {
|
||||||
echo '<td class="anl_ac anl_bl anl_bt anl_br rsdl_bck0 crostabSuma">';
|
echo '<td class="cell_value">';
|
||||||
echo (int)$_means[$i]['sumaVrstica'][$ckey2];
|
echo (int)$_means[$i]['sumaVrstica'][$ckey2];
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$units_per_row = max($units_per_row,(int)$_means[$i]['sumaVrstica'][$ckey2]);
|
$units_per_row = max($units_per_row,(int)$_means[$i]['sumaVrstica'][$ckey2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($showSingleUnits == true) {
|
if ($showSingleUnits == true) {
|
||||||
echo '<td class="anl_ac anl_bl anl_bt anl_br rsdl_bck0 crostabSuma">';
|
echo '<td class="cell_value">';
|
||||||
echo $units_per_row;
|
echo $units_per_row;
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
$max_units += $units_per_row;
|
$max_units += $units_per_row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '<tr>';
|
|
||||||
echo '<td class="anl_bb anl_bt anl_bl anl_ac red anl_ita anl_bck_text_0 rsdl_bck_variable1 ctbCll">'.$lang['srv_means_label3'].'</td>';
|
|
||||||
for ($i = 0; $i < $cols; $i++) {
|
|
||||||
echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
|
|
||||||
|
|
||||||
|
|
||||||
|
echo '<tr>';
|
||||||
|
|
||||||
|
echo '<td class="cell_value">'.$lang['srv_means_label3'].'</td>';
|
||||||
|
|
||||||
|
for ($i = 0; $i < $cols; $i++) {
|
||||||
|
|
||||||
|
echo '<td class="cell_value">';
|
||||||
echo $this->formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
|
echo $this->formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
if ($showSingleUnits == false) {
|
if ($showSingleUnits == false) {
|
||||||
echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
|
echo '<td class="cell_value">';
|
||||||
echo (int)$_means[$i]['sumaSkupna'];
|
echo (int)$_means[$i]['sumaSkupna'];
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($showSingleUnits == true) {
|
if ($showSingleUnits == true) {
|
||||||
echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
|
echo '<td class="cell_value">';
|
||||||
echo $max_units;
|
echo $max_units;
|
||||||
echo '</tr>';
|
echo '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1236,10 +1270,10 @@ class SurveyMeans{
|
|||||||
|
|
||||||
|
|
||||||
if ($which == '1') {
|
if ($which == '1') {
|
||||||
echo '<br/>';
|
echo '<div class="variabla_line">';
|
||||||
echo '<span class="space_means_new"> </span>';
|
|
||||||
echo '<select name="means_variable_'.$which.'" id="means_variable_'.$which.'" onchange="change_means(); return false;" autocomplete="off"'
|
echo '<select name="means_variable_'.$which.'" id="means_variable_'.$which.'" class="dropdown large" onchange="change_means(); return false;" autocomplete="off">';
|
||||||
.'>';
|
|
||||||
# ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
|
# ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
|
||||||
if ( $variabla1['seq'] == null || $variabla1['seq'] == 0 ) {
|
if ( $variabla1['seq'] == null || $variabla1['seq'] == 0 ) {
|
||||||
echo '<option value="0" selected="selected" >'. $lang['srv_analiza_crosstab_izberi_more'].'</option>';
|
echo '<option value="0" selected="selected" >'. $lang['srv_analiza_crosstab_izberi_more'].'</option>';
|
||||||
@ -1254,20 +1288,23 @@ class SurveyMeans{
|
|||||||
. $variable['variableNaslov'] . '</option>';
|
. $variable['variableNaslov'] . '</option>';
|
||||||
|
|
||||||
}
|
}
|
||||||
echo '</select>';
|
|
||||||
echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
|
|
||||||
|
|
||||||
} else {
|
echo '</select>';
|
||||||
# which = 2
|
|
||||||
echo '<br/>';
|
echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle" title=""></span></span>';
|
||||||
echo '<span class="space_means_new"> </span>';
|
|
||||||
echo '<select name="means_variable_'.$which.'" id="means_variable_'.$which.'" onchange="change_means(); return false;" autocomplete="off"'
|
echo '</div>';
|
||||||
.'>';
|
}
|
||||||
|
else {
|
||||||
|
echo '<div class="variabla_line">';
|
||||||
|
|
||||||
|
echo '<select name="means_variable_'.$which.'" id="means_variable_'.$which.'" class="dropdown large" onchange="change_means(); return false;" autocomplete="off">';
|
||||||
|
|
||||||
# ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
|
# ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
|
||||||
if ((int)$this->variabla1['0']['seq'] > 0) {
|
if ((int)$this->variabla1['0']['seq'] > 0) {
|
||||||
echo '<option value="0" selected="selected" >'. $lang['srv_analiza_crosstab_najprej_prvo'].'</option>';
|
echo '<option value="0" selected="selected" >'. $lang['srv_analiza_crosstab_najprej_prvo'].'</option>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
# če druga variabla ni izbrana dodamo tekst za izbiro druge variable
|
# če druga variabla ni izbrana dodamo tekst za izbiro druge variable
|
||||||
echo '<option value="0" selected="selected">'. $lang['srv_analiza_crosstab_izberi_more'].'</option>';
|
echo '<option value="0" selected="selected">'. $lang['srv_analiza_crosstab_izberi_more'].'</option>';
|
||||||
}
|
}
|
||||||
@ -1282,7 +1319,10 @@ class SurveyMeans{
|
|||||||
|
|
||||||
}
|
}
|
||||||
echo '</select>';
|
echo '</select>';
|
||||||
echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
|
|
||||||
|
echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle" title=""></span></span>';
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,15 +68,10 @@ function means_add_new_variable(which) {
|
|||||||
var spr = new Array();
|
var spr = new Array();
|
||||||
var grid = new Array();
|
var grid = new Array();
|
||||||
|
|
||||||
if (which == '2' ) {
|
|
||||||
//$('#crossRightHolder #crosstab_add_new').hide();
|
|
||||||
} else {
|
|
||||||
//$('#crossLeftHolder #crosstab_add_new').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('select[name=means_variable_'+which+']').each(function(index,el) {
|
$('select[name=means_variable_'+which+']').each(function(index,el) {
|
||||||
sequence.push($(el).val());
|
sequence.push($(el).val());
|
||||||
});
|
});
|
||||||
|
|
||||||
$('select[name=means_variable_'+which+'] option:selected').each(function(index,el) {
|
$('select[name=means_variable_'+which+'] option:selected').each(function(index,el) {
|
||||||
spr.push($(el).attr("spr_id"));
|
spr.push($(el).attr("spr_id"));
|
||||||
grid.push($(el).attr("grd_id"));
|
grid.push($(el).attr("grd_id"));
|
||||||
@ -94,9 +89,9 @@ function means_add_new_variable(which) {
|
|||||||
function means_remove_variable(what) {
|
function means_remove_variable(what) {
|
||||||
|
|
||||||
$(what).parent().remove();
|
$(what).parent().remove();
|
||||||
if ( $(what).parent().find('select').val() > 0 ) {
|
//if ( $(what).parent().find('select').val() > 0 ) {
|
||||||
change_means();
|
change_means();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
function changeMeansSubSetting() {
|
function changeMeansSubSetting() {
|
||||||
var chkMeansSeperate = $("#chkMeansSeperate").is(':checked') ? 1 : 0;
|
var chkMeansSeperate = $("#chkMeansSeperate").is(':checked') ? 1 : 0;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
|||||||
#div_analiza_data {
|
#div_analiza_data,
|
||||||
|
#div_means_data{
|
||||||
|
|
||||||
.div_analiza_holder {
|
.div_analiza_holder {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1,70 +1,146 @@
|
|||||||
|
|
||||||
.space_means_new {
|
#div_means_dropdowns{
|
||||||
text-align: center;
|
display: flex;
|
||||||
vertical-align: middle;
|
justify-content: center;
|
||||||
display: inline-block;
|
|
||||||
width: 20px;
|
.title{
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#meansLeftHolder,
|
||||||
|
#meansRightHolder{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
margin-right: 64px;
|
||||||
|
|
||||||
|
#meansLeftDropdowns,
|
||||||
|
#meansRightDropdowns{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.variabla_line{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.faicon{
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 8px;
|
||||||
|
|
||||||
|
&::before{
|
||||||
|
color: $blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button{
|
||||||
|
width: 190px;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#meansSubSetting{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.setting_line{
|
||||||
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
#means_add_new {
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
display: inline-block;
|
|
||||||
width: 20px;
|
|
||||||
}
|
}
|
||||||
#means_remove {
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
display: inline-block;
|
|
||||||
width: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#div_means_data {
|
#div_means_data {
|
||||||
margin-top: 10px;
|
display: flex;
|
||||||
}
|
flex-direction: column;
|
||||||
#meansLeftDropdowns {
|
|
||||||
float: left;
|
margin-top: 64px;
|
||||||
padding-right: 10px;
|
|
||||||
select {
|
.means_table_holder{
|
||||||
width: 240px;
|
margin-bottom: 16px;
|
||||||
font-size: 12px;
|
border-bottom: 1px $gray solid;
|
||||||
option {
|
|
||||||
overflow: hidden;
|
&:last-child{
|
||||||
font-size: 12px;
|
margin-bottom: 0;
|
||||||
|
border: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tableChart{
|
||||||
|
margin: 16px auto;
|
||||||
}
|
}
|
||||||
#meansRightDropdowns {
|
|
||||||
float: left;
|
.custom_report_include{
|
||||||
padding-right: 10px;
|
display: flex;
|
||||||
select {
|
justify-content: flex-end;
|
||||||
width: 240px;
|
|
||||||
font-size: 12px;
|
margin-bottom: 8px;
|
||||||
option {
|
|
||||||
overflow: hidden;
|
a{
|
||||||
font-size: 12px;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.table_means{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
tr{
|
||||||
|
|
||||||
|
&.row1{
|
||||||
|
|
||||||
}
|
}
|
||||||
.space_means_new {
|
|
||||||
|
&.row2{
|
||||||
|
|
||||||
|
td.cell_value{
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
background-color: $light-gray2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
td{
|
||||||
|
border: 1px $gray solid;
|
||||||
|
|
||||||
|
&.cell_var{
|
||||||
|
width: 260px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.cell_question{
|
||||||
|
a{
|
||||||
|
text-decoration: none;
|
||||||
|
color: $black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.cell_value{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
|
||||||
display: inline-block;
|
|
||||||
width: 20px;
|
|
||||||
}
|
}
|
||||||
#means_add_new {
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
display: inline-block;
|
|
||||||
width: 20px;
|
|
||||||
}
|
}
|
||||||
#means_remove {
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
display: inline-block;
|
|
||||||
width: 20px;
|
|
||||||
}
|
}
|
||||||
#meansImgHolder {
|
|
||||||
float: left;
|
|
||||||
padding: 0px 3px;
|
|
||||||
display: inline-block;
|
table.cell_table{
|
||||||
|
|
||||||
|
> tbody > tr{
|
||||||
|
border-bottom: 1px $gray dashed;
|
||||||
|
|
||||||
|
&:last-child{
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.cell_table tr td{
|
||||||
|
border-right: 1px $yellow solid;
|
||||||
|
|
||||||
|
&:last-child{
|
||||||
|
border-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user