Listview.templates = { faction: { sort: [1], nItemsPerPage: -1, searchable: 1, filtrable: 1, columns: [ { id: 'name', name: LANG.name, type: 'text', align: 'left', value: 'name', compute: function(faction, td) { var a = $WH.ce('a'); a.style.fontFamily = 'Verdana, sans-serif'; a.href = this.getItemLink(faction); $WH.ae(a, $WH.ct(faction.name)); if (faction.expansion) { var sp = $WH.ce('span'); sp.className = g_GetExpansionClassName(faction.expansion); $WH.ae(sp, a); $WH.ae(td, sp); } else $WH.ae(td, a); }, getVisibleText: function(faction) { var buff = faction.name + Listview.funcBox.getExpansionText(faction); return buff; } }, { id: 'side', name: LANG.side, type: 'text', compute: function(item, td) { if (item.side && item.side != 3) { var sp = $WH.ce('span'); sp.className = (item.side == 1 ? 'icon-alliance' : 'icon-horde'); g_addTooltip(sp, g_sides[item.side]); $WH.ae(td, sp); } }, getVisibleText: function(item) { if (item.side) return g_sides[item.side]; }, sortFunc: function(a, b, col) { return $WH.strcmp(g_sides[a.side], g_sides[b.side]); } }, { id: 'standing', name: LANG.reputation, value: 'standing', compute: function(faction, td) { td.style.padding = 0; $WH.ae(td, g_createReputationBar(faction.standing)); }, hidden: 1 }, { id: 'category', name: LANG.category, type: 'text', width: '16%', compute: function(faction, td) { if (faction.category2 != null) { td.className = 'small q1'; var a = $WH.ce('a'), href = '?factions=' + faction.category2; if (faction.category) href += '.' + faction.category; a.href = href; $WH.ae(a, $WH.ct(Listview.funcBox.getFactionCategory(faction.category, faction.category2))); $WH.ae(td, a); } }, getVisibleText: function(faction) { return Listview.funcBox.getFactionCategory(faction.category, faction.category2); }, sortFunc: function(a, b, col) { var _ = Listview.funcBox.getFactionCategory; return $WH.strcmp(_(a.category, a.category2), _(b.category, b.category2)); } } ], getItemLink: function(faction) { return '?faction=' + faction.id; } }, guide: { sort: ['rating'], searchable: 1, filterable: 1, columns: [ { id: 'title', name: LANG.types[11][0], type: 'text', align: 'left', value: 'title', compute: function(guide, td) { var wrapper = $('
| ' +
/* VOTE */ ' + - STICKY ' + ' | ' +
/* HEADER */ ' |