aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_settings.js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-03-02 11:03:33 +0100
committerMario Vavti <mario@mariovavti.com>2017-03-02 11:03:33 +0100
commit66fc1dcf3390764fa2e13be9ecea526cd8802776 (patch)
tree5f34687847484bd5c85fe4198d58d52388514e11 /view/js/mod_settings.js
parent816f4907e38c80db2fe2ea2b0e4fc8c7aee30e31 (diff)
downloadvolse-hubzilla-66fc1dcf3390764fa2e13be9ecea526cd8802776.tar.gz
volse-hubzilla-66fc1dcf3390764fa2e13be9ecea526cd8802776.tar.bz2
volse-hubzilla-66fc1dcf3390764fa2e13be9ecea526cd8802776.zip
reset schema value after we empty and repopulate it. first half of fix for #624
Diffstat (limited to 'view/js/mod_settings.js')
-rw-r--r--view/js/mod_settings.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js
index 5c729fa48..cf77db9bb 100644
--- a/view/js/mod_settings.js
+++ b/view/js/mod_settings.js
@@ -37,12 +37,14 @@ function setTheme(elm) {
function previewTheme(elm) {
theme = $(elm).val();
+ var schema = $('#id_schema').val();
$.getJSON('theme_info/' + theme,function(data) {
$('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" style="max-width:100%; max-height:300px" alt="' + theme + '"></a>');
$('#id_schema').empty();
$(data.schemas).each(function(index,item) {
$('<option/>',{value:item['key'],text:item['val']}).appendTo('#id_schema');
});
+ $('#id_schema').val(schema ? schema : data.schemas[0]);
$('#custom-settings-content .section-content-tools-wrapper').html(data.config);
});
}