[Redizajn 1KA] - Moje ankete --> Uvoz besedila - v1

Missing: prikaz polj v preview delu.
This commit is contained in:
tejagerjovic 2022-01-03 01:54:55 +01:00
parent fb2b17c155
commit 30b95cd31d
6 changed files with 170 additions and 146 deletions

View File

@ -6154,7 +6154,7 @@ class SurveyAdminAjax {
// Preview okno // Preview okno
echo '<div id="preview_field_holder"><div id="preview_field">'; echo '<div id="preview_field_holder"><div id="preview_field">';
echo '<span class="italic">'.$lang['srv_poglejanketo2'].'</span>'; echo '<span class="caps bold">'.$lang['srv_poglejanketo2'].'</span>';
echo '</div></div>'; echo '</div></div>';
echo '</div>'; echo '</div>';

View File

@ -600,25 +600,28 @@ class NewSurvey{
// 1. sklop - ime ankete // 1. sklop - ime ankete
echo '<div class="fieldset">';
echo '<div class="fieldset">'; echo '<div class="fieldset">';
// Naslov // Naslov
echo '<div class="pre-title">' . $lang['srv_newSurvey_survey_from_text'] . '</div>';
echo '<div class="title">' . $lang['srv_noSurvey_settings'] . '</div>'; echo '<div class="title">' . $lang['srv_noSurvey_settings'] . '</div>';
echo '<div class="survey_title_text_holder">'; echo '<div class="setting_horizontal_wrapper">';
// Interno ime // Interno ime
echo '<div class="setting survey_title_text">'; echo '<div class="setting_holder">';
echo '<span class="label" style="float:left; width:180px;">' . $lang['srv_list_no_data_create'] . ':</span>'; echo '<label for="novaanketa_naslov_1">' . $lang['srv_list_no_data_create'] . ':</label>';
echo '<input type="text" id="novaanketa_naslov_1" name="novaanketa_naslov_1" placeholder="' . $lang['srv_novaanketa_polnoime'] . '" value="' . $lang['srv_novaanketa_polnoime'] . '" size="40" maxlength="' . ANKETA_NASLOV_MAXLENGTH . '" onfocus="if(this.value==\'' . $lang['srv_novaanketa_polnoime'] . '\') {this.value=\'\';}" />'; echo '<input type="text" class="large" id="novaanketa_naslov_1" name="novaanketa_naslov_1" placeholder="' . $lang['srv_novaanketa_polnoime'] . '" value="' . $lang['srv_novaanketa_polnoime'] . '" maxlength="' . ANKETA_NASLOV_MAXLENGTH . '" onfocus="if(this.value==\'' . $lang['srv_novaanketa_polnoime'] . '\') {this.value=\'\';}" />';
echo '<span id="novaanketa_naslov_1_chars">0 / ' . ANKETA_NASLOV_MAXLENGTH . '</span>'; echo '<span class="charalimit" id="novaanketa_naslov_1_chars">0 / ' . ANKETA_NASLOV_MAXLENGTH . '</span>';
echo '</div>'; echo '</div>';
// Objavljeno ime // Objavljeno ime
echo '<div class="setting survey_title_text">'; echo '<div class="setting_holder">';
echo '<span class="label" style="float:left; width:180px;">' . $lang['srv_novaanketa_kratkoime'] . ':</span>'; echo '<label for="novaanketa_akronim_1"">' . $lang['srv_novaanketa_kratkoime'] . ':</label>';
echo '<input type="text" id="novaanketa_akronim_1" name="novaanketa_akronim_1" value="' . $lang['srv_novaanketa_ime_respondenti'] . '" placeholder="' . $lang['srv_novaanketa_ime_respondenti'] . '" size="40" maxlength="' . ANKETA_AKRONIM_MAXLENGTH . '" onfocus="$(this).attr(\'changed\',\'1\'); if(this.value==\'' . $lang['srv_novaanketa_ime_respondenti'] . '\') {this.value=\'\';}" changed="0" />'; echo '<input type="text" class="large" id="novaanketa_akronim_1" name="novaanketa_akronim_1" value="' . $lang['srv_novaanketa_ime_respondenti'] . '" placeholder="' . $lang['srv_novaanketa_ime_respondenti'] . '" maxlength="' . ANKETA_AKRONIM_MAXLENGTH . '" onfocus="$(this).attr(\'changed\',\'1\'); if(this.value==\'' . $lang['srv_novaanketa_ime_respondenti'] . '\') {this.value=\'\';}" changed="0" />';
echo '<span id="novaanketa_akronim_1_chars">0 / ' . ANKETA_AKRONIM_MAXLENGTH . '</span>'; echo '<span class="charalimit" id="novaanketa_akronim_1_chars">0 / ' . ANKETA_AKRONIM_MAXLENGTH . '</span>';
echo '</div>'; echo '</div>';
// Ce ima uporabnik mape, lahko izbere v katero mapo se anketa uvrsti // Ce ima uporabnik mape, lahko izbere v katero mapo se anketa uvrsti
@ -626,10 +629,10 @@ class NewSurvey{
$show_folders = UserSetting::getInstance()->getUserSetting('survey_list_folders'); $show_folders = UserSetting::getInstance()->getUserSetting('survey_list_folders');
$sql = sisplet_query("SELECT * FROM srv_mysurvey_folder WHERE usr_id='$global_user_id' ORDER BY naslov ASC"); $sql = sisplet_query("SELECT * FROM srv_mysurvey_folder WHERE usr_id='$global_user_id' ORDER BY naslov ASC");
if($show_folders == 1 && mysqli_num_rows($sql) > 0){ if($show_folders == 1 && mysqli_num_rows($sql) > 0){
echo '<div class="setting survey_title_text">'; echo '<div class="setting_holder">';
echo '<span class="label" style="float:left; width:180px;">' . $lang['srv_newSurvey_survey_new_folder'] . ':</span>'; echo '<label for="novaanketa_folder">' . $lang['srv_newSurvey_survey_new_folder'] . ':</label>';
echo '<select name="novaanketa_folder" id="novaanketa_folder">'; echo '<select class="dropdown large" name="novaanketa_folder" id="novaanketa_folder">';
echo '<option value="0">'.$lang['srv_newSurvey_survey_new_folder_def'].'</option>'; echo '<option value="0">'.$lang['srv_newSurvey_survey_new_folder_def'].'</option>';
while($row = mysqli_fetch_array($sql)){ while($row = mysqli_fetch_array($sql)){
echo '<option value="'.$row['id'].'">'.$row['naslov'].'</option>'; echo '<option value="'.$row['id'].'">'.$row['naslov'].'</option>';
@ -642,13 +645,16 @@ class NewSurvey{
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
// 2. sklop - uvoz iz besedila // 2. sklop - uvoz iz besedila
echo '<div class="fieldset anketa_from_text">'; echo '<div class="fieldset anketa_from_text">';
// Naslov // Naslov
echo '<div class="title">' . $lang['srv_newSurvey_survey_from_text_title'] . ' '.Help::display('srv_create_survey_from_text').'</div>'; echo '<div class="title">' . $lang['srv_newSurvey_survey_from_text_title'] . ' '.Help::display('srv_create_survey_from_text').'</div>';
echo '<div class="from_text_instructions">' . $lang['srv_newSurvey_survey_from_text_text'] . '</div>'; echo '<p>' . $lang['srv_newSurvey_survey_from_text_text1'] . '</p>';
echo '<p>' . $lang['srv_newSurvey_survey_from_text_text2'] . '</p>';
echo '<p class="bottom32">' . $lang['srv_newSurvey_survey_from_text_text3'] . '</p>';
echo '<div class="from_text_sidebyside_holder">';
// Input okno za text // Input okno za text
echo '<div id="input_field_holder"><div id="input_field">'; echo '<div id="input_field_holder"><div id="input_field">';
@ -658,19 +664,20 @@ class NewSurvey{
// Preview okno // Preview okno
echo '<div id="preview_field_holder"><div id="preview_field">'; echo '<div id="preview_field_holder"><div id="preview_field">';
echo '<span class="italic">'.$lang['srv_poglejanketo2'].'</span>'; echo '<span class="caps bold">'.$lang['srv_poglejanketo2'].'</span>';
echo '</div></div>'; echo '</div></div>';
echo '</div>'; echo '</div>';
echo '</div>';
// Gumba naprej in preklici // Gumba naprej in preklici
echo '<div class="noSurvey_buttons">'; echo '<div class="button_holder">';
echo '<button class="medium white-blue" onClick="window.location=\''.$site_url . 'admin/survey/index.php\';return false;" id="noSurvey_cancel">'.$lang['srv_cancel'].'</button>';
echo '<a href="' . $site_url . 'admin/survey/index.php" title="' . $lang['srv_cancel'] . '"><span id="noSurvey_cancel">' . $lang['srv_cancel'] . '</span></a>'; echo '<button class="medium blue" onclick="newAnketaFromText();" id="noSurvey_create">'.$lang['next1'].'</button>';
echo '<a href="#" onclick="newAnketaFromText();" title="' . $lang['srv_create_survey'] . '"><span id="noSurvey_create">' . $lang['next1'] . '</span></a>'; echo '</div>';
echo '</div>';
} }
@ -804,7 +811,7 @@ class NewSurvey{
// Ce imamo prazno // Ce imamo prazno
if($text == ''){ if($text == ''){
$text = '<span class="italic">'.$lang['srv_poglejanketo2'].'</span>'; $text = '<span class="caps bold">'.$lang['srv_poglejanketo2'].'</span>';
} }
else{ else{
// Pobrisemo vmesne odvecne presledke // Pobrisemo vmesne odvecne presledke
@ -817,7 +824,7 @@ class NewSurvey{
// Wrapamo naslove (prazna vrstica spredaj) // Wrapamo naslove (prazna vrstica spredaj)
$text = preg_replace( $text = preg_replace(
'/<br \/><br \/>([^<>]+)/', '/<br \/><br \/>([^<>]+)/',
'<br /><br /><span class="title">$1</span>', '<br /><br /><span class="variable_title">$1</span>',
$text $text
); );
// Wrapamo variable (vsaka v novi vrstici) // Wrapamo variable (vsaka v novi vrstici)
@ -829,14 +836,14 @@ class NewSurvey{
// Dodamo se textbox ce je samo vprasanje // Dodamo se textbox ce je samo vprasanje
$text = preg_replace( $text = preg_replace(
'/(<span class="title">[^<>]+<\/span>)<br \/><br \/>/', '/(<span class="title">[^<>]+<\/span>)<br \/><br \/>/',
'$1<br /><input type="text" /><br /><br />', '$1<br /><input type="text" class="large" /><br /><br />',
$text $text
); );
// Wrapamo se prvo vrstico kot naslov // Wrapamo se prvo vrstico kot naslov
$text = preg_replace( $text = preg_replace(
'/([^<>]+)<br \/>/', '/([^<>]+)<br \/>/',
'<span class="title">$1</span><br />', '<span class="variable_title">$1</span><br />',
$text, 1 $text, 1
); );
// Dodamo se textbox na zadnjo vrstico ce je potrebno // Dodamo se textbox na zadnjo vrstico ce je potrebno
@ -848,7 +855,7 @@ class NewSurvey{
// Dodamo se textbox na prvo vrstico ce je potrebno // Dodamo se textbox na prvo vrstico ce je potrebno
$text = preg_replace( $text = preg_replace(
'/(<span class="title">[^<>]+<\/span>)<br \/><br \/>/', '/(<span class="title">[^<>]+<\/span>)<br \/><br \/>/',
'$1<br /><input type="text" /><br /><br />', '$1<br /><input type="text" class="large" /><br /><br />',
$text, 1 $text, 1
); );
} }

View File

@ -7067,7 +7067,9 @@ $lang = array (
'srv_newSurvey_survey_archive_error2' => "Pri uvozu ankete je prišlo do napake. Zbrane datoteke ni mogoče uvoziti.", 'srv_newSurvey_survey_archive_error2' => "Pri uvozu ankete je prišlo do napake. Zbrane datoteke ni mogoče uvoziti.",
'srv_newSurvey_survey_from_text' => "Uvoz besedila", 'srv_newSurvey_survey_from_text' => "Uvoz besedila",
'srv_newSurvey_survey_from_text_title' => "Prilepi besedilo", 'srv_newSurvey_survey_from_text_title' => "Prilepi besedilo",
'srv_newSurvey_survey_from_text_text' => "Med vprašanji mora biti prazna vrstica.<br><br>Za vsako vprašanje morajo biti kategorije odgovorov v svoji vrstici. V primeru tabele je v svoji vrstici vsako vprašanje.<br><br>Ostale vidike se uredi v urejanju (npr. sprememba vprašanja v tabelo podvprašanj, sprememba radio gumbov v checbox).", 'srv_newSurvey_survey_from_text_text1' => "Za vsako vprašanje morajo biti kategorije odgovorov v svoji vrstici. V primeru tabele je v svoji vrstici vsako vprašanje.",
'srv_newSurvey_survey_from_text_text2' => "Med vprašanji mora biti prazna vrstica.",
'srv_newSurvey_survey_from_text_text3' => "Ostale podrobnosti se lahko uredi po uvozu ankete (npr. sprememba vprašanja v tabelo podvprašanj, sprememba radio gumbov v checkbox).",
'srv_newSurvey_survey_from_text_example' => "Naslov vprašanja 1\r\nVrednost 1\r\nVrednost 2\r\nVrednost 3\r\n\r\nNaslov vprašanja 2\r\nVrednost 1\r\nVrednost 2\r\nVrednost 3", 'srv_newSurvey_survey_from_text_example' => "Naslov vprašanja 1\r\nVrednost 1\r\nVrednost 2\r\nVrednost 3\r\n\r\nNaslov vprašanja 2\r\nVrednost 1\r\nVrednost 2\r\nVrednost 3",

View File

@ -6953,7 +6953,9 @@ $lang = array (
'srv_newSurvey_survey_archive_error2' => "Import error. Selected .1ka file cannot be imported.", 'srv_newSurvey_survey_archive_error2' => "Import error. Selected .1ka file cannot be imported.",
'srv_newSurvey_survey_from_text' => "Import text", 'srv_newSurvey_survey_from_text' => "Import text",
'srv_newSurvey_survey_from_text_title' => "Paste text", 'srv_newSurvey_survey_from_text_title' => "Paste text",
'srv_newSurvey_survey_from_text_text' => "There must be a blank line between the questions.<br><br>For each question, the answer categories must be in their own line. In the case of a table, each question is in its own row.<br><br>Other aspects are edited in editing (e.g. changing a question to a subquery table, changing radio buttons to a checbox).", 'srv_newSurvey_survey_from_text_text1' => "For each question, the answer categories must be in their own line. In the case of a table, each question is in its own row.",
'srv_newSurvey_survey_from_text_text2' => "There must be a blank line between the questions.",
'srv_newSurvey_survey_from_text_text3' => "Other details can be edited after importing the survey (e.g. changing a question to a subquery table, changing radio buttons to a checbox).",
'srv_newSurvey_survey_from_text_example' => "Question 1 title\r\nValue 1\r\nValue 2\r\nValue 3\r\n\r\nQuestion 2 title\r\nValue 1\r\nValue 2\r\nValue 3", 'srv_newSurvey_survey_from_text_example' => "Question 1 title\r\nValue 1\r\nValue 2\r\nValue 3\r\n\r\nQuestion 2 title\r\nValue 1\r\nValue 2\r\nValue 3",
'srv_export_no_chart' => "No chart available", 'srv_export_no_chart' => "No chart available",

View File

@ -14418,75 +14418,79 @@ and open the template in the editor.
height: auto; height: auto;
overflow: auto; overflow: auto;
} }
#new_anketa_div #right_content .anketa_from_text .from_text_instructions { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder {
line-height: 14px; display: flex;
margin-bottom: 10px; flex-direction: row;
} }
#new_anketa_div #right_content .anketa_from_text #input_field_holder { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #input_field_holder {
float: left;
width: 50%;
height: 400px;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; flex-shrink: 0;
} }
#new_anketa_div #right_content .anketa_from_text #input_field_holder #input_field { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #input_field_holder #input_field {
width: 100%; margin-right: 32px;
height: 100%;
} }
#new_anketa_div #right_content .anketa_from_text #input_field_holder #input_field textarea { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #input_field_holder #input_field textarea {
width: 100%; width: 469px;
height: 100%; height: 509px;
box-sizing: border-box; box-sizing: border-box;
resize: none; border-color: #E5E5E5;
padding: 20px; margin-top: 0;
border: 1px #1E88E5 solid !important; padding: 16px;
} }
#new_anketa_div #right_content .anketa_from_text #input_field_holder #input_field textarea:focus::-webkit-input-placeholder { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #input_field_holder #input_field textarea:focus::-webkit-input-placeholder {
color: transparent; color: transparent;
} }
#new_anketa_div #right_content .anketa_from_text #input_field_holder #input_field textarea:focus::-moz-placeholder { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #input_field_holder #input_field textarea:focus::-moz-placeholder {
color: transparent; color: transparent;
} }
#new_anketa_div #right_content .anketa_from_text #preview_field_holder { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #preview_field_holder {
float: right;
width: 50%;
height: 400px;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; flex-shrink: 0;
} }
#new_anketa_div #right_content .anketa_from_text #preview_field_holder #preview_field { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #preview_field_holder #preview_field {
width: 100%; width: 469px;
height: 100%; height: 509px;
box-sizing: border-box; box-sizing: border-box;
overflow: auto; overflow: auto;
padding: 20px; padding: 16px;
background-color: #1E88E5; border: 1px #E5E5E5 solid;
border: 1px #1E88E5 solid; border-radius: 2px;
} }
#new_anketa_div #right_content .anketa_from_text #preview_field_holder #preview_field span.title { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #preview_field_holder #preview_field span.variable_title {
font-size: 18px; margin-top: 16px;
line-height: 30px;
} }
#new_anketa_div #right_content .anketa_from_text #preview_field_holder #preview_field span.variable { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #preview_field_holder #preview_field span.variable_title:first-of-type {
font-size: 15px; margin-top: 0px;
font-weight: 400;
} }
#new_anketa_div #right_content .anketa_from_text #preview_field_holder #preview_field span.variable input[type=radio] { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #preview_field_holder #preview_field span.variable_title input[type=text] {
border: 1px solid #C4C4C4;
box-sizing: border-box;
border-radius: 2px;
width: 245px;
margin-top: 4px;
font-family: Source Sans Pro, sans-serif;
}
#new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #preview_field_holder #preview_field span.variable_title input[type=text].large {
height: 40px;
font-size: 16px;
padding: 9px 7px;
}
#new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #preview_field_holder #preview_field span.variable {
color: #333333 !important;
margin-top: 8px;
}
#new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #preview_field_holder #preview_field span.variable input[type=radio] {
display: none !important; display: none !important;
} }
#new_anketa_div #right_content .anketa_from_text #preview_field_holder #preview_field span.variable input[type=radio] + span.enka-checkbox-radio:before { #new_anketa_div #right_content .anketa_from_text .from_text_sidebyside_holder #preview_field_holder #preview_field span.variable input[type=radio] + span.enka-checkbox-radio:before {
font-family: "Font Awesome 5 Free"; font-family: "Font Awesome 5 Free";
content: "\f111"; content: "\f111";
display: inline-block; display: inline-block;
font-size: 14px; font-size: 14px;
color: #F8F8F8; color: #C4C4C4;
letter-spacing: 8px; letter-spacing: 8px;
font-weight: 400; font-weight: 400;
} }
#new_anketa_div #right_content .anketa_from_text #preview_field_holder #preview_field span.variable input[type=radio]:checked + span.enka-checkbox-radio:before {
content: "\f192";
color: #777777;
}
input[type=radio] + span.enka-checkbox-radio { input[type=radio] + span.enka-checkbox-radio {
color: #1E88E5; color: #1E88E5;

View File

@ -439,87 +439,96 @@ $skin_selector: $red;
.anketa_from_text{ .anketa_from_text{
height: auto; height: auto;
overflow: auto; overflow: auto;
.from_text_instructions{ .from_text_sidebyside_holder {
line-height: 14px; display:flex;
margin-bottom: 10px; flex-direction: row;
}
#input_field_holder{
#input_field_holder{ box-sizing: border-box;
float: left; flex-shrink: 0;
width: 50%;
height: 400px;
box-sizing: border-box;
padding: 20px;
#input_field{
width: 100%;
height: 100%;
textarea{ #input_field{
width: 100%; margin-right: 32px;
height: 100%;
box-sizing: border-box;
resize: none; textarea{
padding: 20px; width: 469px;
height: 509px;
border: 1px $blue solid !important; box-sizing: border-box;
&:focus::-webkit-input-placeholder{ border-color: $gray;
color: transparent; margin-top: 0;
}
&:focus::-moz-placeholder{ padding: 16px;
color: transparent;
&:focus::-webkit-input-placeholder{
color: transparent;
}
&:focus::-moz-placeholder{
color: transparent;
}
} }
} }
} }
} #preview_field_holder{
#preview_field_holder{
float: right;
width: 50%;
height: 400px;
box-sizing: border-box;
padding: 20px;
#preview_field{
width: 100%;
height: 100%;
box-sizing: border-box; box-sizing: border-box;
overflow: auto; flex-shrink: 0;
padding: 20px; #preview_field{
width: 469px;
background-color: $blue; height: 509px;
border: 1px $blue solid; box-sizing: border-box;
overflow: auto;
span.title{
font-size: 18px;
line-height: 30px;
}
span.variable{
font-size: 15px;
font-weight: 400;
input[type="radio"]{ padding: 16px;
display: none !important;
border: 1px $gray solid;
border-radius: 2px;
span.variable_title{
margin-top: 16px;
&:first-of-type{
margin-top: 0px;
}
input[type="text"]{
border: 1px solid $dark-gray;
box-sizing: border-box;
border-radius: 2px;
width: 245px;
margin-top: 4px;
font-family: $font_family;
&.large {
height: 40px;
font-size: 16px;
padding: 9px 7px;
}
}
} }
input[type="radio"] + span.enka-checkbox-radio:before{
font-family: $fontawesome; span.variable{
content: "\f111";
color: $black !important;
display: inline-block; margin-top: 8px;
font-size: 14px; input[type="radio"]{
color: $light-gray; display: none !important;
letter-spacing: 8px; }
font-weight: 400; input[type="radio"] + span.enka-checkbox-radio:before{
} font-family: $fontawesome;
input[type="radio"]:checked + span.enka-checkbox-radio:before{ content: "\f111";
content: "\f192";
color: $very-dark-gray; display: inline-block;
font-size: 14px;
color: $dark-gray;
letter-spacing: 8px;
font-weight: 400;
}
} }
} }
} }