From 4830021f4128253ff47b1fc43e440764c20d2821 Mon Sep 17 00:00:00 2001 From: tejagerjovic Date: Wed, 23 Mar 2022 16:32:53 +0100 Subject: [PATCH 1/2] [Redizajn 1KA] - Objava -> Pregled - v2 --- admin/survey/SurveyAdminAjax.php | 437 +++++++++++++++ admin/survey/SurveyAdminSettings.php | 507 +++--------------- admin/survey/script/script.js | 22 + lang/1.php | 3 + lang/2.php | 3 + public/css/admin_new.css | 132 ++++- resources/fonts/FontAwesome5/scss/solid.scss | 17 + .../sass/admin_new/basic/icons/icons.scss | 25 +- .../sass/admin_new/basic/icons/standard.scss | 6 +- .../admin_new/pages/my_surveys/objava.scss | 55 +- 10 files changed, 746 insertions(+), 461 deletions(-) diff --git a/admin/survey/SurveyAdminAjax.php b/admin/survey/SurveyAdminAjax.php index 63c24244e..e079130f5 100644 --- a/admin/survey/SurveyAdminAjax.php +++ b/admin/survey/SurveyAdminAjax.php @@ -6728,6 +6728,443 @@ class SurveyAdminAjax { echo ''; } + + function ajax_publish_popup_open() { + global $lang, $site_url; + $name = $_POST['name']; + + echo ''; + + switch ($name) { + + case 'html': + + $code = ''.$lang['srv_complete_survey'].''; + + echo '

'.$lang['srv_anketa_href'].'

'; + + echo ''; + break; + + case 'htmlcount': + + $code = ''.$lang['srv_complete_survey'].''; + + echo '

'.$lang['srv_anketa_href_count'].'

'; + + echo ''; + break; + + case 'iframejs': + + $code = SurveyAdmin::getEmbed(); + + echo '

'.$lang['srv_anketa_href_ijs'].'

'; + + echo ''; + break; + + case 'iframenojs': + + $code = SurveyAdmin::getEmbed(false); + + echo '

'.$lang['srv_anketa_href_inojs'].'

'; + + echo ''; + break; + + case 'settings': // še v delu + + echo '

'.$lang['srv_publication_survey_settings'].'

'; + + echo ''; + break; + } + + echo '
'; + if ($name != 'settings') { + echo ''; + echo ''; + } + else { + echo ''; + } + echo '
'; + } } ?> \ No newline at end of file diff --git a/admin/survey/SurveyAdminSettings.php b/admin/survey/SurveyAdminSettings.php index 94bcd6518..14262a44f 100644 --- a/admin/survey/SurveyAdminSettings.php +++ b/admin/survey/SurveyAdminSettings.php @@ -2449,7 +2449,7 @@ class SurveyAdminSettings { echo '
'; - echo '

'.$lang['srv_anketa_noactive2'].'

'; + echo '

'.$lang['srv_anketa_noactive2'].'

'; //Toggle kopiran iz headerja if (SurveyInfo::getSurveyColumn('active') == 1) { @@ -2501,8 +2501,7 @@ class SurveyAdminSettings { echo '
'; - - + echo '

'.$lang['srv_publication_survey_noactive_note2'].'

'; echo ''; @@ -2519,366 +2518,56 @@ class SurveyAdminSettings { echo ''; echo ''; echo ''; - echo ''; - echo ''; - - // Povezave za skupine in jezike - echo '

'.$lang['srv_publication_survey_grouplang'].'

'; + //Lep URL - dodajanje + + // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik + $userAccess = UserAccess::getInstance($global_user_id); + if(!$userAccess->checkUserAccess($what='nice_url')){ + echo ''; + echo ''; // div.button_holder + + } + else{ + // Gumb za dodajanje lepega linka + echo ''; + + echo '
'; + echo $site_url; + echo ''; + echo ''; + echo ''; + echo '
'; + + echo ''; // div.button_holder + + + if (isset($_GET['error'])) { + + ?>'; + + // Prekratek lep url + if(strlen($_GET['error']) <= 2) + echo '

'.$_GET['error'].' '.$lang['srv_nice_url_short'].'

'; + // Predolg lep url + elseif(strlen($_GET['error']) > 20) + echo '

'.$_GET['error'].' '.$lang['srv_nice_url_long'].'

'; + // Ze obstaja + else + echo '

'.$_GET['error'].' '.$lang['srv_nice_url_taken'].'

'; + + echo ''; + } + + } + + // Zlistamo nice URL, povezave za skupine in jezike $this->niceUrlSettings(); - /* --- privzete nastavitve - echo ''; - - $base_url = $site_url.'admin/survey/index.php?anketa='.$this->anketa; - # preberomo osnovne nastavitve - $row = SurveyInfo::getInstance()->getSurveyRow(); - - echo '
'.($row['active']==0 ? $lang['srv_default_setting_unactive'] : $lang['srv_default_setting']).''; - - // Ce imamo dostop do zavihka urejanje - if($d->checkDostopSub('edit')){ - - # Trajanje - $starts = explode('-',$row['starts']); - $starts = $starts[2].'.'.$starts[1].'.'.$starts[0]; - $expire = explode('-',$row['expire']); - $expire = $expire[2].'.'.$expire[1].'.'.$expire[0]; - echo '

'.$lang['srv_starts'].':'.$starts.'

'; - if ( $row['expire'] == PERMANENT_DATE ) { - #trajna - echo '

'.$lang['srv_trajna_anketa'].':'.($row['expire'] == PERMANENT_DATE ? $lang['yes'] : $lang['no']).'

'; - } else { - echo '

'.$lang['srv_expire'].':'.$expire.'

'; - } - - // Skin ankete - if ($row['skin_profile'] == 0) { - $skin_name = $row['skin']; - } - else { - $sqla = sisplet_query("SELECT name FROM srv_theme_profiles WHERE id = '".$row['skin_profile']."'"); - $rowa = mysqli_fetch_array($sqla); - $skin_name = $rowa['name']; - } - //echo '

'.$lang['srv_themes'].':'.$row['skin'].'

'; - echo '

'.$lang['srv_themes'].':'.$skin_name.'

'; - - # Jezik - $lang_old = $lang; - $lang_admin = (int)$row['lang_admin']; - $lang_resp = (int)$row['lang_resp']; - $lang_array = array(); - $lang_array[0] = $lang['srv_language_not_set']; - // Preberemo razpoložljive jezikovne datoteke - if ($dir = opendir('../../lang')) { - while (($file = readdir($dir)) !== false) { - if ($file != '.' AND $file != '..') { - if (is_numeric(substr($file, 0, strpos($file, '.')))) { - $i = substr($file, 0, strpos($file, '.')); - $file = '../../lang/'.$i.'.php'; - if (file_exists($file)) { - include($file); - $lang_array[$i] = $lang['language']; - } - } - } - } - } - - $lang = $lang_old; - $resp_change_lang = SurveySetting::getInstance()->getSurveyMiscSetting('resp_change_lang'); - //echo '

'.$lang['srv_language_admin_1'].':

'; - echo '

'.$lang['srv_language_admin_0'].':'.$lang_array[$lang_admin].' / '.$lang_array[$lang_resp].'

'; - - #obveščanje - - // jezikovni linki - $p = new Prevajanje($this->anketa); - $p->dostop(); - $jeziki = $p->get_all_translation_langs(); - if (count($jeziki) > 0) { - echo '

' . $lang['srv_trans_lang'] . ': '; - $i = 0; - foreach ($jeziki AS $key => $val) { - if ($i++ != 0) echo ', '; - echo ''.$val.''; - } - echo '

'; - } - #piškotki - echo '

'.$lang['srv_cookie'].':'.$lang['srv_cookie_'.$row['cookie']].'

'; - echo '

'.$lang['srv_cookie_return'].':'.($row['cookie_return'] == 0 ? $lang['srv_cookie_return_start'] : $lang['srv_cookie_return_middle']).'

'; - - #more - več - echo ''; - echo ''; - echo '
'; - - if ($row['cookie'] > -1) { - # če je piškotek dlje kot do konca nakete lahko izbere tudi druge možnosti - echo '

'.$lang['srv_return_finished'].':'.($row['return_finished'] == 1 ? $lang['srv_return_finished_yes'] : $lang['srv_return_finished_no']).'

'; - } else { - # ker je piškotek samo do konca ankete se ne more vrnit ali urejat - echo '

'.$lang['srv_return_finished'].':'. $lang['srv_return_finished_no'] .'

'; - } - - echo '

'.$lang['srv_multilang'].':'.($row['multilang'] == 1 ? $lang['yes'] : $lang['no'] ).'

'; - - echo '

'.$lang['srv_user'].':'; - if ($row['user_from_cms'] == 1) { - echo $lang['srv_respondent']; - } elseif ($row['user_from_cms'] == 2) { - echo $lang['srv_vnasalec']; - } elseif ($row['user_from_cms'] == 0) { - echo $lang['no1']; - } - echo '

'; - - echo '

'.$lang['srv_block_ip'].':'; - if ($row['block_ip'] == 0) { - echo $lang['no1']; - } elseif ($row['block_ip'] == 10) { - echo '10 min'; - } elseif ($row['block_ip'] == 20) { - echo '20 min'; - } elseif ($row['block_ip'] == 60) { - echo '60 min'; - } elseif ($row['block_ip'] == 720) { - echo '12 '.$lang['hour_hours2']; - } elseif ($row['block_ip'] == 1440) { - echo '24 '.$lang['hour_hours2']; - } - echo ''; - echo '

'; - - - # user from cms - if ($row['user_from_cms']>0) { - echo '

'.$lang['srv_user_cms_show'].':'.($lang['srv_user_cms_email']).'

'; - } - echo '

'.$lang['srv_vote_limit'].':'.($row['vote_limit'] == 0 ? $lang['no'] : $lang['yes']).'

'; - - echo '

'.$lang['srv_vote_count'].':'.($row['vote_limit'] == 0 ? '/' : $row['vote_count']).'

'; - # Obveščanje - // preberemo nastavitve alertov - $sqlAlert = sisplet_query("SELECT * FROM srv_alert WHERE ank_id = '".$this->anketa."'"); - if (mysqli_num_rows($sqlAlert) > 0) { - $rowAlert = mysqli_fetch_assoc($sqlAlert); - } else { - SurveyAlert::getInstance()->Init($anketa, $global_user_id); - $rowAlert = SurveyAlert::setDefaultAlertBeforeExpire(); - } - - $alert_finish = array(); - $alert_expire = array(); - $alert_delete = array(); - $alert_active = array(); - if ($rowAlert['finish_respondent'] == 1) { - $alert_finish[] = $lang['srv_alert_respondent']; - } - if ($rowAlert['finish_respondent_cms'] == 1) { - $alert_finish[] = $lang['srv_alert_respondent_cms']; - } - if ($rowAlert['finish_author'] == 1) { - $alert_finish[] = $lang['srv_info_author']; - } - if ($rowAlert['finish_other'] == 1) { - $alert_finish[] = $lang['email_prejemniki']; - } - if ($rowAlert['expire_author'] == 1) { - $alert_expire[] = $lang['srv_info_author']; - } - if ($rowAlert['expire_other'] == 1) { - $alert_expire[] = $lang['email_prejemniki']; - } - if ($rowAlert['delete_author'] == 1) { - $alert_delete[] = $lang['srv_info_author']; - } - if ($rowAlert['delete_other'] == 1) { - $alert_delete[] = $lang['email_prejemniki']; - } - if ($rowAlert['active_author'] == 1) { - $alert_active[] = $lang['srv_info_author']; - } - if ($rowAlert['active_other'] == 1) { - $alert_active[] = $lang['email_prejemniki']; - } - echo '

'.$lang['srv_alert_completed_2'].':'.(count($alert_finish) ? implode(',',$alert_finish) : $lang['no']).'

'; - echo '

'.$lang['srv_alert_expired_2'].':'.(count($alert_expire) ? implode(',',$alert_expire) : $lang['no']).'

'; - echo '

'.$lang['srv_alert_active_2'].':'.(count($alert_active) ? implode(',',$alert_active) : $lang['no']).'

'; - echo '

'.$lang['srv_alert_delete_2'].':'.(count($alert_delete) ? implode(',',$alert_delete) : $lang['no']).'

'; - - echo '

'; - echo ''; - echo $lang['srv_nastavitve_ankete_all'].''; - echo '

'; - echo '
'; - } - // Nimamo dostopa do zavihka urejanje - ni nobenih linkov - else{ - # Trajanje - $starts = explode('-',$row['starts']); - $starts = $starts[2].'.'.$starts[1].'.'.$starts[0]; - $expire = explode('-',$row['expire']); - $expire = $expire[2].'.'.$expire[1].'.'.$expire[0]; - echo '

'.$lang['srv_starts'].': '.$starts.'

'; - if ( $row['expire'] == PERMANENT_DATE ) { - #trajna - echo '

'.$lang['srv_trajna_anketa'].': '.($row['expire'] == PERMANENT_DATE ? $lang['yes'] : $lang['no']).'

'; - } else { - echo '

'.$lang['srv_expire'].': '.$expire.'

'; - } - - echo '

'.$lang['srv_themes'].': '.$row['skin'].'

'; - - # Jezik - $lang_old = $lang; - $lang_admin = (int)$row['lang_admin']; - $lang_resp = (int)$row['lang_resp']; - $lang_array = array(); - $lang_array[0] = $lang['srv_language_not_set']; - // Preberemo razpoložljive jezikovne datoteke - if ($dir = opendir('../../lang')) { - while (($file = readdir($dir)) !== false) { - if ($file != '.' AND $file != '..') { - if (is_numeric(substr($file, 0, strpos($file, '.')))) { - $i = substr($file, 0, strpos($file, '.')); - $file = '../../lang/'.$i.'.php'; - if (file_exists($file)) { - include($file); - $lang_array[$i] = $lang['language']; - } - } - } - } - } - - $lang = $lang_old; - $resp_change_lang = SurveySetting::getInstance()->getSurveyMiscSetting('resp_change_lang'); - echo '

'.$lang['srv_language_admin_0'].': '.$lang_array[$lang_admin].' / '.$lang_array[$lang_resp].'

'; - - #obveščanje - - // jezikovni linki - $p = new Prevajanje($this->anketa); - $jeziki = $p->get_all_translation_langs(); - if (count($jeziki) > 0) { - echo '

' . $lang['srv_trans_lang'] . ': '; - $i = 0; - foreach ($jeziki AS $key => $val) { - if ($i++ != 0) echo ', '; - echo ''.$val.''; - } - echo '

'; - } - #piškotki - echo '

'.$lang['srv_cookie'].': '.$lang['srv_cookie_'.$row['cookie']].'

'; - echo '

'.$lang['srv_cookie_return'].': '.($row['cookie_return'] == 0 ? $lang['srv_cookie_return_start'] : $lang['srv_cookie_return_middle']).'

'; - - #more - več - echo ''; - echo ''; - echo '
'; - - if ($row['cookie'] > -1) { - # če je piškotek dlje kot do konca nakete lahko izbere tudi druge možnosti - echo '

'.$lang['srv_return_finished'].': '.($row['return_finished'] == 1 ? $lang['srv_return_finished_yes'] : $lang['srv_return_finished_no']).'

'; - } else { - # ker je piškotek samo do konca ankete se ne more vrnit ali urejat - echo '

'.$lang['srv_return_finished'].': '. $lang['srv_return_finished_no'] .'

'; - } - - echo '

'.$lang['srv_multilang'].': '.($row['multilang'] == 1 ? $lang['yes'] : $lang['no'] ).'

'; - - echo '

'.$lang['srv_user'].': '; - if ($row['user_from_cms'] == 1) { - echo $lang['srv_respondent']; - } elseif ($row['user_from_cms'] == 2) { - echo $lang['srv_vnasalec']; - } elseif ($row['user_from_cms'] == 0) { - echo $lang['no1']; - } - echo '

'; - - echo '

'.$lang['srv_block_ip'].': '; - if ($row['block_ip'] == 0) { - echo $lang['no1']; - } elseif ($row['block_ip'] == 10) { - echo '10 min'; - } elseif ($row['block_ip'] == 20) { - echo '20 min'; - } elseif ($row['block_ip'] == 60) { - echo '60 min'; - } elseif ($row['block_ip'] == 720) { - echo '12 '.$lang['hour_hours2']; - } elseif ($row['block_ip'] == 1440) { - echo '24 '.$lang['hour_hours2']; - } - echo '

'; - - - # user from cms - if ($row['user_from_cms']>0) { - echo '

'.$lang['srv_user_cms_show'].': '.($lang['srv_user_cms_email']).'

'; - } - echo '

'.$lang['srv_vote_limit'].': '.($row['vote_limit'] == 0 ? $lang['no'] : $lang['yes']).'

'; - - echo '

'.$lang['srv_vote_count'].': '.($row['vote_limit'] == 0 ? '/' : $row['vote_count']).'

'; - # Obveščanje - // preberemo nastavitve alertov - $sqlAlert = sisplet_query("SELECT * FROM srv_alert WHERE ank_id = '".$this->anketa."'"); - if (mysqli_num_rows($sqlAlert) > 0) { - $rowAlert = mysqli_fetch_assoc($sqlAlert); - } else { - SurveyAlert::getInstance()->Init($anketa, $global_user_id); - $rowAlert = SurveyAlert::setDefaultAlertBeforeExpire(); - } - - $alert_finish = array(); - $alert_expire = array(); - $alert_delete = array(); - $alert_active = array(); - if ($rowAlert['finish_respondent'] == 1) { - $alert_finish[] = $lang['srv_alert_respondent']; - } - if ($rowAlert['finish_respondent_cms'] == 1) { - $alert_finish[] = $lang['srv_alert_respondent_cms']; - } - if ($rowAlert['finish_author'] == 1) { - $alert_finish[] = $lang['srv_info_author']; - } - if ($rowAlert['finish_other'] == 1) { - $alert_finish[] = $lang['email_prejemniki']; - } - if ($rowAlert['expire_author'] == 1) { - $alert_expire[] = $lang['srv_info_author']; - } - if ($rowAlert['expire_other'] == 1) { - $alert_expire[] = $lang['email_prejemniki']; - } - if ($rowAlert['delete_author'] == 1) { - $alert_delete[] = $lang['srv_info_author']; - } - if ($rowAlert['delete_other'] == 1) { - $alert_delete[] = $lang['email_prejemniki']; - } - if ($rowAlert['active_author'] == 1) { - $alert_active[] = $lang['srv_info_author']; - } - if ($rowAlert['active_other'] == 1) { - $alert_active[] = $lang['email_prejemniki']; - } - echo '

'.$lang['srv_alert_completed_2'].': '.(count($alert_finish) ? implode(',',$alert_finish) : $lang['no']).'

'; - echo '

'.$lang['srv_alert_expired_2'].': '.(count($alert_expire) ? implode(',',$alert_expire) : $lang['no']).'

'; - echo '

'.$lang['srv_alert_active_2'].': '.(count($alert_active) ? implode(',',$alert_active) : $lang['no']).'

'; - echo '

'.$lang['srv_alert_delete_2'].': '.(count($alert_delete) ? implode(',',$alert_delete) : $lang['no']).'

'; - - echo '
'; - } --- privzete nastavitve */ - - - // Več načinov deljenja ankete echo '

'.$lang['srv_publication_survey_more'].'

'; @@ -2894,18 +2583,18 @@ class SurveyAdminSettings { echo ''; //HTML koda - echo '
'; + echo '
'; echo '
'; - echo '
'; + echo '
'; echo $lang['srv_anketa_href']; echo '
'; echo $lang['srv_anketa_href_text']; echo '
'; //HTML koda + števec - echo '
'; + echo '
'; echo '
'; - echo '
'; + echo '
'; echo $lang['srv_anketa_href_count']; echo '
'; echo $lang['srv_anketa_href_count_text']; @@ -2918,22 +2607,23 @@ class SurveyAdminSettings { echo $lang['srv_anketa_href_friends']; echo '
'; echo $lang['srv_anketa_href_friends_text']; + echo 'friend share'; echo '
'; // iFrame - js - echo '
'; + echo '
'; echo '
'; echo '
'; - echo $lang['srv_anketa_href_ijs']; + echo $lang['srv_anketa_href_ijs'].Help :: display('srv_embed_js'); echo '
'; echo $lang['srv_anketa_href_ijs_text']; echo '
'; // iFrame - brez js - echo '
'; + echo '
'; echo '
'; echo '
'; - echo $lang['srv_anketa_href_inojs']; + echo $lang['srv_anketa_href_inojs'].Help :: display('srv_embed_fixed'); echo '
'; echo $lang['srv_anketa_href_inojs_text']; echo '
'; @@ -2982,22 +2672,29 @@ class SurveyAdminSettings { echo ' ('.$lang['srv_testrianje_how'].')

'; echo '
'; - } + }*/ + echo '
'; - // Zlistamo vse lepe url-je + //Zlistamo vse lepe url-je + $title = 0; $sqll = sisplet_query("SELECT id, link FROM srv_nice_links WHERE ank_id = '$this->anketa' ORDER BY id ASC"); while ($rowl = mysqli_fetch_assoc($sqll)) { + if ($title == 0) { + echo ''; + $title = 1; + } $link_nice = $site_url . $rowl['link']; - echo '
'; - echo ''.$link_nice.''.(count($lang_array) > 0 ? ' - '.$base_lang_resp : '').''; - - }*/ - - // Navaden url - echo '
'; + echo '
'; + echo ''.$link_nice.''.(count($lang_array) > 0 ? ' - '.$base_lang_resp : ''); + echo ''; + echo ''; + echo '
'; + } + echo ''; + // Navaden url $row = SurveyInfo::getInstance()->getSurveyRow(); $p->include_lang($p->lang_resp); @@ -3043,62 +2740,6 @@ class SurveyAdminSettings { } } } - - /*/ Okno za dodajanje lepega url-ja - echo '
'.$lang['srv_nice_url'].''; - - // Zlistamo vse lepe url-je - $sqll = sisplet_query("SELECT id, link FROM srv_nice_links WHERE ank_id = '$this->anketa' ORDER BY id ASC"); - while ($rowl = mysqli_fetch_assoc($sqll)) { - - echo ''; - echo ''.$site_url.$rowl['link'].''; - - // Remove nice url - echo ''; - - echo '
'; - } - - echo '
'; - - // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik - $userAccess = UserAccess::getInstance($global_user_id); - if(!$userAccess->checkUserAccess($what='nice_url')){ - $userAccess->displayNoAccess($what='nice_url'); - } - else{ - // Gumb za dodajanje lepega linka - //echo '
' . $lang['srv_nice_url'] . ' '.Help::display('srv_nice_url'); - echo ' '.Help::display('srv_nice_url'); - - - echo '


'; - - echo $site_url.' '; - - echo '
'; - echo '
'; - - if (isset($_GET['error'])) { - - // Prekratek lep url - if(strlen($_GET['error']) <= 2) - echo '

'.$_GET['error'].' '.$lang['srv_nice_url_short'].''; - // Predolg lep url - elseif(strlen($_GET['error']) > 20) - echo '

'.$_GET['error'].' '.$lang['srv_nice_url_long'].''; - // Ze obstaja - else - echo '

'.$_GET['error'].' '.$lang['srv_nice_url_taken'].''; - } - - echo '
'; - } - - echo '

'; - - echo '
';*/ } function anketa_vabila_url() { diff --git a/admin/survey/script/script.js b/admin/survey/script/script.js index d4c7ca141..d9bdb4a88 100644 --- a/admin/survey/script/script.js +++ b/admin/survey/script/script.js @@ -5536,3 +5536,25 @@ function top_note_hide(id) { $('#'+id).addClass('displayNone'); } + +//Objava - pregled (gumbi) +function publishPopupOpen(name){ + + $('#fade').fadeTo('slow', 1); + $('#general_popup').html('').fadeIn('slow'); + $("#general_popup").load('ajax.php?a=publish_popup_open', {anketa: srv_meta_anketa_id, name: name}); +} + +//Objava - prikaz dodajanje lepega linka + +function toggleNiceURL(type) { + + if (type == 'show') { + $("#nice_url_button").addClass('displayNone'); + $("#nice_url_holder").removeClass('displayNone'); + } + else if (type == 'hide') { + $("#nice_url_button").removeClass('displayNone'); + $("#nice_url_holder").addClass('displayNone'); + } +} diff --git a/lang/1.php b/lang/1.php index 2f17fb669..8864054a6 100644 --- a/lang/1.php +++ b/lang/1.php @@ -4289,7 +4289,10 @@ $lang = array ( "srv_publication_survey_links" => "Delite povezavo do ankete", "srv_publication_survey_links_note" => "Spodaj je povezava do vprašalnika, kjer se podatki normalno shranjujejo v bazo. To povezavo sporočite dejanskim respondentom, denimo z objavo na družbenih omrežjih, forumih, prek e-maila, ipd.", "srv_publication_survey_noactive_note" => "Če želite zbirati realne podatke, je anketo treba aktivirati.", + "srv_publication_survey_noactive_note2" => "Z aktiviranjem potrjujete privzete nastavitve.", + "srv_publication_survey_settings" => "Privzete nastavitve ankete", "srv_publication_survey_grouplang" => "Povezave za skupine in jezike", + "srv_publication_survey_niceurl" => "Lepe URL povezave", "srv_publication_survey_more" => "Več načinov deljenja ankete", "srv_publication_survey_copylink" => "Kopiraj povezavo", "srv_publication_advanced_url" => "Napredne URL povezave", diff --git a/lang/2.php b/lang/2.php index 3b3f356cb..b9543091d 100644 --- a/lang/2.php +++ b/lang/2.php @@ -4265,7 +4265,10 @@ $lang = array ( "srv_publication_survey_warnings" => "Survey has errors, warnings, recommendationsor unresolved comments which you can review here: ", "srv_publication_survey_noactive" => "Your survey has not been activated yet", "srv_publication_survey_noactive_note" => "To collect real data, the survey must be activated.", + "srv_publication_survey_noactive_note2" => "By activating the survey, you confirm the default settings.", + "srv_publication_survey_settings" => "Default survey settings", "srv_publication_survey_grouplang" => "Group and language links", + "srv_publication_survey_niceurl" => "Custom URLs", "srv_publication_survey_copylink" => "Copy link", "srv_publication_survey_more" => "More ways to share the survey", "srv_publication_survey_links" => "Share survey link", diff --git a/public/css/admin_new.css b/public/css/admin_new.css index 3f88c1338..7dda4b893 100644 --- a/public/css/admin_new.css +++ b/public/css/admin_new.css @@ -5168,71 +5168,112 @@ a.faicon { display: inline-block; font-weight: 900; } + +span.fa-brands, +a.fa-brands { + font-family: "Font Awesome 5 Brands"; + color: inherit; + display: inline-block; + font-weight: 400; +} + span.faicon.empty, -a.faicon.empty { +a.faicon.empty, +span.fa-brands.empty, +a.fa-brands.empty { font-weight: 400; } span.faicon.link-right, -a.faicon.link-right { +a.faicon.link-right, +span.fa-brands.link-right, +a.fa-brands.link-right { margin-right: 10px; } span.faicon.link-left, -a.faicon.link-left { +a.faicon.link-left, +span.fa-brands.link-left, +a.fa-brands.link-left { margin-left: 8px; } span.faicon.large::before, -a.faicon.large::before { +a.faicon.large::before, +span.fa-brands.large::before, +a.fa-brands.large::before { font-size: 32px !important; } span.faicon.medium::before, -a.faicon.medium::before { +a.faicon.medium::before, +span.fa-brands.medium::before, +a.fa-brands.medium::before { font-size: 24px !important; } span.faicon.title20::before, -a.faicon.title20::before { +a.faicon.title20::before, +span.fa-brands.title20::before, +a.fa-brands.title20::before { font-size: 20px !important; margin-left: 16px; } span.faicon.normal::before, -a.faicon.normal::before { +a.faicon.normal::before, +span.fa-brands.normal::before, +a.fa-brands.normal::before { font-size: 16px !important; } span.faicon.small::before, -a.faicon.small::before { +a.faicon.small::before, +span.fa-brands.small::before, +a.fa-brands.small::before { font-size: 10px !important; } span.faicon.yellow, -a.faicon.yellow { +a.faicon.yellow, +span.fa-brands.yellow, +a.fa-brands.yellow { color: #FFC700; } span.faicon.blue, -a.faicon.blue { +a.faicon.blue, +span.fa-brands.blue, +a.fa-brands.blue { color: #1E88E5; } span.faicon.red, -a.faicon.red { +a.faicon.red, +span.fa-brands.red, +a.fa-brands.red { color: #FF0000; } span.faicon.ultra_dark_gray, -a.faicon.ultra_dark_gray { +a.faicon.ultra_dark_gray, +span.fa-brands.ultra_dark_gray, +a.fa-brands.ultra_dark_gray { color: #555555; } span.faicon.green, -a.faicon.green { +a.faicon.green, +span.fa-brands.green, +a.fa-brands.green { color: #00C437; } span.faicon.aslink, -a.faicon.aslink { +a.faicon.aslink, +span.fa-brands.aslink, +a.fa-brands.aslink { cursor: pointer; color: #1E88E5; transition: 0.2s; } span.faicon.aslink:hover, -a.faicon.aslink:hover { +a.faicon.aslink:hover, +span.fa-brands.aslink:hover, +a.fa-brands.aslink:hover { color: #0059ab; } span.faicon.fa-stack, -a.faicon.fa-stack { +a.faicon.fa-stack, +span.fa-brands.fa-stack, +a.fa-brands.fa-stack { height: 1em; line-height: 1em; width: 1em; @@ -5247,16 +5288,22 @@ div.icon_holder { } div.icon_holder span.faicon, div.icon_holder a.faicon, +div.icon_holder span.fa-brands, +div.icon_holder a.fa-brands, div.icon_holder button.ui-datepicker-trigger { margin-left: 12px; } div.icon_holder.multiple span.faicon, -div.icon_holder.multiple a.faicon { +div.icon_holder.multiple a.faicon, +div.icon_holder.multiple span.fa-brands, +div.icon_holder.multiple a.fa-brands { margin-left: 0; margin-right: 16px; } div.icon_holder.multiple span.faicon:last-of-type, -div.icon_holder.multiple a.faicon:last-of-type { +div.icon_holder.multiple a.faicon:last-of-type, +div.icon_holder.multiple span.fa-brands:last-of-type, +div.icon_holder.multiple a.fa-brands:last-of-type { margin-right: 0px; } @@ -6052,7 +6099,7 @@ span.faicon.link-chain::before { content: "\f0c1"; } -span.faicon.html5::before { +span.fa-brands.html5::before { content: "\f13b"; } @@ -6065,6 +6112,10 @@ span.faicon.checkbox-empty::before { font-weight: 400 !important; } +span.faicon.fa-1::before { + content: "1"; +} + /* To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates @@ -10957,6 +11008,7 @@ div#vabila div.button_holder { } div#vabila div.button_holder button { margin: 0 32px 0 8px; + min-width: 114px; } div#vabila div.button_holder div.input_box { border: 1px solid #C4C4C4; @@ -10970,12 +11022,36 @@ div#vabila div.button_holder div.input_box input { font-size: 16px; width: 90%; } -div#vabila div.grouplang { +div#vabila div.button_holder div#nice_url_holder { + display: flex; + flex-direction: row; + align-items: center; +} +div#vabila div.button_holder div#nice_url_holder input { + margin: 0 8px; + width: 200px; +} +div#vabila div.button_holder div#nice_url_holder button { + margin-right: 8px; +} +div#vabila div#nice_url_error { + width: 100%; + text-align: right; +} +div#vabila p.survey_links { + margin-top: 16px; +} +div#vabila p.survey_links:first-of-type { + margin-top: 0; +} +div#vabila div.grouplang, +div#vabila div.niceurl { margin-top: 16px; display: flex; align-items: center; } -div#vabila div.grouplang span.faicon { +div#vabila div.grouplang span.faicon, +div#vabila div.niceurl span.faicon { margin-left: 9px; cursor: pointer; } @@ -11019,12 +11095,24 @@ div#vabila div.more div.more_block div.more_title div.more_title_icon { margin-right: 8px; position: relative; } -div#vabila div.more div.more_block div.more_title div.more_title_icon span.stopwatch20 { +div#vabila div.more div.more_block div.more_title div.more_title_icon span.fa-1 { font-size: 8px; position: absolute; bottom: 1px; right: 1px; } +div#vabila div.more div.more_block div.more_title a.help { + color: inherit; + text-decoration: none; + margin-left: 5px; +} + +div.popup_content.publish textarea { + width: 568px; + padding: 8px; + display: block; + overflow: auto; +} .dashboard_top_settings { display: flex; diff --git a/resources/fonts/FontAwesome5/scss/solid.scss b/resources/fonts/FontAwesome5/scss/solid.scss index 5d53a0369..72b0755e9 100644 --- a/resources/fonts/FontAwesome5/scss/solid.scss +++ b/resources/fonts/FontAwesome5/scss/solid.scss @@ -16,8 +16,25 @@ url('#{$fa-font-path}/fa-solid-900.svg#fontawesome') format('svg'); } +@font-face { + font-family: 'Font Awesome 5 Brands'; + font-style: normal; + font-weight: 400; + src: url('#{$fa-font-path}/fa-brands-400.eot'); + src: url('#{$fa-font-path}/fa-brands-400.eot?#iefix') format('embedded-opentype'), + url('#{$fa-font-path}/fa-brands-400.woff2') format('woff2'), + url('#{$fa-font-path}/fa-brands-400.woff') format('woff'), + url('#{$fa-font-path}/fa-brands-400.ttf') format('truetype'), + url('#{$fa-font-path}/fa-brands-400.svg#fontawesome') format('svg'); +} + .fa, .fas { font-family: 'Font Awesome 5 Free'; font-weight: 900; } + +.fa-brands { + font-family: 'Font Awesome 5 Brands'; + font-weight: 400; +} diff --git a/resources/sass/admin_new/basic/icons/icons.scss b/resources/sass/admin_new/basic/icons/icons.scss index a79f4b090..6b3d4bf7a 100644 --- a/resources/sass/admin_new/basic/icons/icons.scss +++ b/resources/sass/admin_new/basic/icons/icons.scss @@ -1,9 +1,27 @@ +//navadne ikone span.faicon, a.faicon{ font-family: $fontawesome; color: inherit; display: inline-block; font-weight: $heavy; +} + +//fa-brands ikone +span.fa-brands, +a.fa-brands{ + font-family: 'Font Awesome 5 Brands'; + color: inherit; + display: inline-block; + font-weight: 400; +} + + +//Styling +span.faicon, +a.faicon, +span.fa-brands, +a.fa-brands { &.empty { font-weight: $regular; @@ -93,6 +111,8 @@ div.icon_holder { //Ikone desno ob elementih span.faicon, a.faicon, + span.fa-brands, + a.fa-brands, button.ui-datepicker-trigger{ margin-left: 12px; } @@ -100,7 +120,9 @@ div.icon_holder { //Samo ikone - več ikon skupaj &.multiple { span.faicon, - a.faicon{ + a.faicon, + span.fa-brands, + a.fa-brands{ margin-left: 0; margin-right: 16px; &:last-of-type { @@ -110,7 +132,6 @@ div.icon_holder { } } - @import "radio"; @import "standard"; @import "modules"; diff --git a/resources/sass/admin_new/basic/icons/standard.scss b/resources/sass/admin_new/basic/icons/standard.scss index db5c9bd2b..dd3287206 100644 --- a/resources/sass/admin_new/basic/icons/standard.scss +++ b/resources/sass/admin_new/basic/icons/standard.scss @@ -691,7 +691,7 @@ span.faicon.link-chain::before{ } //HTML5 -span.faicon.html5::before{ +span.fa-brands.html5::before{ content: "\f13b"; } @@ -705,3 +705,7 @@ span.faicon.checkbox-empty::before{ content: "\f0c8"; font-weight: 400 !important; } + +span.faicon.fa-1::before{ + content: "\31"; +} \ No newline at end of file diff --git a/resources/sass/admin_new/pages/my_surveys/objava.scss b/resources/sass/admin_new/pages/my_surveys/objava.scss index f26981700..2fcedc2a2 100644 --- a/resources/sass/admin_new/pages/my_surveys/objava.scss +++ b/resources/sass/admin_new/pages/my_surveys/objava.scss @@ -157,12 +157,13 @@ div#vabila { } // Polje za kopiranje linka - div.button_holder { + div.button_holder{ align-items: center; margin-bottom: 16px; button { margin: 0 32px 0 8px; + min-width: 114px; } div.input_box { @@ -178,10 +179,39 @@ div#vabila { width: 90% } } + + //Nice URL + div#nice_url_holder { + display: flex; + flex-direction: row; + align-items: center; + + input { + margin: 0 8px; + width: 200px; + } + + button { + margin-right: 8px; + } + } + } + + div#nice_url_error { + width: 100%; + text-align: right; } //Seznam linkov za skupine/jezike - div.grouplang { + p.survey_links { + margin-top: 16px; + &:first-of-type { + margin-top: 0; + } + } + + div.grouplang, + div.niceurl { margin-top: 16px; display: flex; align-items: center; @@ -245,7 +275,7 @@ div#vabila { position: relative; - span.stopwatch20 { + span.fa-1 { font-size: 8px; position: absolute; @@ -253,10 +283,29 @@ div#vabila { right: 1px } } + + a.help { + color: inherit; + text-decoration: none; + margin-left: 5px; + } } } } +} + +// Več načinov deljenja - popup + +div.popup_content { + &.publish { + textarea { + width: 568px; + padding: 8px; + display: block; + overflow: auto; + } + } } \ No newline at end of file From fab84fd36b0a12b70c33a6781f20a131500da60c Mon Sep 17 00:00:00 2001 From: tejagerjovic Date: Wed, 23 Mar 2022 17:36:53 +0100 Subject: [PATCH 2/2] [Redizajn 1KA] - Urejanje --> Oblika --> Prilagoditev teme - v3 --- admin/survey/classes/class.SurveyThemeEditor.php | 4 ++-- lang/1.php | 3 ++- lang/2.php | 3 ++- public/css/admin_new.css | 5 ++++- resources/sass/admin_new/pages/my_surveys/oblika_teme.scss | 6 +++++- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/admin/survey/classes/class.SurveyThemeEditor.php b/admin/survey/classes/class.SurveyThemeEditor.php index e5f9d2b01..fdc9168fa 100644 --- a/admin/survey/classes/class.SurveyThemeEditor.php +++ b/admin/survey/classes/class.SurveyThemeEditor.php @@ -69,7 +69,7 @@ class SurveyThemeEditor { echo '
'; echo '

'.$lang['srv_skinname'].'

'; - echo ''; + echo ''; // Mobilni skin nima logotipa if($mobile != 1){ @@ -302,7 +302,7 @@ class SurveyThemeEditor { echo '
'; - echo '

'.$lang['srv_te_question_border'].'

'; echo ''; echo ''; echo ''; diff --git a/lang/1.php b/lang/1.php index 8864054a6..4776543c0 100644 --- a/lang/1.php +++ b/lang/1.php @@ -6187,7 +6187,8 @@ $lang = array ( 'srv_te_survey_h_text' => 'Naslov ankete', 'srv_te_outer_frame' => 'Zunanji okvir', 'srv_te_question_text' => 'Besedilo vprašanja', - 'srv_te_question_border' => 'Vprašanja', + 'srv_te_question' => 'Vprašanja', + 'srv_te_question_border' => 'Obroba', 'srv_te_question_border_0' => 'Brez', 'srv_te_question_border_1' => 'Črta', 'srv_te_question_border_2' => 'Okvir', diff --git a/lang/2.php b/lang/2.php index b9543091d..f4712f1d0 100644 --- a/lang/2.php +++ b/lang/2.php @@ -6106,7 +6106,8 @@ $lang = array ( 'srv_te_custom_font_style_keywords_bold' => 'Bold', 'srv_te_custom_font_style_keywords_italic' => 'Italic', 'srv_te_custom_font_style_keywords_underline'=> 'Underline', - 'srv_te_question_border' => 'Questions', + 'srv_te_question' => 'Questions', + 'srv_te_question_border' => 'Border', 'srv_te_question_border_0' => 'None', 'srv_te_question_border_1' => 'Line', 'srv_te_question_border_2' => 'Frame', diff --git a/public/css/admin_new.css b/public/css/admin_new.css index 0d5f52747..121b93428 100644 --- a/public/css/admin_new.css +++ b/public/css/admin_new.css @@ -10633,7 +10633,8 @@ div#theme-edit-wrap div#theme-editor div.columns { display: flex; flex-direction: row; width: 80%; - gap: 32px 16px; + font-size: 14px !important; + gap: 32px; } div#theme-edit-wrap div#theme-editor div.columns.top16 { margin-top: 16px; @@ -10678,6 +10679,8 @@ div#theme-edit-wrap div#theme-editor #picker { position: fixed; left: 500px; z-index: 999; + border-radius: 2px; + box-shadow: 0px 0px 5px 0px #C4C4C4; } div#theme-edit-wrap div#theme-editor #picker .popup_close { position: absolute !important; diff --git a/resources/sass/admin_new/pages/my_surveys/oblika_teme.scss b/resources/sass/admin_new/pages/my_surveys/oblika_teme.scss index 6ac79245c..16a598a1d 100644 --- a/resources/sass/admin_new/pages/my_surveys/oblika_teme.scss +++ b/resources/sass/admin_new/pages/my_surveys/oblika_teme.scss @@ -313,7 +313,9 @@ div#theme-edit-wrap{ flex-direction: row; width: 80%; - gap: 32px 16px; + font-size: 14px !important; + + gap: 32px; &.top16 { margin-top: 16px; @@ -365,6 +367,8 @@ div#theme-edit-wrap{ position: fixed; left: 500px; z-index: 999; + border-radius: 2px; + box-shadow: 0px 0px 5px 0px $dark-gray; } div.button_holder {