[Redizajn 1KA] - Urejanje --> Oblika - v1

This commit is contained in:
tejagerjovic 2022-03-11 03:48:06 +01:00
parent 1279ba69c2
commit eafbefc85f
7 changed files with 1837 additions and 1588 deletions

View File

@ -354,15 +354,42 @@ class SurveyTheme {
$skin_name = $rowa['name'];
}
echo '<h2 class="first">'.$lang['srv_current_theme'].'</h2>';
//SPLOŠNA TEMA
echo '<div class="theme_list">';
echo '<div class="theme">';
echo '<span class="name">'.$skin_name.'</span>';
echo '<span class="desc">('.$lang['srv_current_theme_general'].')</span>';
echo '</div>';
echo '<span class="theme_header">'.$lang['srv_current_theme'].': ';
if($row['skin_profile'] == 0){
echo '<a href="index.php?anketa=' . $this->sid . '&a=theme-editor&profile_new=' . $simple_name . '"><span class="bold" style="font-size:16px;">' . $skin_name . '</span>' . '</a>';
$modify_link = '\'index.php?anketa=' . $this->sid . '&a=theme-editor&profile_new=' . $simple_name . '\'';
}else {
echo '<a href="index.php?anketa=' . $this->sid . '&a=theme-editor&profile=' . $row['skin_profile'] . '"><span class="bold" style="font-size:16px;">' . $skin_name . '</span>' . '</a>';
$modify_link = '\'index.php?anketa=' . $this->sid . '&a=theme-editor&profile=' . $row['skin_profile'] . '\'';
}
echo '</span><br /><br />';
//Gumbi
echo '<div class="options">';
//Predogled
$src = ''.SurveyInfo::getSurveyLink().'&grupa='.$grupa.'&no_preview=1&preview=on&theme_profile='.$row['id'].'';
echo '<div class="button theme_links_preview" src="'.$src.'">';
echo '<span class="faicon fa-desktop"></span>';
echo $lang['srv_poglejanketo2'];
echo '</div>';
//Prilagodi
echo '<div class="button" onclick="window.location.href='.$modify_link.'">';
echo '<span class="faicon palette"></span>';
echo $lang['srv_te_theme_edit'];
echo '</div>';
echo '</div>';
echo '</div>';
}
function displayAdvancedSettings ($groupId) {
@ -445,8 +472,6 @@ class SurveyTheme {
global $lang, $site_url;
global $global_user_id;
//if (count($this->groups[$groupId]['skins'])>0 || $groupId == -1) {
$rowa = SurveyInfo::getSurveyRow();
if($groupId == -2)
@ -456,8 +481,7 @@ class SurveyTheme {
elseif ($groupId != -1)
echo '<h2>'.$lang['srv_system_themes'].'</h2>';
else{
echo '<h2>'.$lang['srv_user_themes'].' ';
echo '<span class="user_themes_button faicon plus icon-blue pointer" style="margin-bottom:6px;" onClick="toggle_custom_themes(); return false;"> </span>';
echo '<h2 class="pointer" onClick="toggle_custom_themes(); return false;"><span class="user_themes_button faicon fa-angle-down"> </span>'.$lang['srv_user_themes'].' ';
echo '</h2>';
}
@ -499,23 +523,47 @@ class SurveyTheme {
$src = ''.SurveyInfo::getSurveyLink().'&grupa='.$grupa.'&no_preview=1&preview=on&theme_profile='.$row['id'].'';
$is_current_skin = ($rowa['skin_profile'] == $row['id']) ? true : false;
echo '<div class="custom_theme_holder '.($is_current_skin ? ' active' : '').'">';
// Title
echo '<span class="custom_theme_title" gid="'.$groupId.'" css="'.urlencode($skin).'" alt="'.$row['name'].'" title="'.$lang['srv_changetheme'].'" onclick="te_change_profile(\''.$row['id'].'\', true); return false;" alt="'.$row['name'].'">'.substr($row['name'], 0, 30).(strlen($row['name']) > 30 ? '...' : '').'</span>';
// Preview theme
echo ' <a href="#" class="theme_links_preview" src="'.$src.'"><span class="custom_theme_preview"><span class="faicon preview"></span>'.$lang['srv_poglejanketo2'].'</span></a>';
// Delete theme
if ($groupId == -1)
echo ' <a href="#" onclick="if (confirm(\''.$lang['srv_ask_delete'].'\')) te_delete_profile(\''.$row['id'].'\', false); return false;" class="theme_delete" css="'.urlencode($skin).'"><span class="custom_theme_delete"><span class="faicon delete_circle icon-orange"></span> '.$lang['srv_anketadelete_txt'].'</span></a>';
// Edit theme
echo ' <a href="index.php?anketa='.$this->sid.'&a=theme-editor&profile='.$row['id'].'"><span class="custom_theme_edit"><span class="faicon palette"></span> '.$lang['edit3'].'</span></a>';
echo '<div class="theme_list">';
echo '<div class="theme">';
echo '<span class="name">'.$skin_name.'</span>';
echo '<span class="name">'.substr($row['name'], 0, 30).(strlen($row['name']) > 30 ? '...' : '').'</span>';
echo '<span class="desc">('.$lang['srv_current_theme_general'].')</span>';
echo '</div>';
//Gumbi
echo '<div class="options">';
//Aktiviraj
echo '<div class="button" onclick="te_change_profile(\''.$row['id'].'\', true); return false;">';
echo '<span class="faicon fa-hand-pointer"></span>';
echo $lang['srv_te_theme_activate'];
echo '</div>';
//Predogled
echo '<div class="button theme_links_preview" src="'.$src.'">';
echo '<span class="faicon fa-desktop"></span>';
echo $lang['srv_poglejanketo2'];
echo '</div>';
//Prilagodi
echo '<div class="button" onclick="window.location.href=\'index.php?anketa='.$this->sid.'&a=theme-editor&profile='.$row['id'].'\'">';
echo '<span class="faicon palette"></span>';
echo $lang['srv_te_theme_edit'];
echo '</div>';
//Izbriši
if ($groupId == -1) {
echo '<div class="button theme_delete" onclick="if (confirm(\''.$lang['srv_ask_delete'].'\')) te_delete_profile(\''.$row['id'].'\', false); return false;">';
echo '<span class="faicon preview"></span>';
echo $lang['srv_anketadelete_txt'];
echo '</div>';
}
echo '</div>'; //div.options
echo '</div>'; //div.theme_list
$profiles++;
}
@ -527,28 +575,49 @@ class SurveyTheme {
$src = ''.SurveyInfo::getSurveyLink().'&grupa='.$grupa.'&no_preview=1&preview=on&theme_profile='.$row['id'].'&mobile=1';
$is_current_skin = ($rowa['skin_profile_mobile'] == $row['id']) ? true : false;
echo '<div class="custom_theme_holder '.($is_current_skin ? ' active' : '').'">';
// Title
echo '<span class="custom_theme_title" gid="'.$groupId.'" css="'.urlencode($skin).'" alt="'.$row['name'].'" title="'.$lang['srv_changetheme'].'" onclick="te_change_profile(\''.$row['id'].'\', true, true); return false;" alt="'.$row['name'].'">'.substr($row['name'], 0, 30).(strlen($row['name']) > 30 ? '...' : '').' <span class="italic">('.$lang['srv_mobile_theme'].')</span></span>';
// Preview theme
echo ' <a href="#" class="theme_links_preview" src="'.$src.'"><span class="custom_theme_preview"><span class="faicon preview"></span>'.$lang['srv_poglejanketo2'].'</span></a>';
// Delete theme
if ($groupId == -1)
echo ' <a href="#" onclick="if (confirm(\''.$lang['srv_ask_delete'].'\')) te_delete_profile(\''.$row['id'].'\', true); return false;" class="theme_delete" css="'.urlencode($skin).'"><span class="custom_theme_delete"><span class="faicon delete_circle icon-orange"></span> '.$lang['srv_anketadelete_txt'].'</span></a>';
// Edit theme
echo ' <a href="index.php?anketa='.$this->sid.'&a=theme-editor&profile='.$row['id'].'&mobile=1"><span class="custom_theme_edit"><span class="faicon palette"></span> '.$lang['edit3'].'</span></a>';
echo '<div class="theme_list">';
echo '<div class="theme">';
echo '<span class="name">'.$skin_name.'</span>';
echo '<span class="name">'.substr($row['name'], 0, 30).(strlen($row['name']) > 30 ? '...' : '').'</span>';
echo '<span class="desc">('.$lang['srv_mobile_theme'].')</span>';
echo '</div>';
//Gumbi
echo '<div class="options">';
//Aktiviraj
echo '<div class="button" onclick="te_change_profile(\''.$row['id'].'\', true, true); return false;">';
echo '<span class="faicon fa-hand-pointer"></span>';
echo $lang['srv_te_theme_activate'];
echo '</div>';
//Predogled
echo '<div class="button theme_links_preview" src="'.$src.'">';
echo '<span class="faicon fa-desktop"></span>';
echo $lang['srv_poglejanketo2'];
echo '</div>';
//Prilagodi
echo '<div class="button" onclick="window.location.href=\'index.php?anketa='.$this->sid.'&a=theme-editor&profile='.$row['id'].'&mobile=1\'">';
echo '<span class="faicon palette"></span>';
echo $lang['srv_te_theme_edit'];
echo '</div>';
//Izbriši
if ($groupId == -1) {
echo '<div class="button theme_delete" onclick="if (confirm(\''.$lang['srv_ask_delete'].'\')) te_delete_profile(\''.$row['id'].'\', true); return false;">';
echo '<span class="faicon preview"></span>';
echo $lang['srv_anketadelete_txt'];
echo '</div>';
}
echo '</div>'; //div.options
echo '</div>'; //div.theme_list
$profiles++;
}
if(mysqli_num_rows($sql) > 0)
echo '<br />';
}
if ( isset($this->groups[$groupId]['skins']) && count($this->groups[$groupId]['skins']) > 0 ) {
@ -568,9 +637,10 @@ class SurveyTheme {
// Preview slika
if ($groupId == -1) echo '<a href="#" class="theme_delete theme" gid="'.$groupId.'" css="'.urlencode($skin).'">'.$lang['srv_anketadelete_txt'].'</a>';
//echo '<span class="theme_links_rename as_link" theme="'.urlencode($skin).'">Preimenuj</span>';
if ($groupId == -1)
echo '<img src="'.$site_url.'public/img/skins_previews/'.($groupId==-1?'usertheme':urlencode($simple_name)).'.png" onclick="te_change_profile_oldskin(\''.$simple_name.'\', true); return false;" gid="'.$groupId.'" css="'.urlencode($skin).'" alt="'.$simple_name.'" title="'.$lang['srv_changetheme'].'">';
if ($groupId == -1) {
echo '<img src="'.$site_url.'public/img/skins_previews/'.($groupId==-1?'usertheme':urlencode($simple_name)).'.png" gid="'.$groupId.'" css="'.urlencode($skin).'" alt="'.$simple_name.'" title="'.$lang['srv_changetheme'].'">';
}
else
echo '<img src="'.$site_url.'public/img/skins_previews/'.urlencode($simple_name).'.png" class="theme" gid="'.$groupId.'" css="'.urlencode($skin).'" alt="'.$simple_name.'" title="'.$lang['srv_changetheme'].'">';
@ -586,15 +656,34 @@ class SurveyTheme {
echo '</div>';
if($is_current_skin)
echo ' <a href="index.php?anketa='.$this->sid.'&a=theme-editor&profile_new='.$rowa['skin'].'"><span class="faicon palette"></span> '.$lang['srv_te_theme_edit'].'</a>';
//Gumbi
echo '<div class="theme_label_options">';
if($is_current_mobile_skin)
echo ' <a href="index.php?anketa='.$this->sid.'&a=theme-editor&profile_new_mobile='.$rowa['mobile_skin'].'"><span class="faicon palette"></span> '.$lang['srv_te_theme_edit'].'</a>';
//Aktiviraj
$activate_click = 'onclick="te_change_profile_oldskin(\''.$simple_name.'\', true); return false;"';
echo '<div class="button wtext" '.$activate_click.'>';
echo '<span class="faicon fa-hand-pointer"></span>';
echo $lang['srv_te_theme_activate'];
echo '</div>';
echo '<a href="#" class="theme_links_preview" src="'.$src.'"><span class="faicon preview"></span> '.$lang['srv_poglejanketo2'].'</a>';
//Predogled
echo '<div class="button theme_links_preview" src="'.$src.'">';
echo '<span class="faicon fa-desktop"></span>';
echo '</div>';
//Prilagodi - manjka link za mobilne
if ($groupId == -3)
$link = 'index.php?anketa='.$this->sid.'&a=theme-editor&profile_new_mobile='.$rowa['mobile_skin'];
else
$link = 'index.php?anketa='.$this->sid.'&a=theme-editor&profile_new='.$rowa['skin'];
echo '<div class="button" onclick="window.location.href=\''.$link.'\'">';
echo '<span class="faicon palette"></span>';
echo '</div>';
echo '</div>';
echo '</div>'; //div.theme_label
}
}
elseif ($profiles == 0) {

View File

@ -10,13 +10,13 @@ function themes_init() {
$.post("ajax.php?t=theme&a=changeProgressbar", {anketa:srv_meta_anketa_id, progressbar:progressbar}, function() {});
});
$("a.theme_links_preview").live('click', function(event) {
$("div.theme_links_preview").live('click', function(event) {
event.preventDefault();
event.stopPropagation();
window.open($(this).attr('src')+'&size=full', '_blank');
});
$("a.theme_delete.theme").live('click', function(event) {
$("div.theme_delete.theme").live('click', function(event) {
event.preventDefault();
event.stopPropagation();
@ -222,6 +222,6 @@ function te_change_name (_this) {
function toggle_custom_themes () {
$('.user_themes_button').toggleClass("plus minus");
$('.user_themes_button').toggleClass("fa-angle-up");
$('#div_theme_group.custom').toggle('medium');
}

View File

@ -5505,13 +5505,14 @@ $lang = array (
"srv_skin_tablet" => 'Stran za tablice',
"srv_loop_for_variable" => 'Zanka po spremenljivki:',
"srv_loop_antonucci_circle" => 'Krog Antonuccija:',
"srv_current_theme" => 'Trenutno izbrana tema',
"srv_current_theme" => 'Aktivna tema',
"srv_current_theme_general" => 'Splošna tema',
"srv_show_all_settings" => "Prikaži napredne nastavitve",
"srv_skin_disclamer" => "Vaše naložene in urejene teme bodo vidne izključno vam. Ostali uporabniki ne morejo uporabljati vaših tem.",
"srv_SN_nagovor_title" => 'Odgovarjate za osebo ',
"srv_system_themes" => 'Splošne teme',
"srv_mobile_themes" => 'Mobilne teme',
"srv_mobile_theme" => 'mobilna',
"srv_mobile_theme" => 'Mobilna tema',
"srv_safe_themes" => 'Safe teme',
"srv_user_themes" => 'Lastne prilagoditve in CSS teme',
"srv_user_themes_css" => 'Lastne CSS teme',
@ -6211,6 +6212,7 @@ $lang = array (
'srv_te_base_theme' => 'Tema za osnovo',
'srv_te_profile_name' => 'Izbrana prilagoditev teme',
'srv_te_theme_edit' => 'Prilagodi',
'srv_te_theme_activate' => 'Aktiviraj',
'srv_te_no_profiles' => 'Nimate še lastnih tem. Za prilagoditev teme, kliknite na "Prilagodi" poleg imena trenutne teme. Uporabite lahko tudi naprednješe CSS urejanje teme.',
'srv_variableView_h_name' => 'Spremenljivka',
'srv_variableView_h_type' => 'Tip',

View File

@ -5466,12 +5466,13 @@ $lang = array (
"srv_loop_for_variable" => 'Loop per variable:',
"srv_loop_antonucci_circle" => 'Circle Antonucci:',
"srv_current_theme" => 'Current theme',
"srv_current_theme_general" => 'General theme',
"srv_show_all_settings" => "Show advanced settings",
"srv_skin_disclamer" => "Only you will be able to see your themes. Other users cannot use your themes.",
"srv_SN_nagovor_title" => 'Questions relates to a person ',
"srv_system_themes" => 'General themes',
"srv_mobile_themes" => 'Mobile themes',
"srv_mobile_theme" => 'mobile',
"srv_mobile_theme" => 'Mobile theme',
"srv_safe_themes" => 'Safe themes',
"srv_user_themes" => 'User theme modifications and CSS themes',
"srv_user_themes_css" => 'CSS user themes',
@ -6105,6 +6106,7 @@ $lang = array (
'srv_te_base_theme' => 'Base theme',
'srv_te_profile_name' => 'Selected theme modification',
'srv_te_theme_edit' => 'Customize',
'srv_te_theme_activate' => 'Activate',
'srv_te_no_profiles' => 'You have no user themes. To customize a theme, click on the "Customize" option, found next to the current theme name. You can also use more advanced CSS editing options.',
'srv_variableView_h_name' => 'Variable',
'srv_variableView_h_type' => 'Type',

File diff suppressed because it is too large Load Diff

View File

@ -62,7 +62,7 @@ a.faicon{
$color: $dark-gray2;
}
//ikona kot lik
//ikona kot link
&.aslink{
cursor: pointer;
color: $blue;

View File

@ -1,3 +1,89 @@
div.page_tema {
h2 {
font-size: 24px;
margin-top: 32px;
margin-bottom: 16px;
font-weight: $light;
&.first {
margin-top: 0;
}
span.faicon {
margin-right: 8px;
}
}
//Polje za aktivno temo oz. lastno prilagoditev
div.theme_list {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 6px 16px;
margin-bottom: 16px;
&:last-of-type {
margin-bottom: 0;
}
background: $light-gray;
border: 1px solid $blue;
box-sizing: border-box;
border-radius: 4px;
//Ime in tip
div.theme {
span.name {
text-transform: uppercase;
}
span.desc {
color: $very-dark-gray;
margin-left: 6px;
}
}
//Gumbi
div.options {
display: flex;
flex-direction: row;
div.button {
background: $white;
border: 1px solid $gray;
box-sizing: border-box;
border-radius: 2px;
padding: 6px 16px;
margin-right: 8px;
&:last-child {
margin-right: 0px;
}
font-size: 14px;
cursor: pointer;
span.faicon {
margin-right: 8px;
color: $blue;
}
}
}
}
}
// Skopiran stari styling
$color_6: #990000;
$background_color_2: #EFF2F7;
$background_color_3: #FAFFF0;
@ -10,6 +96,87 @@ $selectors: $green;
$skin_selector_border: $blue;
$skin_selector: $red;
//Splošne teme - GRID
div#div_theme_group {
display: flex;
flex-direction: row;
justify-content: flex-start;
gap: 16px;
flex-wrap: wrap;
box-sizing: border-box;
div.theme_label {
width: 202px;
height: 245px;
background-color: $light-gray;
border: 1px solid $light-gray;
padding: 14px 16px;
.theme_label_content{
border-bottom: 1px solid $gray;
padding-bottom: 15px;
img {
display: block;
clear: both;
width: 100%;
margin-bottom: 15px;
border: none;
}
}
.theme_label_options {
display: flex;
flex-direction: row;
justify-content: space-between;
padding-top: 16px;
div.button {
background: $white;
border: 1px solid $gray;
box-sizing: border-box;
border-radius: 2px;
padding: 7px 6px;
font-size: 14px;
cursor: pointer;
span.faicon {
margin: 0;
color: $blue;
}
&.wtext {
span.faicon {
margin-right: 8px;
}
padding: 5px 16px;
}
}
}
//Aktivna tema
&.span_theme_current {
border: 1px solid $blue;
}
}
}
.theme_header {
font-weight: 600;
font-size: 16px;
@ -32,75 +199,7 @@ $skin_selector: $red;
clear: both;
height: auto;
}
#div_theme_group {
div.theme_label {
display: inline-block;
margin: 10px 20px;
.theme_label_content{
cursor: pointer;
margin: 0 5px;
padding: 5px 5px 15px 5px;
font-size: 13px;
text-transform: uppercase;
background-color: $black;
border: none;
img {
display: block;
clear: both;
width: 200px;
height: 150px;
margin-bottom: 4px;
border: none;
}
span.theme_name {
a.help {
float: none !important;
padding: 0px !important;
white-space: normal !important;
}
}
&:hover {
color: $selectors;
background-color: darken( $blue, 5% );
border: none;
}
}
a {
padding: 5px;
float: left;
}
a.theme_links_preview {
float: right;
}
a.theme_delete {
float: right;
}
}
.theme_label.span_theme_current {
.theme_label_content{
color: $selectors;
background-color: $skin_selector;
border: none;
&:hover {
background-color: $skin_selector;
}
}
}
span.theme_links_preview {
font-size: 12px;
float: right;
padding: 5px;
}
}
#div_theme_group.custom {
.custom_theme_holder {