- added config-option to restrict available locales - fixed opensearch suggestions by generating strict json - include TalentCalc.css as lowerCase (fixes display under *nix) - some minor formating - Setup: * added some additional files to be generated (they required STATIC_URL or HOST_URL to be set) * moved class Locale from global.js to own template and generate it with CFG_LOCALES * changed urlParam (?build=script): may be empty (builds everything) or specific scriptNames chained together with ; (?build=script1;script2) you are required to run the following command to regenerate files affected by these cahnges ?build=demo;power;realmMenu;searchboxBody;searchboxScript;searchplugin;locales
36 lines
832 B
PHP
36 lines
832 B
PHP
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++;
|
|
}
|
|
};
|
|
|
|
new Listview({
|
|
template:'pet',
|
|
computeDataFunc: _,
|
|
<?php
|
|
echo !isset($params['id']) ? "id:'hunter-pets'," : null;
|
|
echo !isset($params['name']) ? "name:LANG.tab_pets," : null;
|
|
echo !isset($params['parent']) ? "parent:'lv-generic'," : null;
|
|
|
|
foreach ($params as $k => $v):
|
|
if ($v[0] == '$'):
|
|
echo $k.':'.substr($v, 1).',';
|
|
elseif ($v):
|
|
echo $k.":'".$v."',";
|
|
endif;
|
|
endforeach;
|
|
?>
|
|
data:<?php echo json_encode(array_values($data), JSON_NUMERIC_CHECK); ?>
|
|
});
|