Redesign - moje ankete - V DELU

This commit is contained in:
pero1203 2022-01-14 10:51:04 +01:00
parent 7a39826a2d
commit 6356dd564d
6 changed files with 1665 additions and 1268 deletions

View File

@ -981,9 +981,11 @@ class SurveyList {
// Paginacija - se na dnu - ni prikazana pri searchu // Paginacija - se na dnu - ni prikazana pri searchu
if($this->isSearch != 1){ if($this->isSearch != 1){
echo '<div class="pagination_bottom_holder">';
echo ' <div class="pagination bottom">'; echo ' <div class="pagination bottom">';
$this->displayPagiantion(); $this->displayPagiantion();
echo ' </div>'; echo ' </div>';
echo '</div>';
} }
} }
@ -1196,46 +1198,33 @@ class SurveyList {
// HEADER VRSTICA // HEADER VRSTICA
echo '<tr class="sl_header_new">'; echo '<tr class="sl_header_new">';
// Info ikona
echo '<td class="col1">';
echo '</td>';
// Tip ankete (forma, navadna, glasovanje)
//echo '<td class="col2"></td>';
// Aktivnost ankete
echo '<td class="col2"></td>';
// Naslov // Naslov
echo '<td class="col3">'; echo '<td class="col1">';
echo $this->createOrderUrlNew(1, $lang['title']); echo $this->createOrderUrlNew(1, $lang['title']);
echo '</td>'; echo '</td>';
// Trajanje - status // Trajanje - status
echo '<td class="col4">'; echo '<td class="col2">';
echo $this->createOrderUrlNew(18, 'Status'); echo $this->createOrderUrlNew(18, 'Status');
echo '</td>'; echo '</td>';
// Tip + st. vprasanj // Ustvarjeno
echo '<td class="col5">'; echo '<td class="col3">';
echo '';
echo $this->createOrderUrlNew(19, $lang['srv_tip']); echo $this->createOrderUrlNew(19, $lang['srv_tip']);
echo '</td>'; echo '</td>';
// Zadnji vnos // Zadnji vnos
echo '<td class="col6">'; echo '<td class="col4">';
echo $this->createOrderUrlNew(16, $lang['srv_last_insrt']); echo $this->createOrderUrlNew(16, $lang['srv_last_insrt']);
echo '</td>'; echo '</td>';
// Sprememba // Sprememba
echo '<td class="col7">'; echo '<td class="col5">';
echo $this->createOrderUrlNew(14, $lang['change']); echo $this->createOrderUrlNew(14, $lang['change']);
echo '</td>'; echo '</td>';
// Ikona1 // Ostalo
echo '<td class="col8"></td>'; echo '<td class="col6"></td>';
// Ikona2
echo '<td class="col9"></td>';
echo '</tr>'; echo '</tr>';
@ -1245,14 +1234,9 @@ class SurveyList {
echo '<tr id="anketa_list_'.$anketa['id'].'" class="anketa_list '.($this->show_folders == 1 ? ' mySurvey_draggable' : '').'" anketa_id="'.$anketa['id'].'">'; echo '<tr id="anketa_list_'.$anketa['id'].'" class="anketa_list '.($this->show_folders == 1 ? ' mySurvey_draggable' : '').'" anketa_id="'.$anketa['id'].'">';
// Info ikona
echo '<td class="col1">';
//var_dump($anketa);
echo '<span id="info_icon_'.$anketa['id'].'" anketa="'.$anketa['id'].'" class="faicon info icon-as_link pointer icon-center" title="'.$lang['srv_survey_info'].'" onClick="surveyList_info(\''.$anketa['id'].'\');"></span>';
echo '</td>';
// Aktivnost - neaktivna, aktivna, zakljucena // Aktivnost - neaktivna, aktivna, zakljucena
echo '<td class="col2">'; /*echo '<td class="col2">';
if ($anketa['active'] == 1) { if ($anketa['active'] == 1) {
echo '<div class="dot blue" title="'.$lang['srv_anketa_active2'].'"></div>'; echo '<div class="dot blue" title="'.$lang['srv_anketa_active2'].'"></div>';
} else { } else {
@ -1265,10 +1249,11 @@ class SurveyList {
echo '<div class="dot grey" title="'.$lang['srv_survey_non_active_notActivated'].'"></div>'; echo '<div class="dot grey" title="'.$lang['srv_survey_non_active_notActivated'].'"></div>';
} }
} }
echo '</td>'; echo '</td>';*/
// Naslov // Naslov
echo '<td class="col3">'; echo '<td class="col1">';
if(strlen($anketa['naslov']) > 60) if(strlen($anketa['naslov']) > 60)
$text = substr($anketa['naslov'],0,60); $text = substr($anketa['naslov'],0,60);
else else
@ -1324,8 +1309,9 @@ class SurveyList {
echo $lang['srv_h_sl_avtor'].': '.$name_searched.' '.$surname_searched.', '.$i_time[0].'.'.$i_time[1].'.20'.$i_time[2].'</span>'; echo $lang['srv_h_sl_avtor'].': '.$name_searched.' '.$surname_searched.', '.$i_time[0].'.'.$i_time[1].'.20'.$i_time[2].'</span>';
echo '</td>'; echo '</td>';
// Trajanje - status // Trajanje - status
echo '<td class="col4">'; echo '<td class="col2">';
if ($anketa['active'] == 1) { if ($anketa['active'] == 1) {
$now = time(); $now = time();
$do = explode('.', $anketa['trajanjedo']); $do = explode('.', $anketa['trajanjedo']);
@ -1355,8 +1341,9 @@ class SurveyList {
} }
echo '</td>'; echo '</td>';
// Tip + st. vprasanj
echo '<td class="col5">'; // Ustvarjeno
echo '<td class="col3">';
if($anketa['survey_type'] == 0) if($anketa['survey_type'] == 0)
echo $lang['srv_vrsta_survey_type_0']; echo $lang['srv_vrsta_survey_type_0'];
elseif($anketa['survey_type'] == 1) elseif($anketa['survey_type'] == 1)
@ -1369,8 +1356,9 @@ class SurveyList {
echo '<br /><span class="small">'.$lang['srv_h_sl_stvprasanj'].': '. $anketa['variables'].'</span>'; echo '<br /><span class="small">'.$lang['srv_h_sl_stvprasanj'].': '. $anketa['variables'].'</span>';
echo '</td>'; echo '</td>';
// Zadnji vnos // Zadnji vnos
echo '<td class="col6">'; echo '<td class="col4">';
if($anketa['answers'] > 0){ if($anketa['answers'] > 0){
$v_time = substr($anketa['v_time_last'], 0, 8); $v_time = substr($anketa['v_time_last'], 0, 8);
$v_time = explode('.', $v_time); $v_time = explode('.', $v_time);
@ -1382,8 +1370,9 @@ class SurveyList {
echo '<span class="small">'.$lang['srv_info_answers'].': '.$anketa['answers'].'</span>'; echo '<span class="small">'.$lang['srv_info_answers'].': '.$anketa['answers'].'</span>';
echo '</td>'; echo '</td>';
// Sprememba // Sprememba
echo '<td class="col7">'; echo '<td class="col5">';
$e_time = substr($anketa['e_time'], 0, 8); $e_time = substr($anketa['e_time'], 0, 8);
$e_time = explode('.', $e_time); $e_time = explode('.', $e_time);
echo $e_time[0].'.'.$e_time[1].'.20'.$e_time[2].'<br />'; echo $e_time[0].'.'.$e_time[1].'.20'.$e_time[2].'<br />';
@ -1393,13 +1382,23 @@ class SurveyList {
echo '</a>'; echo '</a>';
echo '</td>'; echo '</td>';
// Ostalo
echo '<td class="col6">';
echo ' <a>';
echo ' <span class="faicon">...</span>';
echo ' </a>';
echo '</td>';
// Knjiznica - uporabnik // Knjiznica - uporabnik
echo '<td class="col8">'; /*echo '<td class="col8">';
echo '<a href="#" title="'.($anketa['lib_usr'] == 1 ? $lang['srv_ank_mylib_off'] : $lang['srv_ank_mylib_on']).'" onclick="surveyList_myknjiznica_new(\''.$anketa['id'].'\'); return false;">'; echo '<a href="#" title="'.($anketa['lib_usr'] == 1 ? $lang['srv_ank_mylib_off'] : $lang['srv_ank_mylib_on']).'" onclick="surveyList_myknjiznica_new(\''.$anketa['id'].'\'); return false;">';
echo '<span class="sprites '.($anketa['lib_usr'] == 1 ? ' sl_active_on': ' sl_active_off').'"></span>'; echo '<span class="sprites '.($anketa['lib_usr'] == 1 ? ' sl_active_on': ' sl_active_off').'"></span>';
echo '</a>'; echo '</a>';
echo '</td>'; echo '</td>';
// Knjiznica - global (samo admin) // Knjiznica - global (samo admin)
echo '<td class="col9">'; echo '<td class="col9">';
if ($this->g_adminType == 0){ if ($this->g_adminType == 0){
@ -1407,7 +1406,7 @@ class SurveyList {
echo '<span class="sprites '.($anketa['lib_glb'] == 1 ? ' sl_library_on': ' sl_library_off').'"></span>'; echo '<span class="sprites '.($anketa['lib_glb'] == 1 ? ' sl_library_on': ' sl_library_off').'"></span>';
echo '</a>'; echo '</a>';
} }
echo '</td>'; echo '</td>';*/
echo '</tr>'; echo '</tr>';
} }
@ -1495,6 +1494,7 @@ class SurveyList {
# ali sploh izrisujemo paginacijo # ali sploh izrisujemo paginacijo
if ($this->max_pages > 1) { if ($this->max_pages > 1) {
if ($this->onlyPhone == false) { if ($this->onlyPhone == false) {
$baseUrl = $site_url."admin/survey/index.php?pageno="; $baseUrl = $site_url."admin/survey/index.php?pageno=";
} else { } else {
@ -1504,12 +1504,11 @@ class SurveyList {
# povezava na prejšnjo stran # povezava na prejšnjo stran
$prev_page = $this->pageno - 1; $prev_page = $this->pageno - 1;
if($prev_page >= 1) { if($prev_page >= 1) {
//echo('<div><a href="'.$baseUrl.$prev_page.'">'.$lang['previous_page_short'].'</a></div>'); echo '<a href="'.$baseUrl.$prev_page.'"><div class="arrow left"><span class="faicon pagination_left"></span></div></a>';
echo('<div><a href="'.$baseUrl.$prev_page.'"><span class="faicon pagination_left icon-blue"></span></a></div>'); }
} else { else {
# brez href povezave # brez href povezave
//echo('<div class="disabledPage">'.$lang['previous_page_short'].'</div>'); echo '<div class="arrow left disabledPage"><span class="faicon pagination_left"></span></div>';
echo('<div class="disabledPage"><span class="faicon pagination_left icon-blue_soft"></span></div>');
} }
# povezave za vmesne strani # povezave za vmesne strani
@ -1517,31 +1516,35 @@ class SurveyList {
$skipped = false; $skipped = false;
for($a = 1; $a <= $this->max_pages; $a++) { for($a = 1; $a <= $this->max_pages; $a++) {
if ($this->max_pages < ((SRV_LIST_GROUP_PAGINATE+1) * 2) || $a <= SRV_LIST_GROUP_PAGINATE || $a > ($this->max_pages-SRV_LIST_GROUP_PAGINATE) if ($this->max_pages < ((SRV_LIST_GROUP_PAGINATE+1) * 2) || $a <= SRV_LIST_GROUP_PAGINATE || $a > ($this->max_pages-SRV_LIST_GROUP_PAGINATE)
|| ( abs($a-$this->pageno) < SRV_LIST_GROUP_PAGINATE)) { || ( abs($a-$this->pageno) < SRV_LIST_GROUP_PAGINATE)) {
if ($skipped == true) { if ($skipped == true) {
echo '<div class="spacePage">.&nbsp;.&nbsp;.</div>'; echo '<div class="spacePage">.&nbsp;.&nbsp;.</div>';
$skipped = false; $skipped = false;
} }
if($a == $this->pageno) { if($a == $this->pageno) {
# brez href povezave # brez href povezave
echo('<div class="currentPage">'.$a.'</div>'); echo '<div class="page_number currentPage">'.$a.'</div>';
} else {
echo('<div><a href="'.$baseUrl.$a.'">'.$a.'</a></div>');
} }
} else { else {
echo '<a href="'.$baseUrl.$a.'"><div class="page_number">'.$a.'</div></a>';
}
}
else {
$skipped = true; $skipped = true;
} }
} }
# povezava na naslednjo stran # povezava na naslednjo stran
$next_page = $this->pageno + 1; $next_page = $this->pageno + 1;
if($next_page <= $this->max_pages) { if($next_page <= $this->max_pages) {
//echo('<div><a href="'.$baseUrl.$next_page.'">'.$lang['next_page_short'].'</a></div>'); echo '<a href="'.$baseUrl.$next_page.'"><div class="arrow right"><span class="faicon pagination_right"></span></div></a>';
echo('<div><a href="'.$baseUrl.$next_page.'"><span class="faicon pagination_right icon-blue"></span></a></div>'); }
} else { else {
# brez href povezave # brez href povezave
//echo('<div class="disabledPage">'.$lang['next_page_short'].'</div>'); echo '<div class="arrow right disabledPage"><span class="faicon pagination_right"></span></div>';
echo('<div class="disabledPage"><span class="faicon pagination_right icon-blue_soft"></span></div>');
} }
} }
@ -1649,8 +1652,15 @@ class SurveyList {
echo '</div>'; echo '</div>';
} }
else{ else{
echo '<div title="'.$lang['srv_mySurvey_show_folders_desc'].'" id="folderSwitch" '.($this->show_folders == 1 ? ' class="active"' : '').' onClick="switchFolder(\''.$this->show_folders.'\');">'; echo '<div title="'.$lang['srv_mySurvey_show_folders_desc'].'" id="folderSwitch" onClick="switchFolder(\''.$this->show_folders.'\');">';
echo $lang['srv_mySurvey_show_folders']; echo ' <span>'.$lang['srv_mySurvey_show_folders'].'</span>';
// Stikalo za folderje
if($this->show_folders == 1)
echo ' <div class="switch_folders on"><span class="switch_folders_content">ON</span></div>';
else
echo ' <div class="switch_folders off"><span class="switch_folders_content">OFF</span></div>';
echo '</div>'; echo '</div>';
} }
} }
@ -1788,13 +1798,11 @@ class SurveyList {
echo '<form method="GET" id="1kasmysurvey" action="'.$site_url.'admin/survey/index.php">'; echo '<form method="GET" id="1kasmysurvey" action="'.$site_url.'admin/survey/index.php">';
//echo '<span class="sprites search"></span> ';
echo '<input id="searchMySurvey" type="text" value="" placeholder="'.$lang['s_search_mySurvey'].'" name="search" />'; echo '<input id="searchMySurvey" type="text" value="" placeholder="'.$lang['s_search_mySurvey'].'" name="search" />';
//echo '<input type="submit" value="' . $lang['s_search'] . '" />'; echo ' <button class="medium white-black" onclick="$(\'#1kasmysurvey\').submit(); return false;">';
echo ' <div class="buttonwrapper floatRight">'; echo $lang['s_search2'];
echo ' <a class="ovalbutton ovalbutton_orange" href="#" onclick="$(\'#1kasmysurvey\').submit(); return false;"><span>'.$lang['s_search2'].'</span></a>'; echo ' </button>';
echo ' </div>';
echo '</form>'; echo '</form>';
} }

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,8 @@
Components scss Components scss
*/ */
@import "hover/hover";
@import "popup/popup";
// Layout components // Layout components
@import "header/header"; @import "header/header";
@ -11,5 +13,3 @@
// Functional components // Functional components
@import "form/form"; @import "form/form";
@import "table/table"; @import "table/table";
@import "popup/popup";
@import "hover/hover";

View File

@ -37,6 +37,8 @@
// Hover za izvoze // Hover za izvoze
#hover_export { #hover_export {
@include hover_basic();
display: none; display: none;
position: absolute; position: absolute;
z-index: 99999; z-index: 99999;
@ -44,14 +46,6 @@
top: 31px; top: 31px;
width: 150px; width: 150px;
padding: 10px 16px;
text-align: left;
line-height: normal;
background-color: $white;
border: 1px $gray solid;
a { a {
display: flex; display: flex;
@ -66,6 +60,14 @@
&:hover{ &:hover{
text-decoration: none; text-decoration: none;
} }
&:first-of-type{
padding-top: 0;
}
&:last-of-type{
padding-bottom: 0;
}
} }
span.hover_export_icon { span.hover_export_icon {

View File

@ -0,0 +1,32 @@
@mixin hover_basic(){
padding: 16px;
color: $black;
font-weight: 400;
font-size: 16px;
line-height: 20px;
text-align: left;
background: $white;
border: 1px solid $dark-gray;
box-shadow: 0px 4px 7px rgba(0, 0, 0, 0.07);
a{
text-decoration: none;
}
ul{
margin: 0;
padding: 0;
list-style-type: none;
li{
margin-bottom: 16px;
&:last-of-type{
margin-bottom: 0;
}
}
}
}

View File

@ -17,6 +17,20 @@
form{ form{
display: flex; display: flex;
input[type="text"]{
box-sizing: border-box;
padding: 12px 14px;
margin: 0;
font-size: 16px;
background: $white;
border: 1px solid $dark-gray;
border-right: none;
border-radius: 2px 0 0 2px;
}
} }
} }
@ -32,13 +46,110 @@
#sortButton, #sortButton,
#folderSwitch{ #folderSwitch{
cursor: pointer; cursor: pointer;
position: relative;
height: 40px;
width: 102px;
box-sizing: border-box; box-sizing: border-box;
margin-left: 16px; margin-left: 16px;
padding: 12px 8px; padding: 10px 8px;
border: 1px $dark-gray solid; border: 1px $dark-gray solid;
border-radius: 2px; border-radius: 2px;
transition: 0.2s;
&#folderSwitch{
display: flex;
align-items: center;
justify-content: space-between;
.switch_folders {
position: relative;
display: block;
width: 41px;
height: 16px;
.switch_folders_content {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
padding-top: 1px;
color: white;
font-size: 10px;
font-weight: 400;
line-height: 13px;
background-color: $blue;
border-radius: 16px;
}
.switch_folders_content:before {
position: absolute;
content: "";
height: 14px;
width: 14px;
bottom: 1px;
background-color: white;
border-radius: 50%;
}
}
.switch_folders.on{
.switch_folders_content{
padding-left: 20px;
background-color: $blue;
}
.switch_folders_content:before{
left: 1px;
}
&:hover{
.switch_folders_content{
background-color: $dark-blue;
}
}
}
.switch_folders.off{
.switch_folders_content{
padding-left: 6px;
background-color: $very-dark-gray2;
}
.switch_folders_content:before{
right: 1px;
}
&:hover{
.switch_folders_content{
background-color: $very-dark-gray;
}
}
}
}
&#filterButton:after,
&#sortButton:after{
position: absolute;
font-family: $fontawesome;
content: "\f078";
right: 8px;
top: 13px;
font-weight: 600;
font-size: 12px;
}
&:hover{
background-color: $light-gray2;
}
} }
@ -48,6 +159,8 @@
#filterSettings, #filterSettings,
#sortSettings{ #sortSettings{
@include hover_basic();
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
@ -55,15 +168,10 @@
right: 0; right: 0;
z-index: 9999; z-index: 9999;
width: 160px; width: 200px;
margin-top: 12px; top: 40px;
padding: 0 10px;
text-align: left; border-radius: 2px;
font-size: 12px;
font-weight: 400;
background-color: white;
} }
&:hover{ &:hover{
@ -85,17 +193,65 @@
} }
// Paginacija // Paginacija
.pagination_bottom_holder{
display: flex;
justify-content: center;
margin-top: 32px;
}
.pagination{ .pagination{
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: auto;
padding: 4px;
background: $light-gray;
border-radius: 2px;
&.top{ &.top{
width: 33%; max-width: 33%;
} }
&.bottom{ a{
margin-top: 32px; color: $black;
text-decoration: none;
}
.page_number{
display: flex;
justify-content: center;
align-items: center;
width: 24px;
height: 24px;
margin: 0 4px;
border-radius: 2px;
transition: 0.2s;
&:hover{
background-color: $gray;
}
&.currentPage{
color: $white;
background-color: $blue;
}
}
.arrow{
margin: 0 4px;
transition: 0.2s;
&.disabledPage{
color: $very-dark-gray;
}
} }
} }
} }