diff --git a/admin/survey/classes/class.SurveyStaticHtml.php b/admin/survey/classes/class.SurveyStaticHtml.php index cae651e66..2fc6568ce 100644 --- a/admin/survey/classes/class.SurveyStaticHtml.php +++ b/admin/survey/classes/class.SurveyStaticHtml.php @@ -94,7 +94,8 @@ class SurveyStaticHtml echo ''; echo '
'; - echo ' '; + if($i != 7) + echo ' '; echo '
'; echo ''; diff --git a/admin/survey/classes/class.Vprasanje.php b/admin/survey/classes/class.Vprasanje.php index 785ed3fc7..64b13f5df 100644 --- a/admin/survey/classes/class.Vprasanje.php +++ b/admin/survey/classes/class.Vprasanje.php @@ -1758,7 +1758,7 @@ class Vprasanje { echo ''; - echo ''; echo ''; echo ''; @@ -7362,10 +7362,43 @@ class Vprasanje { } function ajax_change_tip () { + global $lang; + Common::getInstance()->Init($this->anketa); Common::getInstance()->updateEditStamp(); $tip = $_POST['tip']; + $confirmed = (int)$_POST['confirmed']; + + // preverimo, ce obstajajo ze podatki za spremenljivko - v tem primeru damo dodaten error + if($confirmed != '1'){ + + $return = array(); + + $sql = sisplet_query("SELECT count(*) AS count FROM srv_user WHERE ank_id='$this->anketa' AND deleted='0' AND preview='0'"); + $row = mysqli_fetch_array($sql); + + if ($row['count'] > 0) { + + $return['error'] = 1; + + $return['output'] = '

'.$lang['srv_warning'].'

'; + $return['output'] .= ''; + + $return['output'] .= '

'.$lang['spremenljivka_change_type_data'].'

'; + $return['output'] .= '

'.$lang['srv_change_question_confirm_data'].'

