Redesign - tabela s podatki
This commit is contained in:
parent
b421d1271f
commit
c2f497762a
@ -1428,46 +1428,10 @@ class SurveyDataDisplay{
|
||||
|
||||
echo '<table id="dataTable" class="scrollTable no_wrap_td'.$cssEdit.'" '.(self::$_VARS[VAR_EDIT]?' title="'.$lang['srv_edit_data_title'].'"':'').'>';
|
||||
|
||||
// Nastavimo colgroup, da na njega vezemo vse sirine v tabeli, zaradi resizinga stolpcev
|
||||
/*echo '<colgroup>';
|
||||
# colspan za ikonce
|
||||
if ($stolpci > 0) {
|
||||
echo '<col class="data_edit"'.($stolpci > 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 '<col>';
|
||||
}
|
||||
|
||||
// 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 '<col seq="'.$variable['sequence'].'"';
|
||||
|
||||
if ($spremenljivka['tip'] != 'm' && $spremenljivka['tip'] != 'sm') {
|
||||
echo ' spr_id="'.substr($spid, 0, strpos($spid, '_')).'"';
|
||||
} else {
|
||||
echo ' spr_id="'.$spid.'"';
|
||||
}
|
||||
|
||||
echo '>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$spr_cont++;
|
||||
}
|
||||
|
||||
}
|
||||
echo '</colgroup>';*/
|
||||
|
||||
echo '<thead class="fixedHeader">';
|
||||
echo '<tr>';
|
||||
|
||||
echo '<tr class="row1">';
|
||||
|
||||
# colspan za ikonce
|
||||
if ($stolpci > 0) {
|
||||
@ -1475,29 +1439,40 @@ class SurveyDataDisplay{
|
||||
}
|
||||
|
||||
# dodamo skrit stolpec uid
|
||||
echo '<th class="data_uid"> </th>';
|
||||
echo '<th class="data_uid"></th>';
|
||||
|
||||
$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 '<th title="'.$lang['srv_line_number'].'" >';
|
||||
echo '<div class="headerCell">'.$lang['srv_line_number'].'</div>';
|
||||
echo '<th class="'.$class.'" title="'.$lang['srv_line_number'].'">';
|
||||
echo ' <div class="headerCell">'.$lang['srv_line_number'].'</div>';
|
||||
echo '</th>';
|
||||
}
|
||||
|
||||
// paginacija spremenljivk
|
||||
if (self::$_VARS['spr_limit'] == 'all' || ($spr_cont >= $_spr_on_pages_start && $spr_cont < $_spr_on_pages_stop)) {
|
||||
echo '<th colspan="'.$spremenljivka['cnt_all'].'" title="'.$spremenljivka['naslov'].'">';
|
||||
echo '<div class="headerCell">'.$spremenljivka['naslov'].'</div>';
|
||||
echo '<th class="'.$class.'" colspan="'.$spremenljivka['cnt_all'].'" title="'.$spremenljivka['naslov'].'">';
|
||||
echo ' <div class="headerCell">'.$spremenljivka['naslov'].'</div>';
|
||||
echo '</th>';
|
||||
}
|
||||
$spr_cont++;
|
||||
|
||||
$spr_cont++;
|
||||
}
|
||||
}
|
||||
|
||||
echo '</tr><tr>';
|
||||
echo '</tr>';
|
||||
|
||||
|
||||
echo '<tr class="row2">';
|
||||
|
||||
# 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 '<th title="'.$lang['srv_line_number'].'" >';
|
||||
echo '<th class="'.$class.'" title="'.$lang['srv_line_number'].'" >';
|
||||
echo '<div class="headerCell">'.$lang['srv_line_number'].'</div>';
|
||||
echo '</th>';
|
||||
}
|
||||
@ -1522,13 +1505,13 @@ class SurveyDataDisplay{
|
||||
|
||||
foreach ($spremenljivka['grids'] AS $gid => $grid) {
|
||||
if($spremenljivka['tip'] == 16 || $spremenljivka['tip'] == 19 || $spremenljivka['tip'] == 20){
|
||||
echo '<th colspan="'.$grid['cnt_vars'].'" title="'.$grid['variable'].'">';
|
||||
echo '<div class="headerCell">'.$grid['variable'].'</div>';
|
||||
echo '<th class="'.$class.'" colspan="'.$grid['cnt_vars'].'" title="'.$grid['variable'].'">';
|
||||
echo ' <div class="headerCell">'.$grid['variable'].'</div>';
|
||||
echo '</th>';
|
||||
}
|
||||
else{
|
||||
echo '<th colspan="'.$grid['cnt_vars'].'" title="'.$grid['naslov'].'">';
|
||||
echo '<div class="headerCell">'.$grid['naslov'].'</div>';
|
||||
echo '<th class="'.$class.'" colspan="'.$grid['cnt_vars'].'" title="'.$grid['naslov'].'">';
|
||||
echo ' <div class="headerCell">'.$grid['naslov'].'</div>';
|
||||
echo '</th>';
|
||||
}
|
||||
}
|
||||
@ -1537,7 +1520,10 @@ class SurveyDataDisplay{
|
||||
}
|
||||
|
||||
}
|
||||
echo '</tr><tr>';
|
||||
echo '</tr>';
|
||||
|
||||
|
||||
echo '<tr class="row3">';
|
||||
|
||||
# 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 '<th title="'.$lang['srv_line_number'].'" spr_id="lineNo">';
|
||||
echo '<div class="dataCell">'.$lang['srv_line_number'].'</div>';
|
||||
echo '<th class="'.$class.'" title="'.$lang['srv_line_number'].'" spr_id="lineNo">';
|
||||
echo ' <div class="dataCell">'.$lang['srv_line_number'].'</div>';
|
||||
echo '</th>';
|
||||
}
|
||||
|
||||
@ -1562,7 +1556,8 @@ class SurveyDataDisplay{
|
||||
foreach ($spremenljivka['grids'] AS $gid => $grid) {
|
||||
if (count ($grid['variables']) > 0) {
|
||||
foreach ($grid['variables'] AS $vid => $variable ){
|
||||
echo '<th title="'.$variable['naslov'].($variable['other'] ? ' (text)' : '').'"'
|
||||
|
||||
echo '<th class="'.$class.'" title="'.$variable['naslov'].($variable['other'] ? ' (text)' : '').'"'
|
||||
.' seq="'.$variable['sequence'].'"';
|
||||
|
||||
if ($spremenljivka['tip'] != 'm' && $spremenljivka['tip'] != 'sm') {
|
||||
@ -1605,7 +1600,9 @@ class SurveyDataDisplay{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo'</tr>';
|
||||
|
||||
echo '</thead>';
|
||||
|
||||
|
||||
@ -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.'*<span class=\"highlighted\">'.$search.'</strong>*g"';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$_command .= ' | sed \'/'.$search.'/!d\'';
|
||||
$_command .= ' | sed \'s*'.$search.'*<span class=\"highlighted\">'.$search.'</strong>*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 </td><td>
|
||||
if (IS_WINDOWS) {
|
||||
#$cmdLn3 = 'sed "s*'.STR_DLMT.'*</td><td>*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.'*</td><td>*g\' '.$tmp_files[$file_sufix].' > '.$tmp_files['filtred_sed'];
|
||||
#$out3 = shell_exec($cmdLn3);
|
||||
}
|
||||
else {
|
||||
$_command .= ' | sed \'s*'.STR_DLMT.'*</td><td>*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 '<tbody class="scrollContent'.(self::$_VARS[VAR_CODING]?' coding':'').'">';
|
||||
#$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 '<tr>';
|
||||
echo '<tr class="row_data">';
|
||||
|
||||
if ((int)$display1kaIcon == 1) {
|
||||
echo '<td class="enkaIcon" title="'.$lang['srv_view_data_row_quick'].'"><span class="faicon quick_view icon-as_link"></span></td>';
|
||||
@ -1825,14 +1805,18 @@ class SurveyDataDisplay{
|
||||
echo '</tr>';
|
||||
$cntLines++;
|
||||
}
|
||||
} 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;
|
||||
}
|
||||
else {
|
||||
echo 'File does not exist (err.No.1)! :'.'tmp_export_'.self::$sid.'_data'.TMP_EXT;
|
||||
}
|
||||
|
||||
echo '</tbody>';
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo '</div>'; // end div tableContainer
|
||||
|
||||
|
||||
/**
|
||||
* kliki na ikonice za urejanje in izpis so definirane v script_analiza.js, analiza_init();
|
||||
*/
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
height: 52px;
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user