diff --git a/admin/survey/classes/surveyData/class.SurveyDataDisplay.php b/admin/survey/classes/surveyData/class.SurveyDataDisplay.php index 0a4506dfb..82e2c32d1 100644 --- a/admin/survey/classes/surveyData/class.SurveyDataDisplay.php +++ b/admin/survey/classes/surveyData/class.SurveyDataDisplay.php @@ -1428,46 +1428,10 @@ class SurveyDataDisplay{ echo ''; - // Nastavimo colgroup, da na njega vezemo vse sirine v tabeli, zaradi resizinga stolpcev - /*echo ''; - # colspan za ikonce - if ($stolpci > 0) { - echo '1 ? (' span="'.$stolpci.'"') : '').'>'; - } - - $spr_cont = 0; - foreach (self::$_HEADERS AS $spid => $spremenljivka) { - if (isset(self::$_SVP_PV[$spid]) && count($spremenljivka['grids']) > 0) { - if(self::$showLineNumber && $spr_cont+1 == self::$lineoffset) { - echo ''; - } - - // paginacija spremenljivk - if (self::$_VARS['spr_limit'] == 'all' || ($spr_cont >= $_spr_on_pages_start && $spr_cont < $_spr_on_pages_stop)) { - foreach ($spremenljivka['grids'] AS $gid => $grid) { - if (count ($grid['variables']) > 0) { - foreach ($grid['variables'] AS $vid => $variable ){ - echo ''; - } - } - } - } - $spr_cont++; - } - - } - echo '';*/ - + echo ''; - echo ''; + + echo ''; # colspan za ikonce if ($stolpci > 0) { @@ -1475,29 +1439,40 @@ class SurveyDataDisplay{ } # dodamo skrit stolpec uid - echo ''; + echo ''; $spr_cont = 0; foreach (self::$_HEADERS AS $spid => $spremenljivka) { + if($spremenljivka['tip'] == 'm') + $class = 'cell_info'; + elseif($spremenljivka['tip'] == 'sm') + $class = 'cell_paradata'; + else + $class = 'cell_data'; + if (isset(self::$_SVP_PV[$spid])) { if(self::$showLineNumber && $spr_cont+1 == self::$lineoffset) { - echo ''; } + // paginacija spremenljivk if (self::$_VARS['spr_limit'] == 'all' || ($spr_cont >= $_spr_on_pages_start && $spr_cont < $_spr_on_pages_stop)) { - echo ''; } + $spr_cont++; - } } - echo ''; + echo ''; + + + echo ''; # colspan za ikonce if ($stolpci > 0) { @@ -1509,10 +1484,18 @@ class SurveyDataDisplay{ $spr_cont = 0; foreach (self::$_HEADERS AS $spid => $spremenljivka) { + + if($spremenljivka['tip'] == 'm') + $class = 'cell_info'; + elseif($spremenljivka['tip'] == 'sm') + $class = 'cell_paradata'; + else + $class = 'cell_data'; + if (isset(self::$_SVP_PV[$spid]) && (count($spremenljivka['grids']) > 0 )) { if(self::$showLineNumber && $spr_cont+1 == self::$lineoffset) { - echo ''; } @@ -1522,13 +1505,13 @@ class SurveyDataDisplay{ foreach ($spremenljivka['grids'] AS $gid => $grid) { if($spremenljivka['tip'] == 16 || $spremenljivka['tip'] == 19 || $spremenljivka['tip'] == 20){ - echo ''; } else{ - echo ''; } } @@ -1537,7 +1520,10 @@ class SurveyDataDisplay{ } } - echo ''; + echo ''; + + + echo ''; # colspan za ikonce if ($stolpci > 0) { @@ -1550,10 +1536,18 @@ class SurveyDataDisplay{ $spr_cont = 0; $system_columns = array(); foreach (self::$_HEADERS AS $spid => $spremenljivka) { + + if($spremenljivka['tip'] == 'm') + $class = 'cell_info'; + elseif($spremenljivka['tip'] == 'sm') + $class = 'cell_paradata'; + else + $class = 'cell_data'; + if (isset(self::$_SVP_PV[$spid]) && count($spremenljivka['grids']) > 0) { if(self::$showLineNumber && $spr_cont+1 == self::$lineoffset) { - echo ''; } @@ -1562,7 +1556,8 @@ class SurveyDataDisplay{ foreach ($spremenljivka['grids'] AS $gid => $grid) { if (count ($grid['variables']) > 0) { foreach ($grid['variables'] AS $vid => $variable ){ - echo ''; @@ -1662,32 +1659,24 @@ class SurveyDataDisplay{ } // polovimo vrstice z statusom 5,6 in jih damo v začasno datoteko if (IS_WINDOWS) { - #$cmdLn1 = 'awk -F"'.STR_DLMT.'" "BEGIN {OFS=\"\x7C\"} '.self::$_CURRENT_STATUS_FILTER.' { print $0 }" '.self::$dataFileName.' > '.$tmp_files['filtred_status']; - #$out1 = shell_exec($cmdLn1); - # če smo predhodno sortirali - if (self::$do_sort == true) - { + + if (self::$do_sort == true){ $_command .= ' | gawk -F"'.STR_DLMT.'" "BEGIN {OFS=\"\x7C\"} '.self::$_CURRENT_STATUS_FILTER.' { print $0 }" '; #$_command = 'awk -F"'.STR_DLMT.'" "BEGIN {OFS=\"\x7C\"} '.self::$_CURRENT_STATUS_FILTER.' { print $0 }" '.self::$dataFileName; } - else - { + else{ $_command = 'gawk -F"'.STR_DLMT.'" "BEGIN {OFS=\"\x7C\"} '.self::$_CURRENT_STATUS_FILTER.' { print $0 }" '.self::$dataFileName; } + } + else { - } else { - #$cmdLn1 = 'awk -F"'.STR_DLMT.'" \'BEGIN {OFS="\x7C"} '.self::$_CURRENT_STATUS_FILTER.' { print $0 }\' '.self::$dataFileName.' > '.$tmp_files['filtred_status']; - #$out1 = shell_exec($cmdLn1); # če smo predhodno sortirali - if (self::$do_sort) - { + if (self::$do_sort){ $_command .= ' | awk -F"'.STR_DLMT.'" \'BEGIN {OFS="\x7C"} '.self::$_CURRENT_STATUS_FILTER.' { print $0 }\' '; } - else - { + else{ $_command = 'awk -F"'.STR_DLMT.'" \'BEGIN {OFS="\x7C"} '.self::$_CURRENT_STATUS_FILTER.' { print $0 }\' '.self::$dataFileName; } - } // pobrisemo vrstice ki ne vsebujejo iskalnega stringa (ce searchamo) in rdece boldamo rezultat @@ -1696,7 +1685,8 @@ class SurveyDataDisplay{ if (IS_WINDOWS) { $_command .= ' | sed "/'.$search.'/!d"'; $_command .= ' | sed "s*'.$search.'*'.$search.'*g"'; - } else { + } + else { $_command .= ' | sed \'/'.$search.'/!d\''; $_command .= ' | sed \'s*'.$search.'*'.$search.'*g\''; } @@ -1704,40 +1694,28 @@ class SurveyDataDisplay{ // paginacija po stolpcih (spremenljivkah) if (IS_WINDOWS) { - #$cmdLn1_1 = 'cut -d "|" -f 1,'.self::$_VARIABLE_FILTER.' '.$tmp_files['filtred_status'].' > '.$tmp_files['filtred_spr_pagination']; - #$out1 = shell_exec($cmdLn1_1); $_command .= ' | cut -d "|" -f 1,'.self::$_VARIABLE_FILTER; - } else { - #$cmdLn1_1 = 'cut -d \'|\' -f 1,'.self::$_VARIABLE_FILTER.' '.$tmp_files['filtred_status'].' > '.$tmp_files['filtred_spr_pagination']; - #$out1 = shell_exec($cmdLn1_1); + } + else { $_command .= ' | cut -d \'|\' -f 1,'.self::$_VARIABLE_FILTER; } if (self::$_REC_LIMIT != '') { - #paginating + + #paginating if (IS_WINDOWS) { - #$cmdLn2 = 'awk '.self::$_REC_LIMIT.' '.$tmp_files['filtred_spr_pagination'].' > '.$tmp_files['filtred_pagination']; - #$out2 = shell_exec($cmdLn2); - $_command .= ' | awk '.self::$_REC_LIMIT; - } else { - #$cmdLn2 = 'awk '.self::$_REC_LIMIT.' '.$tmp_files['filtred_spr_pagination'].' > '.$tmp_files['filtred_pagination']; - #$out2 = shell_exec($cmdLn2); - $_command .= ' | awk '.self::$_REC_LIMIT; - } - #$file_sufix = 'filtred_pagination'; - } else { - #$file_sufix = 'filtred_spr_pagination'; + $_command .= ' | awk '.self::$_REC_LIMIT; + } + else { + $_command .= ' | awk '.self::$_REC_LIMIT; + } } // zamenjamo | z '; - #$f = fopen ($tmp_files['filtred_sed'], 'r'); + if (file_exists($folder.'tmp_export_'.self::$sid.'_data'.TMP_EXT)) { if(self::$_VARS[VAR_REC_ON_PAGE] == 'all'){ @@ -1770,7 +1750,7 @@ class SurveyDataDisplay{ $f = fopen ($folder.'tmp_export_'.self::$sid.'_data'.TMP_EXT, 'r'); while ($line = fgets ($f)) { - echo ''; + echo ''; if ((int)$display1kaIcon == 1) { echo ''; @@ -1825,14 +1805,18 @@ class SurveyDataDisplay{ echo ''; $cntLines++; } - } else { + } + else { echo 'File does not exist (err.No.1)! :'.'tmp_export_'.self::$sid.'_data'.TMP_EXT; - #echo $folder.'tmp_export_'.self::$sid.'_data'.TMP_EXT; } + echo ''; + echo '
 '; - echo '
'.$lang['srv_line_number'].'
'; + echo '
'; + echo '
'.$lang['srv_line_number'].'
'; echo '
'; - echo '
'.$spremenljivka['naslov'].'
'; + echo '
'; + echo '
'.$spremenljivka['naslov'].'
'; echo '
'; + echo ''; echo '
'.$lang['srv_line_number'].'
'; echo '
'; - echo '
'.$grid['variable'].'
'; + echo '
'; + echo '
'.$grid['variable'].'
'; echo '
'; - echo '
'.$grid['naslov'].'
'; + echo '
'; + echo '
'.$grid['naslov'].'
'; echo '
'; - echo '
'.$lang['srv_line_number'].'
'; + echo '
'; + echo '
'.$lang['srv_line_number'].'
'; echo '
'; + echo '
if (IS_WINDOWS) { - #$cmdLn3 = 'sed "s*'.STR_DLMT.'**g" '.$tmp_files[$file_sufix].' > '.$tmp_files['filtred_sed']; - #$out3 = shell_exec($cmdLn3); $_command .= ' | sed "s*'.STR_DLMT.'*'.STR_LESS_THEN.'/td'.STR_GREATER_THEN.STR_LESS_THEN.'td'.STR_GREATER_THEN.'*g" >> '.$folder.'tmp_export_'.self::$sid.'_data'.TMP_EXT; - - } else { - #$cmdLn3 = 'sed \'s*'.STR_DLMT.'**g\' '.$tmp_files[$file_sufix].' > '.$tmp_files['filtred_sed']; - #$out3 = shell_exec($cmdLn3); + } + else { $_command .= ' | sed \'s*'.STR_DLMT.'**g\' >> ' .$folder.'tmp_export_'.self::$sid.'_data'.TMP_EXT; } @@ -1749,12 +1727,14 @@ class SurveyDataDisplay{ fclose($file_handler); $out_command = shell_exec($folder.'cmd_'.self::$sid.'_to_run.bat'); unlink($folder.'cmd_'.self::$sid.'_to_run.bat'); - } else { + } + else { $out_command = shell_exec($_command); } + echo '
'; + echo ''; // end div tableContainer + /** * kliki na ikonice za urejanje in izpis so definirane v script_analiza.js, analiza_init(); */ diff --git a/public/css/admin_new.css b/public/css/admin_new.css index 7c540a2a7..c0952be21 100644 --- a/public/css/admin_new.css +++ b/public/css/admin_new.css @@ -15636,21 +15636,54 @@ dl.arch_email dd { } }*/ } -#div_vnosi_data #tableContainer table#dataTable thead tr th { - padding: 16px; +#div_vnosi_data #tableContainer table#dataTable tr td, +#div_vnosi_data #tableContainer table#dataTable tr th { + box-sizing: border-box; + padding: 0 16px; overflow: hidden; + width: 125px; + max-width: 125px; + min-width: 125px; white-space: nowrap; + text-overflow: ellipsis; + border: 1px solid #E5E5E5; +} +#div_vnosi_data #tableContainer table#dataTable tr td.enkaIcon, #div_vnosi_data #tableContainer table#dataTable tr td.data_edit, +#div_vnosi_data #tableContainer table#dataTable tr th.enkaIcon, +#div_vnosi_data #tableContainer table#dataTable tr th.data_edit { + width: 40px; + max-width: 40px; + min-width: 40px; + padding: 0; + text-align: center; +} +#div_vnosi_data #tableContainer table#dataTable tr td.enkaIcon .faicon, #div_vnosi_data #tableContainer table#dataTable tr td.data_edit .faicon, +#div_vnosi_data #tableContainer table#dataTable tr th.enkaIcon .faicon, +#div_vnosi_data #tableContainer table#dataTable tr th.data_edit .faicon { + cursor: pointer; +} +#div_vnosi_data #tableContainer table#dataTable tr td.enkaIcon .faicon.quick_view:before, #div_vnosi_data #tableContainer table#dataTable tr td.data_edit .faicon.quick_view:before, +#div_vnosi_data #tableContainer table#dataTable tr th.enkaIcon .faicon.quick_view:before, +#div_vnosi_data #tableContainer table#dataTable tr th.data_edit .faicon.quick_view:before { + color: #1E88E5; +} +#div_vnosi_data #tableContainer table#dataTable tr td.data_uid, +#div_vnosi_data #tableContainer table#dataTable tr th.data_uid { + display: none; +} +#div_vnosi_data #tableContainer table#dataTable thead tr th { + height: 52px; font-size: 16px; font-weight: 600; background: #F8F8F8; - border: 1px solid #E5E5E5; +} +#div_vnosi_data #tableContainer table#dataTable thead tr th.cell_paradata { + background: #F4F9FE; } #div_vnosi_data #tableContainer table#dataTable tbody tr td { - box-sizing: border-box; height: 40px; - padding: 0 16px; + max-height: 40px; font-size: 14px; - border: 1px solid #E5E5E5; } fieldset#calculations div.icon_holder { diff --git a/resources/sass/admin_new/pages/survey_data/data_table.scss b/resources/sass/admin_new/pages/survey_data/data_table.scss index f9fa29a5e..9b156411c 100644 --- a/resources/sass/admin_new/pages/survey_data/data_table.scss +++ b/resources/sass/admin_new/pages/survey_data/data_table.scss @@ -25,20 +25,62 @@ } }*/ + tr{ + + td, + th{ + box-sizing: border-box; + padding: 0 16px; + + overflow: hidden; + width: 125px; + max-width: 125px; + min-width: 125px; + + white-space: nowrap; + text-overflow: ellipsis; + + border: 1px solid $gray; + + &.enkaIcon, + &.data_edit{ + width: 40px; + max-width: 40px; + min-width: 40px; + padding: 0; + + text-align: center; + + .faicon{ + cursor: pointer; + + &.quick_view:before{ + color: $blue; + } + } + } + + &.data_uid{ + display: none; + } + } + } + thead{ tr{ th{ - padding: 16px; - - overflow: hidden; - white-space: nowrap; + height: 52px; + font-size: 16px; font-weight: 600; background: $light-gray; - border: 1px solid $gray; + + &.cell_paradata{ + background: #F4F9FE; + } } } @@ -49,19 +91,18 @@ tr{ td{ - box-sizing: border-box; height: 40px; - padding: 0 16px; + max-height: 40px; font-size: 14px; - - border: 1px solid $gray; } } } + + /*.dataCell { position: relative; white-space: nowrap;