Skip to content

Commit

Permalink
Fixed issue: template.css not loaded after all other template styles
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Oct 30, 2017
1 parent 93ae9ea commit b516c1a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions installer/create-database.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,11 +752,11 @@ function createDatabase($oDB){
$oDB->createCommand()->createIndex('{{idx4_template_configuration}}', '{{template_configuration}}', 'uid', false);

$headerArray = ['template_name','sid','gsid','uid','files_css','files_js','files_print_css','options','cssframework_name','cssframework_css','cssframework_js','packages_to_load','packages_ltr','packages_rtl'];
$oDB->createCommand()->insert("{{template_configuration}}", array_combine($headerArray,['default',NULL,NULL,NULL,'{"add": ["css/template.css", "css/animate.css"]}','{"add": ["scripts/template.js"]}','{"add":"css/print_template.css",}','{"ajaxmode":"on","brandlogo":"on", "brandlogofile": "./files/logo.png", "boxcontainer":"on", "backgroundimage":"off","animatebody":"off","bodyanimation":"fadeInRight","animatequestion":"off","questionanimation":"flipInX","animatealert":"off","alertanimation":"shake"}','bootstrap','{"replace": [["css/bootstrap.css","css/flatly.css"]]}','','["pjax"]','','']));
$oDB->createCommand()->insert("{{template_configuration}}", array_combine($headerArray,['default',NULL,NULL,NULL,'{"add": ["css/animate.css","css/template.css"]}','{"add": ["scripts/template.js"]}','{"add":"css/print_template.css",}','{"ajaxmode":"on","brandlogo":"on", "brandlogofile": "./files/logo.png", "boxcontainer":"on", "backgroundimage":"off","animatebody":"off","bodyanimation":"fadeInRight","animatequestion":"off","questionanimation":"flipInX","animatealert":"off","alertanimation":"shake"}','bootstrap','{"replace": [["css/bootstrap.css","css/flatly.css"]]}','','["pjax"]','','']));

$oDB->createCommand()->insert("{{template_configuration}}", array_combine($headerArray,['material',NULL,NULL,NULL,'{"add": ["css/template.css", "css/bootstrap-material-design.css", "css/ripples.min.css"]}','{"add": ["scripts/template.js", "scripts/material.js", "scripts/ripples.min.js"]}','{"add":"css/print_template.css",}','{"ajaxmode":"on","brandlogo":"on", "brandlogofile": "./files/logo.png", "animatebody":"off","bodyanimation":"fadeInRight","animatequestion":"off","questionanimation":"flipInX","animatealert":"off","alertanimation":"shake"}','bootstrap','{"replace": [["css/bootstrap.css","css/bootstrap.css"]]}','','["pjax"]','','']));
$oDB->createCommand()->insert("{{template_configuration}}", array_combine($headerArray,['material',NULL,NULL,NULL,'{"add": ["css/bootstrap-material-design.css", "css/ripples.min.css", "css/template.css",]}','{"add": ["scripts/template.js", "scripts/material.js", "scripts/ripples.min.js"]}','{"add":"css/print_template.css",}','{"ajaxmode":"on","brandlogo":"on", "brandlogofile": "./files/logo.png", "animatebody":"off","bodyanimation":"fadeInRight","animatequestion":"off","questionanimation":"flipInX","animatealert":"off","alertanimation":"shake"}','bootstrap','{"replace": [["css/bootstrap.css","css/bootstrap.css"]]}','','["pjax"]','','']));

$oDB->createCommand()->insert("{{template_configuration}}", array_combine($headerArray,['monochrome',NULL,NULL,NULL,'{"add":["css/template.css","css/animate.css","css/ajaxify.css","css/sea_green.css"]}','{"add":["scripts/template.js","scripts/ajaxify.js"]}','{"add":"css/print_template.css",}','{"ajaxmode":"off","brandlogo":"on","brandlogofile":".\/files\/logo.png","boxcontainer":"on","backgroundimage":"off","animatebody":"off","bodyanimation":"fadeInRight","animatequestion":"off","questionanimation":"flipInX","animatealert":"off","alertanimation":"shake"}','bootstrap','{}','','["pjax"]','','']));
$oDB->createCommand()->insert("{{template_configuration}}", array_combine($headerArray,['monochrome',NULL,NULL,NULL,'{"add":["css/animate.css","css/ajaxify.css","css/sea_green.css", "css/template.css",]}','{"add":["scripts/template.js","scripts/ajaxify.js"]}','{"add":"css/print_template.css",}','{"ajaxmode":"off","brandlogo":"on","brandlogofile":".\/files\/logo.png","boxcontainer":"on","backgroundimage":"off","animatebody":"off","bodyanimation":"fadeInRight","animatequestion":"off","questionanimation":"flipInX","animatealert":"off","alertanimation":"shake"}','bootstrap','{}','','["pjax"]','','']));

//tutorials
$oDB->createCommand()->createTable(
Expand Down
2 changes: 1 addition & 1 deletion templates/default/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
-->
<files>
<css>
<add>css/template.css</add>
<add>css/animate.css</add>
<add>css/ajaxify.css</add>
<add>css/template.css</add>
</css>
<js>
<add>scripts/template.js</add>
Expand Down
2 changes: 1 addition & 1 deletion templates/material/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
-->
<files>
<css>
<add>css/template.css</add>
<add>css/bootstrap-material-design.css</add>
<add>css/ripples.min.css</add>
<add>css/template.css</add>
</css>
<js>
<add>scripts/template.js</add>
Expand Down
2 changes: 1 addition & 1 deletion templates/monochrome/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
-->
<files>
<css>
<add>css/template.css</add>
<add>css/animate.css</add>
<add>css/ajaxify.css</add>
<add>css/sea_green.css</add>
<add>css/template.css</add>
</css>
<js>
<add>scripts/template.js</add>
Expand Down
4 changes: 2 additions & 2 deletions templates/monochrome/options/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ var prepare = function(){
currentThemeObject = JSON.parse($('#TemplateConfiguration_files_css').val());
} catch(e){ console.error('No valid monochrom theme field!'); }

currentThemeObject = {"add" : ['css/template.css','css/animate.css','css/ajaxify.css', '']};
currentThemeObject = {"add" : ['css/animate.css','css/ajaxify.css', 'css/template.css', '']};
$('#simple_edit_add_css').val(currentThemeObject.add[0][1]);
}

Expand All @@ -125,7 +125,7 @@ var prepare = function(){
} else {

currentThemeObject = {};
currentThemeObject.add = ['css/template.css','css/animate.css','css/ajaxify.css', $('#simple_edit_add_css').val()];
currentThemeObject.add = ['css/animate.css','css/ajaxify.css', $('#simple_edit_add_css').val(), 'css/template.css'];
$('#TemplateConfiguration_files_css').val(JSON.stringify(currentThemeObject));
}
})
Expand Down

0 comments on commit b516c1a

Please sign in to comment.