diff --git a/src/page/admin/index.lua b/src/page/admin/index.lua index 9137315..16b721f 100644 --- a/src/page/admin/index.lua +++ b/src/page/admin/index.lua @@ -18,14 +18,17 @@ function pluginInput(opt) local key = opt.key:gsub("^app.opts.","") local value = EscapeHtml( app.opts[ key ] ) if type(opt.values) == 'table' then - html = html .. util.template('\n', { key = opt.key, value = value }) foreach( opt.values, function(k,v) - html = html .. util.template('\n',{ + local selected = '' + if value == k then selected = 'selected="selected"' end + html = html .. util.template('\n',{ k=k, - v=v + v=v, + selected=selected }) end) html = html .. "\n" @@ -85,11 +88,11 @@ function saveData() end end) if saveconfig then - app.set('app.opts', app.opts ) data.notification = '
updated
' else data.notification = '
no changes detected
' end + print(app.opts.plugin_global_homepage) end end diff --git a/src/page/janusxr.html b/src/page/janusxr.html index 49fb8eb..f0617d0 100644 --- a/src/page/janusxr.html +++ b/src/page/janusxr.html @@ -43,7 +43,6 @@ end} function addPortal(id,x,v,url,i,z,thumb,rotation,scale) print('\t') print('\t ') - print('\t ') print('\t ') print('\t') end @@ -58,7 +57,7 @@ end} local center = -((#items*width)/1.3) + (i*width) local url = v.url local thumb = ' shader_id="defaultportal"' - if v.thumbnail then + if #v.thumbnail > 0 then thumb = ' thumb_id="img' .. i .. '" ' end if v.dir then url = url .. "/" end