provide info if there are no sche,es available
This commit is contained in:
parent
729d52f10a
commit
1eba847e99
@ -41,10 +41,15 @@ function previewTheme(elm) {
|
||||
$.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 : '---');
|
||||
if(data.schemas.length) {
|
||||
$(data.schemas).each(function(index,item) {
|
||||
$('<option/>',{value:item['key'],text:item['val']}).appendTo('#id_schema');
|
||||
});
|
||||
$('#id_schema').val(schema ? schema : '---');
|
||||
}
|
||||
else {
|
||||
$('<option/>',{value:'',text:'No schemes available'}).appendTo('#id_schema');
|
||||
}
|
||||
$('#custom-settings-content .section-content-tools-wrapper').html(data.config);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user