'; + + //ce se spremeni onclick, se prosim spremeni v datoteki vprasanjeInline.js v funkciji inline_vrednost_delete v else if (data.error == 2) + $return['output'] .= '
'; + $return['output'] .= ''; + $return['output'] .= ''; + $return['output'] .= '
'; + + echo json_encode($return); + + return; + } + } self::change_tip($this->spremenljivka, $tip); diff --git a/admin/survey/script/dataSettingProfiles.js b/admin/survey/script/dataSettingProfiles.js index b428d568f..c45ad4008 100644 --- a/admin/survey/script/dataSettingProfiles.js +++ b/admin/survey/script/dataSettingProfiles.js @@ -139,7 +139,7 @@ function dataSettingProfileAction(action) { var chartPieZeros = $("#chartPieZeros").is(':checked') ? '1' : '0'; var hideEmpty = $("#hideEmpty").is(':checked') ? '1' : '0'; var hideAllSystem = $("#hideAllSystem").is(':checked') ? '1' : '0'; - var numOpenAnswers = $("#numOpenAnswers").val(); + var numOpenAnswers = $("#dsp_content #numOpenAnswers").val(); // var enableInspect = $('input[name="enableInspect"]:checked').val(); var dataPdfType = $('#dataPdfType').val(); var exportDataNumbering = $("#exportDataNumbering").is(':checked') ? '1' : '0'; @@ -157,7 +157,7 @@ function dataSettingProfileAction(action) { var dataShowIcons = $('input[name="dataShowIcons"]:checked').val(); var analysisGoTo = $('#analysisGoTo').val(); var analiza_legenda = $("#analiza_legenda").is(':checked') ? '1' : '0'; - + $.post("ajax.php?t=dataSettingProfile&a=saveProfile", {anketa:srv_meta_anketa_id, pid:pid, dsp_ndp:dsp_ndp, dsp_nda:dsp_nda, dsp_ndd:dsp_ndd, dsp_res:dsp_res, dsp_sep:dsp_sep, crossChk0:crossChk0, crossChk1:crossChk1, crossChk2:crossChk2, crossChk3:crossChk3, crossChkEC:crossChkEC, crossChkRE:crossChkRE, crossChkSR:crossChkSR, crossChkAR:crossChkAR, doColor:doColor, doValues:doValues, diff --git a/admin/survey/script/vprasanje.js b/admin/survey/script/vprasanje.js index f3e48776b..0f9c89c5c 100644 --- a/admin/survey/script/vprasanje.js +++ b/admin/survey/script/vprasanje.js @@ -596,12 +596,26 @@ function change_subtype_number (spremenljivka) { vprasanje_fullscreen(spremenljivka); }); } -function change_tip(spremenljivka, tip) { +function change_tip(spremenljivka, tip, confirmed) { - $.post('ajax.php?t=vprasanje&a=change_tip', {spremenljivka: spremenljivka, tip: tip, anketa: srv_meta_anketa_id}, function (data) { - vprasanje_fullscreen(spremenljivka, data, false, true); - vprasanje_save(true); - }); + $.post('ajax.php?t=vprasanje&a=change_tip', {spremenljivka: spremenljivka, tip: tip, confirmed: confirmed, anketa: srv_meta_anketa_id}, + function (data) { + + try { + var data_json = JSON.parse(data); + + if (data_json.error == 1) { + $('#fade').fadeIn("fast"); + $('#dropped_alert').html(data_json.output).fadeIn("fast").css('width', '600px'); + + return; + } + } + catch(e){} + + vprasanje_fullscreen(spremenljivka, data, false, true); + vprasanje_save(true); + }); } function change_demografija(spremenljivka, podtip) { diff --git a/frontend/simple/css/style.css b/frontend/simple/css/style.css index 0bea9ee4d..8ce29a160 100644 --- a/frontend/simple/css/style.css +++ b/frontend/simple/css/style.css @@ -159,7 +159,7 @@ header nav span.menu_item a:hover { color: #1e88e5; } #main { - background-color: #f7f7f7; + background-color: #F5F5F5; } #main .main_content { max-width: 1400px; @@ -1256,12 +1256,17 @@ iframe { } /* GDPR ZAHTEVEK -------------------------------------- */ +#main { + background-color: #FFFFFF; +} + body.gdpr { line-height: 20px; } .gdpr #main .main_content { padding: 0px; + font-family: "Source Sans Pro", "sans-serif" !important; } .register_holder { diff --git a/lang/1.php b/lang/1.php index c333cdedb..f529985c7 100644 --- a/lang/1.php +++ b/lang/1.php @@ -1869,6 +1869,7 @@ $lang = array ( "srv_novavrednost_grid" => "Novo podvprašanje", "srv_brisivrednost" => "Izbriši kategorijo", "srv_brisispremenljivko" => "Izbriši vprašanje", + "srv_spremeni_tip_vprasanja" => "Spremeni tip vprašanja", "srv_anketalist" => "Seznam anket", "srv_grupe" => "Anketa na večih straneh", "srv_grupe_recount" => "Preštevilči", @@ -1939,6 +1940,7 @@ $lang = array ( "srv_brisispremenljivkoconfirm_data" => "Ali ste prepričani, da želite izbrisati vprašanje in s tem tudi podatke?", "srv_brisivrednostconfirm" => "Ali ste prepričani, da želite izbrisati odgovor?", "srv_brisivrednostconfirm_data" => "Ali ste prepričani, da želite izbrisati odgovor in s tem tudi podatke?", + "srv_change_question_confirm_data" => "Ali ste prepričani, da želite spremeniti tip vprašanja?", "srv_brisiifconfirm" => "Ali ste prepričani, da želite odstraniti pogoj?", "srv_brisiifconfirm_all" => "Ali ste prepričani, da želite odstraniti pogoj in vsa vprašanja znotraj pogoja?", "srv_brisiblockconfirm" => "Ali ste prepričani, da želite odstraniti blok?", @@ -4027,6 +4029,7 @@ $lang = array ( "spremenljivka_delete_in_if" => "Spremenljivke ne morete zbrisati, ker se pojavi v vsaj enem od pogojev", "spremenljivka_delete_data" => "Vaša anketa vsebuje odgovore respondentov. Z brisanjem vprašanja boste izbrisali tudi morebitne odgovore na to vprašanje.

Če ne želite zgubiti podatkov, predlagamo, da vprašanja ne izbrišete, temveč vprašanje označite, da ni vidno za respondente. To storite v zavihku \"Napredno\" pri urejanju vprašanja.", "spremenljivka_delete_data_vre" => "Vaša anketa vsebuje odgovore respondentov. Z brisanjem odgovorov vprašanja boste izbrisali tudi morebitne odgovore na to vprašanje.

Če ne želite zgubiti podatkov, predlagamo, da odgovora ne izbrišete, temveč ga skrijete za respondente. Postopek je opisan tukaj.", + "spremenljivka_change_type_data" => "Vaša anketa vsebuje odgovore respondentov. S spremembo tipa vprašanja boste izbrisali morebitne odgovore na to vprašanje.

