added WIP code
This commit is contained in:
parent
2704465cc0
commit
5884cfdea0
@ -959,6 +959,22 @@ end
|
|||||||
-- Content Importing and XML functions
|
-- Content Importing and XML functions
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
function onSearchValueChanged(a, b, c)
|
||||||
|
log(a)
|
||||||
|
log(b)
|
||||||
|
log(c)
|
||||||
|
|
||||||
|
-- TODO: some kind of wait
|
||||||
|
updateDownloadItemList(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function onAuthorFilterChanged(a, b, c)
|
||||||
|
log(a)
|
||||||
|
log(b)
|
||||||
|
log(c)
|
||||||
|
updateDownloadItemList(true)
|
||||||
|
end
|
||||||
|
|
||||||
-- forwards the requested content type to the update function and sets highlight to clicked tab
|
-- forwards the requested content type to the update function and sets highlight to clicked tab
|
||||||
---@param tabId string Id of the clicked tab
|
---@param tabId string Id of the clicked tab
|
||||||
function onClick_tab(_, _, tabId)
|
function onClick_tab(_, _, tabId)
|
||||||
@ -1334,7 +1350,8 @@ function formatLibrary(jsonResponse)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- updates the window content to the requested content
|
-- updates the window content to the requested content
|
||||||
function updateDownloadItemList()
|
---@param skipAuthorUpdate? boolean If true, skips the update for the author dropdown
|
||||||
|
function updateDownloadItemList(skipAuthorUpdate)
|
||||||
if not library then return end
|
if not library then return end
|
||||||
|
|
||||||
-- addition of list items according to library file
|
-- addition of list items according to library file
|
||||||
@ -1343,6 +1360,9 @@ function updateDownloadItemList()
|
|||||||
|
|
||||||
contentList.children = {}
|
contentList.children = {}
|
||||||
for i, v in ipairs(library[contentToShow]) do
|
for i, v in ipairs(library[contentToShow]) do
|
||||||
|
-- TODO: filter here
|
||||||
|
|
||||||
|
-- TODO: store authors here
|
||||||
table.insert(contentList.children,
|
table.insert(contentList.children,
|
||||||
{
|
{
|
||||||
tag = "Panel",
|
tag = "Panel",
|
||||||
@ -1360,6 +1380,14 @@ function updateDownloadItemList()
|
|||||||
end
|
end
|
||||||
|
|
||||||
contentList.attributes.height = #contentList.children * 27
|
contentList.attributes.height = #contentList.children * 27
|
||||||
|
|
||||||
|
-- TODO: maybe update authors
|
||||||
|
if not skipAuthorUpdate then
|
||||||
|
local authorDropdown = getXmlTableElementById(globalXml, 'authorDropdown')
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
updateGlobalXml(globalXml)
|
updateGlobalXml(globalXml)
|
||||||
|
|
||||||
-- select the first item
|
-- select the first item
|
||||||
|
Loading…
Reference in New Issue
Block a user