[Redizajn 1KA] - Urejanje --> CSS urejanje teme - v1
This commit is contained in:
parent
34001ed658
commit
38b36da379
@ -956,7 +956,7 @@ class SurveyTheme {
|
||||
$sql = sisplet_query("SELECT name FROM srv_theme_profiles".$mobile." WHERE id = '".$_GET['profile']."'");
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
||||
echo '<h2>'.$lang['srv_themes_mod'].': <span class="name">'.$row['name'].'</span></h2>';
|
||||
echo '<h2>'.$lang['srv_themes_mod2'].': <span class="name">'.$row['name'].'</span></h2>';
|
||||
|
||||
echo '<p class="bottom16">'.$lang['srv_add_theme_upload'].':</p>';
|
||||
echo '<form name="upload" enctype="multipart/form-data" action="upload.php?anketa=' . $this->sid . '&profile='.$_GET['profile'].'" method="post">';
|
||||
@ -986,10 +986,14 @@ class SurveyTheme {
|
||||
|
||||
$skin = $_GET['skin'];
|
||||
|
||||
echo '<div id="theme-edit-wrap">';
|
||||
echo '<div id="theme-editor">';
|
||||
|
||||
$sql = sisplet_query("SELECT name FROM srv_theme_profiles".$mobile." WHERE id = '".$_GET['profile']."'");
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
||||
echo '<div id="theme-editor-warning">'.$lang['srv_themes_edit_warning'].'</div>';
|
||||
|
||||
echo '<h2>'.$lang['srv_themes_mod2'].': <span class="name">'.$row['name'].'</span></h2>';
|
||||
|
||||
echo '<form name="editcss" action="ajax.php?anketa='.$this->sid.'&a=save_editcss" method="post" onsubmit="return false;">';
|
||||
|
||||
$profile = $_GET['profile'];
|
||||
@ -1004,54 +1008,16 @@ class SurveyTheme {
|
||||
echo '<input type="hidden" name="skin_name" value="'.$skin_name.'">';
|
||||
echo '<input type="hidden" name="profile" value="'.$_GET['profile'].'">';
|
||||
echo '<input type="hidden" name="mobile" value="'.($mobile ? '1' : '0').'">';
|
||||
|
||||
echo '<br />';
|
||||
|
||||
echo '<span class="bold">'.$lang['srv_themes_edit'].'</span>';
|
||||
echo '<p><textarea name="css_content" style="width:100%; height: 400px">';
|
||||
|
||||
readfile('../../main/survey/skins/'.$skin.'.css');
|
||||
|
||||
echo '</textarea></p>';
|
||||
|
||||
echo '<p>';
|
||||
|
||||
echo '<p><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings floatLeft spaceRight" href="#" onclick="';
|
||||
?>$.post('ajax.php?anketa=<?=$this->sid?>&a=save_editcss', $('form[name=editcss]').serialize(), function (data) {
|
||||
//if ( $('input[name=skin_name]').val() != $('input[name=old_name]').val() ) {
|
||||
// window.location.href = 'index.php?anketa=<?=$this->sid?>&a=edit_css&skin='+data;
|
||||
//} else {
|
||||
var iframe = document.getElementById('theme-preview-iframe');
|
||||
iframe.src = iframe.src;
|
||||
if ( $('input[name=current_skin]').is(':checked') ) $('input[name=current_skin]').attr('disabled', true);
|
||||
//}
|
||||
}); return false;<?php
|
||||
echo '"><span>'. $lang['edit1337'] . '</span></a>';
|
||||
|
||||
//echo '<a class="ovalbutton ovalbutton_gray spaceRight floatLeft" href="index.php?anketa='.$this->sid.'&a=tema"><span>'.$lang['srv_theme_save_as_new'].'</span></a>';
|
||||
|
||||
echo '<a class="ovalbutton ovalbutton_gray floatLeft" href="index.php?anketa='.$this->sid.'&a=tema"><span>'.$lang['back'].'</span></a></p>';
|
||||
echo '<div class="clr"></div>';
|
||||
echo '</div></p>';
|
||||
echo '</form>';
|
||||
|
||||
echo '<br /><p><a href="#" onclick="javascript:$(\'#show_more\').slideToggle(); return false;">'.$lang['srv_upload_pic'].'</a></p>';
|
||||
|
||||
echo '<p class="top16"><a href="#" onclick="javascript:$(\'#show_more\').slideToggle(); return false;">'.$lang['srv_upload_pic'].'</a></p>';
|
||||
|
||||
echo '<fieldset id="show_more" style="'.($_GET['pic']=='open'?'':'display:none;').' margin-bottom:40px">';
|
||||
|
||||
|
||||
echo '<br /><span class="bold">'.$lang['srv_upload_pic'].':</span>';
|
||||
/*echo '<form name="upload" enctype="multipart/form-data" action="upload.php?anketa=' . $this->sid . '&logo=1" method="post" />';
|
||||
echo '<p><label for="skin">' . $lang['srv_upload_logo'] . ':</label> ';
|
||||
echo '<input type="file" name="fajl" onchange="submit();" onmouseout="survey_upload();" />';
|
||||
echo '</p></form>'; */
|
||||
|
||||
echo '<p class="bottom16">'.$lang['srv_upload_pic'].':</p>';
|
||||
echo '<form name="upload" enctype="multipart/form-data" action="upload.php?anketa=' . $this->sid . '&skin='.$skin.'&profile='.$_GET['profile'].'" method="post" />';
|
||||
echo '<p><label for="skin">' . $lang['srv_upload_pic2'] . ':</label> ';
|
||||
echo '<input type="file" name="fajl" onchange="submit();" onmouseout="survey_upload();" />';
|
||||
echo '</p></form>';
|
||||
echo '<p style="font-size:90%; color: gray">'.$lang['srv_upload_pic_disclaimer'].'</p><br />';
|
||||
|
||||
|
||||
// prikazemo uploadane slike
|
||||
$dir = opendir($site_path . 'main/survey/uploads/');
|
||||
$skinsArray = array();
|
||||
@ -1072,9 +1038,36 @@ class SurveyTheme {
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '</fieldset>';
|
||||
|
||||
echo '<div id="success_save"></div>';
|
||||
echo '</fieldset>';
|
||||
|
||||
echo '<p class="top16 bottom16">'.$lang['srv_skin_warning_edit'].'</p>';
|
||||
|
||||
echo '<p><textarea id="css_content" name="css_content">';
|
||||
|
||||
readfile('../../main/survey/skins/'.$skin.'.css');
|
||||
|
||||
echo '</textarea></p>';
|
||||
|
||||
echo '<p>';
|
||||
|
||||
echo '<div class="button_holder css_edit">';
|
||||
echo '<button class="medium white-blue" onClick="window.location.href=\'index.php?anketa='.$this->sid.'&a=tema\';return false;">'.$lang['edit1338'].'</button>';
|
||||
echo '<button class="medium blue" onclick="';
|
||||
?>$.post('ajax.php?anketa=<?=$this->sid?>&a=save_editcss', $('form[name=editcss]').serialize(), function (data) {
|
||||
//if ( $('input[name=skin_name]').val() != $('input[name=old_name]').val() ) {
|
||||
// window.location.href = 'index.php?anketa=<?=$this->sid?>&a=edit_css&skin='+data;
|
||||
//} else {
|
||||
var iframe = document.getElementById('theme-preview-iframe');
|
||||
iframe.src = iframe.src;
|
||||
if ( $('input[name=current_skin]').is(':checked') ) $('input[name=current_skin]').attr('disabled', true);
|
||||
//}
|
||||
}); return false;<?php
|
||||
echo '"><span>'. $lang['edit1337'].'</button>';
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '</form>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
@ -1082,16 +1075,11 @@ class SurveyTheme {
|
||||
$row = mysqli_fetch_array($sql);
|
||||
$grupa = $row['id'];
|
||||
|
||||
//echo '<div id="theme-preview"><iframe id="theme-preview-iframe" src="'.SurveyInfo::getSurveyLink().'&grupa='.$grupa.'&no_preview=1&preview=on&theme='.$skin.'"></iframe></div>';
|
||||
echo '<div id="theme-preview"><iframe id="theme-preview-iframe" src="'.SurveyInfo::getSurveyLink().'&grupa='.$grupa.'&no_preview=1&preview=on&theme_profile='.$_GET['profile'].'&theme-preview=1'.($mobile ? '&mobile=1' : '').'"></iframe><div class="theme-overflow"></div></div>';
|
||||
|
||||
//echo '</div>';
|
||||
|
||||
//echo '<div class="clr"></div>';
|
||||
|
||||
//echo '</div>';
|
||||
|
||||
SurveyThemeEditor::new_theme_alert($skin_name, true);
|
||||
echo '</div>';
|
||||
|
||||
}
|
||||
|
||||
function ajax_add_theme () {
|
||||
|
@ -59,7 +59,7 @@ class SurveyThemeEditor {
|
||||
$sql = sisplet_query("SELECT name FROM srv_theme_profiles".$mobile." WHERE id = '".$_GET['profile']."'");
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
||||
echo '<h2>'.$lang['srv_themes_mod'].': <span class="name">'.$row['name'].'</span></h2>';
|
||||
echo '<h2>'.$lang['srv_themes_mod2'].': <span class="name">'.$row['name'].'</span></h2>';
|
||||
|
||||
echo '<input type="hidden" name="profile" id="profile" value="'.$this->profile.'">';
|
||||
|
||||
|
@ -5511,6 +5511,7 @@ $lang = array (
|
||||
"srv_show_all_settings" => "Prikaži napredne nastavitve",
|
||||
"srv_skin_disclamer" => "Vaše naložene in urejene teme bodo vidne izključno vam in morebitnim urednikom ankete. Ostali uporabniki ne morejo uporabljati vaših tem.",
|
||||
"srv_skin_warning" => "<span class=\"red\">Opozorilo!</span> Ustvarjanje teme na lastno odgovornost. Ob poseganju v CSS lahko pride do napake in s tem potencialno do napačnega ali nedelujočega prikaza ankete na strani respondenta.",
|
||||
"srv_skin_warning_edit" => "<span class=\"red\">Opozorilo!</span> Posegov v kodo ne priporočamo brez poznavanja jezika CSS. Urejanje teme je na lastno odgovornost.",
|
||||
"srv_SN_nagovor_title" => 'Odgovarjate za osebo ',
|
||||
"srv_system_themes" => 'Splošne teme',
|
||||
"srv_mobile_themes" => 'Mobilne teme',
|
||||
@ -5953,7 +5954,7 @@ $lang = array (
|
||||
"srv_continue_later_subject" => 'Shranjena anketa',
|
||||
"srv_continue_later_content" => 'Pozdravljeni, <br><br>Na spletni strani 1ka.si ste si shranili spodnjo anketo za kasnejše izpolnjevanje.<br><br> Z izpolnjevanjem lahko nadaljujete s klikom na povezavo',
|
||||
"srv_continue_later_content_rs-rs" => 'Pozdravljeni, <br><br>Na spletni strani vprasalniki.rs-rs.si ste si shranili spodnjo anketo za kasnejše izpolnjevanje.<br><br> Z izpolnjevanjem lahko nadaljujete s klikom na povezavo',
|
||||
"srv_upload_pic" => 'Uporabite svoj logo ali sliko',
|
||||
"srv_upload_pic" => 'Naložite svoj logotip',
|
||||
"srv_upload_pic2" => 'Naložite svojo sliko',
|
||||
"srv_upload_logo" => 'Naložite svoj logotip',
|
||||
"srv_upload_pic_disclaimer" => 'Za uporabo slike v temi, skopirajte njen URL (iz seznama spodaj) in ga vključite v CSS datoteko, ki jo lahko urejate zgoraj',
|
||||
@ -6237,7 +6238,8 @@ $lang = array (
|
||||
'srv_aapor_show_approximate' => 'Prikaži približke',
|
||||
'srv_show_continue_later' => 'Opcija za nadaljevanje kasneje',
|
||||
'srv_themes_select' => 'Izbira teme',
|
||||
'srv_themes_mod' => 'Trenutno urejate temo',
|
||||
'srv_themes_mod' => 'Prilagoditev teme',
|
||||
'srv_themes_mod2' => 'Trenutno urejate temo',
|
||||
'srv_themes_edit' => 'CSS urejanje teme',
|
||||
'srv_themes_edit_warning' => 'Opozorilo! Urejanje teme na lastno odgovornost!',
|
||||
'srv_themes_upload_css' => 'Naložite lasten CSS',
|
||||
|
@ -5471,6 +5471,7 @@ $lang = array (
|
||||
"srv_show_all_settings" => "Show advanced settings",
|
||||
"srv_skin_disclamer" => "Your uploaded and edited themes will be visible only to you and any editors of the poll. Other users cannot use your themes.",
|
||||
"srv_skin_warning" => "<span class=\"red\">Warning!</span> Creating a theme is at your own risk. Interfering with the CSS may result in an error, and thus potentially an incorrect or non-functional display of the survey on the respondent's side.",
|
||||
"srv_skin_warning_edit" => "<span class=\"red\">Opozorilo!</span> We do not recommend any code modifications without knowledge of the CSS language. Editing of the theme is at your own risk.",
|
||||
"srv_SN_nagovor_title" => 'Questions relates to a person ',
|
||||
"srv_system_themes" => 'General themes',
|
||||
"srv_mobile_themes" => 'Mobile themes',
|
||||
@ -5848,7 +5849,7 @@ $lang = array (
|
||||
"srv_continue_later_subject" => 'Saved survey',
|
||||
"srv_continue_later_content" => 'You saved a survey on 1ka.si.<br><br>You can continue with the survey by clicking on this link',
|
||||
"srv_continue_later_content_rs-rs" => 'You saved a survey on vprasalniki.rs-rs.si.<br><br>You can continue with the survey by clicking on this link',
|
||||
"srv_upload_pic" => 'Upload your picture or logo',
|
||||
"srv_upload_pic" => 'Upload your logo',
|
||||
"srv_upload_pic2" => 'Upload picture',
|
||||
"srv_upload_logo" => 'Upload logo',
|
||||
"srv_upload_pic_disclaimer" => 'Copy picture URL from the list (below) and use it when editing CSS (above)',
|
||||
@ -6073,7 +6074,7 @@ $lang = array (
|
||||
'srv_te_default' => 'Default',
|
||||
'srv_te_custom_checkbox_radio' => 'Radio button and checkbox',
|
||||
'srv_te_custom_mobile_checkbox_radio' => 'Mobile phone custom icons',
|
||||
'srv_te_custom_icon_pc' => 'Ssize',
|
||||
'srv_te_custom_icon_pc' => 'Size',
|
||||
'srv_te_custom_icon_pc_color' => 'Color',
|
||||
'srv_te_custom_icon_mobile' => 'Size',
|
||||
'srv_te_custom_icon_mobile_color' => 'Color',
|
||||
@ -6131,7 +6132,8 @@ $lang = array (
|
||||
'srv_aapor_show_approximate' => 'Show approximate',
|
||||
'srv_show_continue_later' => 'Display continue later option',
|
||||
'srv_themes_select' => 'Theme selection',
|
||||
'srv_themes_mod' => 'Currently editing',
|
||||
'srv_themes_mod' => 'Theme modifiation',
|
||||
'srv_themes_mod2' => 'Currently editing',
|
||||
'srv_themes_edit' => 'CSS editing',
|
||||
'srv_themes_edit_warning' => 'Warning! Theme editing at your own risk!',
|
||||
'srv_themes_upload_css' => 'Upload your own CSS',
|
||||
|
@ -10441,6 +10441,8 @@ div#theme-edit-wrap div#theme-editor h2 {
|
||||
text-transform: uppercase;
|
||||
font-size: 16px;
|
||||
margin-bottom: 16px;
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0;
|
||||
}
|
||||
div#theme-edit-wrap div#theme-editor h2 span.name {
|
||||
text-transform: none;
|
||||
@ -10717,6 +10719,19 @@ fieldset#theme-upload h2 span.name {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
textarea#css_content {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
font-family: "Courier";
|
||||
}
|
||||
|
||||
div.button_holder.css_edit {
|
||||
margin-top: 32px !important;
|
||||
margin-bottom: 0 !important;
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.theme_header {
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
|
@ -194,6 +194,8 @@ div#theme-edit-wrap{
|
||||
font-size: 16px;
|
||||
|
||||
margin-bottom: 16px;
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0;
|
||||
|
||||
span.name {
|
||||
text-transform: none;
|
||||
@ -344,6 +346,25 @@ fieldset#theme-upload {
|
||||
}
|
||||
|
||||
|
||||
// Oblika - CSS urejanje teme
|
||||
|
||||
textarea#css_content{
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
font-family: "Courier";
|
||||
}
|
||||
|
||||
div.button_holder {
|
||||
|
||||
&.css_edit {
|
||||
margin-top: 32px !important;
|
||||
margin-bottom: 0 !important;
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user