mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
fixup for category-links in achievements-listview if its a statistic
This commit is contained in:
@@ -93,6 +93,10 @@ class AchievementList extends BaseType
|
|||||||
'parentCat' => $this->curTpl['parentCat'],
|
'parentCat' => $this->curTpl['parentCat'],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// going out on a limb here: type = 1 if in level 3 of statistics tree, so, IF (statistic AND parentCat NOT statistic (1)) i guess
|
||||||
|
if ($this->curTpl['flags'] & ACHIEVEMENT_FLAG_COUNTER && $this->curTpl['parentCat'] != 1)
|
||||||
|
$data[$this->id]['type'] = 1;
|
||||||
|
|
||||||
if (!empty($this->curTpl['rewards']))
|
if (!empty($this->curTpl['rewards']))
|
||||||
{
|
{
|
||||||
$rewards = [];
|
$rewards = [];
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
points:{$curr.points},
|
points:{$curr.points},
|
||||||
category:{$curr.category},
|
category:{$curr.category},
|
||||||
parentcat:{$curr.parentCat}
|
parentcat:{$curr.parentCat}
|
||||||
|
{if isset($curr.type)}, type:{$curr.type}{/if}
|
||||||
{if isset($curr.rewards)}, rewards:{$curr.rewards}{/if}
|
{if isset($curr.rewards)}, rewards:{$curr.rewards}{/if}
|
||||||
{if isset($curr.reward)}, reward:'{$curr.reward|escape:"javascript"}'{/if}
|
{if isset($curr.reward)}, reward:'{$curr.reward|escape:"javascript"}'{/if}
|
||||||
{rdelim}
|
{rdelim}
|
||||||
|
|||||||
@@ -11722,12 +11722,13 @@ Listview.templates = {
|
|||||||
type: 'text',
|
type: 'text',
|
||||||
width: '15%',
|
width: '15%',
|
||||||
compute: function(achievement, td) {
|
compute: function(achievement, td) {
|
||||||
|
statistic = achievement.type ? achievement.type + '.' : '';
|
||||||
td.className = 'small';
|
td.className = 'small';
|
||||||
path = '?achievements=';
|
path = '?achievements=' + statistic;
|
||||||
if (achievement.category != -1 && achievement.parentcat != -1) {
|
if (achievement.category != -1 && achievement.parentcat != -1) {
|
||||||
var a2 = ce('a');
|
var a2 = ce('a');
|
||||||
a2.className = 'q0';
|
a2.className = 'q0';
|
||||||
a2.href = '?achievements=' + achievement.parentcat;
|
a2.href = '?achievements=' + statistic + achievement.parentcat;
|
||||||
ae(a2, ct(g_achievement_categories[achievement.parentcat]));
|
ae(a2, ct(g_achievement_categories[achievement.parentcat]));
|
||||||
ae(td, a2);
|
ae(td, a2);
|
||||||
ae(td, ce('br'));
|
ae(td, ce('br'));
|
||||||
|
|||||||
Reference in New Issue
Block a user