Copy normal tile behavior to showcase tiles

Contributes to CURA-5604
This commit is contained in:
Ian Paschal 2018-08-03 14:48:04 +02:00
parent 1bacdabf35
commit 944ababa1c

View file

@ -105,8 +105,21 @@ Rectangle
switch(toolbox.viewCategory)
{
case "material":
toolbox.viewPage = "author"
toolbox.filterModelByProp("packages", "author_name", model.name)
// If model has a type, it must be a package
if (model.type !== undefined)
{
toolbox.viewPage = "detail"
toolbox.filterModelByProp("packages", "id", model.id)
}
else
{
toolbox.viewPage = "author"
toolbox.setFilters("packages", {
"author_id": model.id,
"type": "material"
})
}
break
default:
toolbox.viewPage = "detail"