diff --git a/config.xml b/config.xml index 96b05cc9f419b91f9743baaffb0a75e29d82bccc..51f83d487d1924517943ca9cfdeedad6928fbdf5 100644 --- a/config.xml +++ b/config.xml @@ -16,7 +16,7 @@ https://extensions.sondages.pro/themes-and-templates/skelvanilla-a11y-and-usuability/ Copyright (C) 2018-2019 Denis Chenu / Sondages Pro GNU General Public License version 3 or later - 4.8.0 + 5.0.0 3 LimeSurvey Bootstrap Vanilla Survey Theme with Accessibility and Options
Base on vanilla theme, usage of more aria, fix some role and aria from core.
Allow usage of a lot of variations, list of variation can be updated. Some decoration option using boostrap class.]]>
2019-05-12 13:06:19 @@ -32,9 +32,9 @@ awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css awesome-bootstrap-checkbox/awesome-bootstrap-checkbox-rtl.css template-core.css + css/theme.css + css/custom.css css/skelvanilla.css - css/theme.css - css/custom.css scripts/ajaxify.js @@ -67,7 +67,7 @@ text-info text-info off - default + off on on disable @@ -206,7 +206,6 @@ bootstrap - css/bootstrap.css views diff --git a/options/options.js b/options/options.js index 2344fbfd65ba6fb8c1c78a36c779ce6e25edcb03..fa365f02ecd5664b4cb0efeefa7373ba4ee88e7f 100644 --- a/options/options.js +++ b/options/options.js @@ -54,7 +54,6 @@ var ThemeOptions = function(){ var updateFieldSettings = function(){ if($('#general_inherit_on').prop('checked')){ $('#TemplateConfiguration_options').val('inherit'); - $('#TemplateConfiguration_cssframework_css').val('inherit'); return; } globalForm.find('.selector_option_value_field').each(function(i,item){ @@ -134,6 +133,7 @@ var ThemeOptions = function(){ var prepareSelectField = function(){ globalForm.find('.selector_option_value_field').each(function(i,item){ var itemValue = parseOptionValue(item, 'off'); + $(item).val(itemValue); disableImagePreviewIfneeded(item); }); @@ -169,32 +169,6 @@ var ThemeOptions = function(){ updateFieldSettings(); }; - var manageCssFrameworkField = function(){ - var currentTheme = 'inherit'; - var currentCssFrameworkObject = 'inherit'; - if($('#TemplateConfiguration_cssframework_css').length>0){ - currentCssFrameworkObject = $('#TemplateConfiguration_cssframework_css').val(); - } - if(currentCssFrameworkObject != 'inherit') { - try{ - currentTheme = JSON.parse(currentCssFrameworkObject).replace[0][1]; - } catch(e){ - currentTheme = "css/bootstrap.css"; - } - } - console.log(currentTheme); - $('#simple_edit_cssframework_css').val(currentTheme); - $('#simple_edit_cssframework_css').on("change",function() { - if($(this).val() == 'inherit') { - $('#TemplateConfiguration_cssframework_css').val('inherit'); - } else { - currentCssFrameworkObject = {}; - currentCssFrameworkObject.replace = [["css/bootstrap.css",$(this).val()]]; - $('#TemplateConfiguration_cssframework_css').val(JSON.stringify(currentCssFrameworkObject)); - } - }); - }; - /////////////// // HotSwap methods // -- These methods connect an input directly to the value in the optionsObject @@ -311,7 +285,6 @@ var ThemeOptions = function(){ prepareTextField(); parseParentSwitchFields(); //prepareFontField(); - manageCssFrameworkField(); bind(); }; diff --git a/options/options.twig b/options/options.twig index 73b14c43d231d33eae8c303d091914209147a43e..9f2062766e7047dee33669d8916e720082ce406d 100644 --- a/options/options.twig +++ b/options/options.twig @@ -37,10 +37,10 @@
{{ sprintf( gT("%s variations"), templateConfiguration.template_name) }}
- +
- + {% if templateConfiguration.sid is not empty or templateConfiguration.gsid is not empty %} {% endif %} diff --git a/views/layout_global.twig b/views/layout_global.twig index a1de717e707e63f82027eba3c19dc0dc750b893b..e1af06a32e65b79cfc892df020d29445593c0b17 100644 --- a/views/layout_global.twig +++ b/views/layout_global.twig @@ -1,6 +1,6 @@ {# LimeSurvey accessible vanilla - Copyright (C) 2007-2018 Denis Chenu + Copyright (C) 2007-2019 Denis Chenu Copyright (C) 2007-2018 The LimeSurvey Project Team All rights reserved. License: GNU/GPL License v4 or later, see LICENSE.php @@ -17,7 +17,6 @@ Remind A11Y issue can be reported to LimeSurvey core too : https://www.limesurvey.org/community/bug-tracker #} - {% block head %} {# Headers, metadata, etc #} {{ include('./subviews/header/head.twig') }} diff --git a/views/subviews/header/head.twig b/views/subviews/header/head.twig index c12a26772d307f21de06edd38088ac53fc650533..86e29ab5b12eb3cf80925a22eb1a43e1e0547ec3 100644 --- a/views/subviews/header/head.twig +++ b/views/subviews/header/head.twig @@ -13,7 +13,8 @@ This file generates the headers. Most of the time, it is not the right place to add your own JS/CSS - instead, use the config.xml file for that. -#}{{ unregisterPackage('pjax') }} +#}{{ include('./subviews/header/theme.twig') }} +{{ unregisterPackage('pjax') }} {% if(aSurveyInfo.jYesNo) %} {{ registerScript('activateConfirmLanguage',"$.extend(LSvar.lang," ~ aSurveyInfo.jYesNo ~ ")", "POS_BEGIN") }} {% endif %} diff --git a/views/subviews/header/theme.twig b/views/subviews/header/theme.twig new file mode 100644 index 0000000000000000000000000000000000000000..eb9aaf96f1eda6a36bb6d08e9ba1a5253950ada2 --- /dev/null +++ b/views/subviews/header/theme.twig @@ -0,0 +1,8 @@ +{# theme file #} +{% set theme = aSurveyInfo.options.theme %} +{% if (theme == "off" or theme == "") %} + {% set theme = 'css/bootstrap.css' %} +{% endif %} +{{ registerTemplateCssFile(theme) }} +{{ registerTemplateCssFile('css/theme.css') }} +{{ registerTemplateCssFile('css/custom.css') }}