diff --git a/includes/types/guide.class.php b/includes/types/guide.class.php index 97bec1ab..a174b092 100644 --- a/includes/types/guide.class.php +++ b/includes/types/guide.class.php @@ -103,6 +103,12 @@ class GuideList extends BaseType 'date' => $this->getField('date'), // ok 'when' => date(Util::$dateFormatInternal, $this->getField('date')) ); + + if ($this->getField('category') == 1) + { + $data[$this->id]['classs'] = $this->getField('classId'); + $data[$this->id]['spec'] = $this->getField('specId'); + } } return $data; @@ -137,19 +143,20 @@ class GuideList extends BaseType if ($this->getField('classId') && $this->getField('category') == 1) { - $c = $this->getField('classId'); - if (($s = $this->getField('specId')) > -1) + if ($c = $this->getField('classId')) { - $i = Game::$specIconStrings[$c][$s]; - $n = Lang::game('classSpecs', $c, $s); - } - else - { - $i = 'class_'.Game::$classFileStrings[$c]; $n = Lang::game('cl', $c); - } + $specStr .= '  –  %s'; - $specStr = '  –  '.$n.''; + if (($s = $this->getField('specId')) > -1) + { + $i = Game::$specIconStrings[$c][$s]; + $n = ''; + $specStr .= ''.Lang::game('classSpecs', $c, $s).''; + } + + $specStr = sprintf($specStr, $n); + } } $tt = '
'.$this->getField('title').'
'; diff --git a/static/js/global.js b/static/js/global.js index bd544c2c..65645d09 100644 --- a/static/js/global.js +++ b/static/js/global.js @@ -10255,10 +10255,28 @@ Listview.templates = { compute: function(guide, td) { $(td).append($('').attr('href', '?guides=' + guide.category).text(l_guide_categories[guide.category]).css('color', 'white')); + + if (guide.classs && g_chr_specs[guide.classs]) + { + $(td).append(' ' + LANG.dash + ' ').append($(Icon.create('class_' + g_file_classes[guide.classs], 0, null, '?class=' + guide.classs, null, null, false, null, true))); + let txt = $('').attr('class', 'c' + guide.classs).text(' ' + g_chr_classes[guide.classs]); + if (guide.spec >= 0 && g_chr_specs[guide.classs][guide.spec]) + { + $(td).append($(Icon.create(g_file_specs[guide.classs][guide.spec], 0, null, 'javascript:;', null, null, false, null, true))); + txt = $('').attr('class', 'c' + guide.classs).text(' ' + g_chr_specs[guide.classs][guide.spec]); + } + $(td).append(txt); + } }, getVisibleText: function(guide) { - return l_guide_categories[guide.category]; + let b = l_guide_categories[guide.category]; + if (guide.classs) + b += ' ' + g_chr_classes[guide.classs]; + if (guide.spec >= 0) + b += ' ' + g_chr_specs[guide.classs][guide.spec]; + + return b; }, sortFunc: function(a, b) {