From 0abf282a540c71c8a6c1c6ebd68616f678ed9cee Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Wed, 20 Nov 2019 14:46:52 +0100 Subject: [PATCH] Fixed issue #15599: Ajax mode being activated when importing an old survey which has it enabled --- application/controllers/admin/themeoptions.php | 2 +- application/core/LsDefaultDataSets.php | 6 +++--- themes/survey/vanilla/views/layout_global.twig | 7 ------- themes/survey/vanilla/views/layout_survey_list.twig | 4 ---- themes/survey/vanilla/views/subviews/header/head.twig | 9 --------- .../survey/vanilla/views/subviews/header/start_form.twig | 2 +- 6 files changed, 5 insertions(+), 25 deletions(-) diff --git a/application/controllers/admin/themeoptions.php b/application/controllers/admin/themeoptions.php index 88d16a3422d..b8d1c4fc653 100644 --- a/application/controllers/admin/themeoptions.php +++ b/application/controllers/admin/themeoptions.php @@ -80,7 +80,7 @@ public function update($id) { $model = $this->loadModel($id); if (Permission::model()->hasTemplatePermission($model->template_name, 'update')) { - // Turn Ajax off as defualt save it after. + // Turn Ajax off as default save it after. $model = $this->turnAjaxmodeOffAsDefault($model); $model->save(); diff --git a/application/core/LsDefaultDataSets.php b/application/core/LsDefaultDataSets.php index 647954b6c2f..edcc1b4538c 100644 --- a/application/core/LsDefaultDataSets.php +++ b/application/core/LsDefaultDataSets.php @@ -167,7 +167,7 @@ public static function getTemplateConfigurationData() 'files_css' => '{"add":["css/ajaxify.css","css/theme.css","css/custom.css"]}', 'files_js' => '{"add":["scripts/theme.js","scripts/ajaxify.js","scripts/custom.js"]}', 'files_print_css' => '{"add":["css/print_theme.css"]}', - 'options' => '{"ajaxmode":"on","brandlogo":"on","container":"on", "hideprivacyinfo": "off", "brandlogofile":"./files/logo.png","font":"noto"}', + 'options' => '{"ajaxmode":"off","brandlogo":"on","container":"on", "hideprivacyinfo": "off", "brandlogofile":"./files/logo.png","font":"noto"}', 'cssframework_name' => 'bootstrap', 'cssframework_css' => '{}', 'cssframework_js' => '', @@ -183,7 +183,7 @@ public static function getTemplateConfigurationData() 'files_css' => '{"add":["css/ajaxify.css","css/animate.css","css/variations/sea_green.css","css/theme.css","css/custom.css"]}', 'files_js' => '{"add":["scripts/theme.js","scripts/ajaxify.js","scripts/custom.js"]}', 'files_print_css' => '{"add":["css/print_theme.css"]}', - 'options' => '{"ajaxmode":"on","brandlogo":"on","brandlogofile":"./files/logo.png","container":"on","backgroundimage":"off","backgroundimagefile":null,"animatebody":"off","bodyanimation":"fadeInRight","bodyanimationduration":"500","animatequestion":"off","questionanimation":"flipInX","questionanimationduration":"500","animatealert":"off","alertanimation":"shake","alertanimationduration":"500","font":"noto","bodybackgroundcolor":"#ffffff","fontcolor":"#444444","questionbackgroundcolor":"#ffffff","questionborder":"on","questioncontainershadow":"on","checkicon":"f00c","animatecheckbox":"on","checkboxanimation":"rubberBand","checkboxanimationduration":"500","animateradio":"on","radioanimation":"zoomIn","radioanimationduration":"500","zebrastriping":"off","stickymatrixheaders":"off","greyoutselected":"off","hideprivacyinfo":"off","crosshover":"off","showpopups":"1"}', + 'options' => '{"ajaxmode":"off","brandlogo":"on","brandlogofile":"./files/logo.png","container":"on","backgroundimage":"off","backgroundimagefile":null,"animatebody":"off","bodyanimation":"fadeInRight","bodyanimationduration":"500","animatequestion":"off","questionanimation":"flipInX","questionanimationduration":"500","animatealert":"off","alertanimation":"shake","alertanimationduration":"500","font":"noto","bodybackgroundcolor":"#ffffff","fontcolor":"#444444","questionbackgroundcolor":"#ffffff","questionborder":"on","questioncontainershadow":"on","checkicon":"f00c","animatecheckbox":"on","checkboxanimation":"rubberBand","checkboxanimationduration":"500","animateradio":"on","radioanimation":"zoomIn","radioanimationduration":"500","zebrastriping":"off","stickymatrixheaders":"off","greyoutselected":"off","hideprivacyinfo":"off","crosshover":"off","showpopups":"1"}', 'cssframework_name' => 'bootstrap', 'cssframework_css' => '{}', 'cssframework_js' => '', @@ -199,7 +199,7 @@ public static function getTemplateConfigurationData() 'files_css' => '{"add":["css/ajaxify.css","css/theme.css","css/custom.css"]}', 'files_js' => '{"add":["scripts/theme.js","scripts/ajaxify.js","scripts/custom.js"]}', 'files_print_css' => '{"add":["css/print_theme.css"]}', - 'options' => '{"ajaxmode":"on","brandlogo":"on","container":"on","brandlogofile":"./files/logo.png"}', + 'options' => '{"ajaxmode":"off","brandlogo":"on","container":"on","brandlogofile":"./files/logo.png"}', 'cssframework_name' => 'bootstrap', 'cssframework_css' => '{"replace":[["css/bootstrap.css","css/variations/flatly.min.css"]]}', 'cssframework_js' => '', diff --git a/themes/survey/vanilla/views/layout_global.twig b/themes/survey/vanilla/views/layout_global.twig index aa3ef4ddcbf..a8afb53c222 100644 --- a/themes/survey/vanilla/views/layout_global.twig +++ b/themes/survey/vanilla/views/layout_global.twig @@ -74,13 +74,6 @@ {{ include('./subviews/header/head.twig') }} {% endblock %} - {% if (aSurveyInfo.options.ajaxmode == "on" and aSurveyInfo.printPdf != 1) %} - {% block ajaxindicator %} - {# In vanilla, this file is empty, we keep it to have a common layout between all core themes #} - {{ include('./subviews/navigation/ajax_indicator.twig') }} - {% endblock %} - - {% endif %} {# This used for the pjax system #} {% block pjaxbegin %} diff --git a/themes/survey/vanilla/views/layout_survey_list.twig b/themes/survey/vanilla/views/layout_survey_list.twig index cf42a1d941b..63f531944c2 100644 --- a/themes/survey/vanilla/views/layout_survey_list.twig +++ b/themes/survey/vanilla/views/layout_survey_list.twig @@ -91,10 +91,6 @@ {{ include('./subviews/header/head.twig') }} - {% if (aSurveyInfo.options.ajaxmode == "on" and aSurveyInfo.printPdf != 1) %} - {# In vanilla, this file is empty, we keep it to have a common layout between all core themes #} - {{ include('./subviews/navigation/ajax_indicator.twig') }} - {% endif %} {# This used for the pjax system #}
diff --git a/themes/survey/vanilla/views/subviews/header/head.twig b/themes/survey/vanilla/views/subviews/header/head.twig index 546ab9d1409..9c0275ef094 100644 --- a/themes/survey/vanilla/views/subviews/header/head.twig +++ b/themes/survey/vanilla/views/subviews/header/head.twig @@ -39,15 +39,6 @@ window.basicThemeScripts = new ThemeScripts(); } - {# Ajax mode #} - {% if(aSurveyInfo.options.ajaxmode == "on") %} - - {% endif %} {# LSvar update with #} {{ registerScript("LSvarTemplateInit","LSvar= LSvar || {};","POS_HEAD") }} {% if(aSurveyInfo.options.fixnumauto and aSurveyInfo.options.fixnumauto != "off") %} diff --git a/themes/survey/vanilla/views/subviews/header/start_form.twig b/themes/survey/vanilla/views/subviews/header/start_form.twig index 88cc4726cd8..da27e727428 100644 --- a/themes/survey/vanilla/views/subviews/header/start_form.twig +++ b/themes/survey/vanilla/views/subviews/header/start_form.twig @@ -56,7 +56,7 @@ {{ registerScript("AJAXACTIVATE", " - $('#limesurvey').append(''); + $('#limesurvey').append(''); ", "POS_POSTSCRIPT") }}