Če ne želite zgubiti podatkov, predlagamo, da ustvarite novo vprašanje, obstoječe vprašanje pa skrijete za respondente. Postopek je opisan tukaj.", "if_delete_data" => "Vaša anketa vsebuje odgovore respondentov. Z brisanjem pogoja in vseh vprašanj znotraj pogoja boste izbrisali tudi morebitne odgovore na ta vprašanja.

Če ne želite zgubiti podatkov, predlagamo, da pogoja z vprašanji ne izbrišete, temveč v nastavitvah pogoja označite, da vsebine pogoja ne prikaže.", "oid_auth_rejected" => "Avtentikacija je bila zavrnjena", "google_auth_rejected" => "Avtentikacija preko ponudnika google je bila zavrnjena.", diff --git a/lang/2.php b/lang/2.php index 4d0e75944..bc05bac20 100644 --- a/lang/2.php +++ b/lang/2.php @@ -1852,6 +1852,7 @@ $lang = array ( "srv_novavrednost_grid" => "New Sub-question", "srv_brisivrednost" => "Delete category", "srv_brisispremenljivko" => "Delete question", + "srv_spremeni_tip_vprasanja" => "Change question type", "srv_anketalist" => "Survey list", "srv_grupe" => "Pages", "srv_grupe_recount" => "Enumerate pages", @@ -1927,6 +1928,7 @@ $lang = array ( "srv_brisispremenljivkoconfirm_data" => "Are you sure you want to delete the question and responses for this question?", "srv_brisivrednostconfirm" => "Are you sure you want to delete the answer?", "srv_brisivrednostconfirm_data" => "Are you sure you want to delete the answer and responses for this answer?", + "srv_change_question_confirm_data" => "Are you sure you want to change question type?", "srv_brisiifconfirm" => "Are you sure you want to delete this condition?", "srv_brisiifconfirm_all" => "Are you sure you want to delete this condition and all questions inside this condition?", "srv_brisiblockconfirm" => "Are you sure you want to delete this block?", @@ -4008,7 +4010,8 @@ $lang = array ( "spremenljivka_delete_in_if" => "Question cannot be deleted, because it appears in at least on of the conditions", "spremenljivka_delete_data" => "This survey already has some data collected. With deleting this question, you will also be deleting question data.", "spremenljivka_delete_data_vre" => "This survey already has some data collected. With deleting this answer, you will also be deleting question data.", - "if_delete_data" => "This survey already has some data collected. With deleting this condition and all questions inside condition, you will also be deleting question data.", + "spremenljivka_change_type_data" => "This survey already has some data collected. With changing of question type, you will also be deleting question data.", + "if_delete_data" => "This survey already has some data collected. With deleting this condition and all questions inside condition, you will also be deleting question data.", "oid_auth_rejected" => "Authentication has been rejected", "google_auth_rejected" => "Google rejected authentication.", "oid_maybe_you_rejected" => "Have you accidentally rejected login through Google?", diff --git a/resources/sass/frontend_simple/basic/colors.scss b/resources/sass/frontend_simple/basic/colors.scss index 964ecac81..b63f875df 100644 --- a/resources/sass/frontend_simple/basic/colors.scss +++ b/resources/sass/frontend_simple/basic/colors.scss @@ -10,6 +10,7 @@ $border_color: #646464; $color_background: #ffffff; $color_background_dark: #f7f7f7; +$color_background_grey: #F5F5F5; $color_background_very_dark: #e6e6e6; $color_border: #cccccc; \ No newline at end of file diff --git a/resources/sass/frontend_simple/modules/GDPR.scss b/resources/sass/frontend_simple/modules/GDPR.scss index f3753cd3d..a6175e517 100644 --- a/resources/sass/frontend_simple/modules/GDPR.scss +++ b/resources/sass/frontend_simple/modules/GDPR.scss @@ -1,11 +1,16 @@ /* GDPR ZAHTEVEK -------------------------------------- */ +#main { + background-color: #FFFFFF; +} + body.gdpr { line-height: 20px; } .gdpr #main .main_content { padding: 0px; + font-family: "Source Sans Pro", "sans-serif" !important; } .register_holder{ diff --git a/resources/sass/frontend_simple/modules/main.scss b/resources/sass/frontend_simple/modules/main.scss index 02ce7223d..a1b63f156 100644 --- a/resources/sass/frontend_simple/modules/main.scss +++ b/resources/sass/frontend_simple/modules/main.scss @@ -1,5 +1,5 @@ #main{ - background-color: $color_background_dark; + background-color: $color_background_grey; .main_content{ max-width: 1400px;