mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* redo page render following the logic of:
Response ─┬─> TextResponse ─> TextResponseImpl
└─> TemplateResponse ─> TemplateResponseImpl
* split up giant files, one per response path
* caching becomes a trait, implemented where necessary
* TextResponses (Ajax) can now be cached
* make use of previously defined php classes for js objects
* Tabs, Listview, Tooltip, Announcement, Markup, Book, ...
* \Aowow\Template\PageTemplate is the new class to be cached
* do not discard error messages generated after vars have been sent to template
and store in session for display at a later time
* implement tracking consent management
* move logic out of template into their respective endpoints
18 lines
332 B
Smarty
18 lines
332 B
Smarty
var _ = function(family)
|
|
{
|
|
family.foodCount = 0;
|
|
for (var food in g_pet_foods)
|
|
{
|
|
if( family.diet & food)
|
|
family.foodCount++;
|
|
}
|
|
|
|
family.spellCount = 0;
|
|
|
|
for (var i = 0, len = family.spells.length; i < len; ++i)
|
|
{
|
|
if (family.spells[i])
|
|
family.spellCount++;
|
|
}
|
|
};
|