removing smarty - part XV (aaaand done!)

- unified lv handling
 * data should always be in the same structure now
 * use of tabs is determined by the template, unless forced)
- Currency: fixed path on detail page
- Profiler: fixed use of dataKey
- Util::alphaMapCheck() 'images/' was removed long ago..; alphaMaps are now in 'cache/'
- Item: REALLY fixed markdown in tooltips
This commit is contained in:
Sarjuuk
2014-07-19 12:30:47 +02:00
parent 0af712a8ff
commit 0e98270827
66 changed files with 726 additions and 908 deletions

View File

@@ -718,7 +718,7 @@ class ItemList extends BaseType
$x .= Lang::$item['durability'].' '.$dur.' / '.$dur.'<br />';
// required classes
if ($classes = Lang::getClassString($this->curTpl['requiredClass'], $jsg, $__, !$interactive))
if ($classes = Lang::getClassString($this->curTpl['requiredClass'], $jsg, $__))
{
foreach ($jsg as $js)
if (empty($this->jsGlobals[TYPE_CLASS][$js]))
@@ -728,7 +728,7 @@ class ItemList extends BaseType
}
// required races
if ($races = Lang::getRaceString($this->curTpl['requiredRace'], $__, $jsg, $__, !$interactive))
if ($races = Lang::getRaceString($this->curTpl['requiredRace'], $__, $jsg, $__))
{
foreach ($jsg as $js)
if (empty($this->jsGlobals[TYPE_RACE][$js]))

View File

@@ -1392,7 +1392,7 @@ class Util
public static function alphaMapCheck($areaId, array &$coords)
{
$file = 'images\\alphaMaps\\'.$areaId.'.png';
$file = 'cache\\alphaMaps\\'.$areaId.'.png';
if (!file_exists($file))
{
self::addNote(U_GROUP_STAFF, 'Util::alphaMapCheck no suitable alphaMap found for area '.$areaId.'. Positional check omitted!');

View File

@@ -183,14 +183,13 @@ class AchievementPage extends GenericPage
['id', $this->typeId, '!']
);
$saList = new AchievementList($conditions);
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'achievement',
'data' => $saList->getListviewData(),
'params' => array(
'id' => 'see-also',
'name' => '$LANG.tab_seealso',
'visibleCols' => "$['category']",
'tabs' => '$tabsRelated'
'visibleCols' => "$['category']"
)
);
$this->extendGlobalData($saList->getJSGlobals());
@@ -203,14 +202,13 @@ class AchievementPage extends GenericPage
if (!empty($refs))
{
$coList = new AchievementList(array(['id', $refs]));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'achievement',
'data' => $coList->getListviewData(),
'params' => array(
'id' => 'criteria-of',
'name' => '$LANG.tab_criteriaof',
'visibleCols' => "$['category']",
'tabs' => '$tabsRelated'
'visibleCols' => "$['category']"
)
);
$this->extendGlobalData($coList->getJSGlobals());

View File

@@ -111,7 +111,7 @@ class AchievementsPage extends GenericPage
$params['_errors'] = '$1';
}
$this->lvData = array(
$this->lvTabs[] = array(
'file' => 'achievement',
'data' => $data,
'params' => $params

View File

@@ -132,7 +132,7 @@ class ClassPage extends GenericPage
{
$this->extendGlobalData($genSpells->getJSGlobals(GLOBALINFO_SELF));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $genSpells->getListviewData(),
'params' => array(
@@ -141,7 +141,6 @@ class ClassPage extends GenericPage
'visibleCols' => "$['level', 'schools', 'type', 'classes']",
'hiddenCols' => "$['reagents', 'skill']",
'sort' => "$['-level', 'type', 'name']",
'tabs' => '$tabsRelated',
'computeDataFunc' => '$Listview.funcBox.initSpellFilter',
'onAfterCreate' => '$Listview.funcBox.addSpellIndicator'
)
@@ -165,13 +164,12 @@ class ClassPage extends GenericPage
if (!$items->hasDiffFields(['requiredRace']))
$hidden = "$['side']";
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $items->getListviewData(),
'params' => array(
'id' => 'items',
'name' => '$LANG.tab_items',
'tabs' => '$tabsRelated',
'visibleCols' => "$['dps', 'armor', 'slot']",
'hiddenCols' => isset($hidden) ? $hidden : null,
'computeDataFunc' => '$Listview.funcBox.initSubclassFilter',
@@ -193,13 +191,10 @@ class ClassPage extends GenericPage
{
$this->extendGlobalData($quests->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $quests->getListviewData(),
'params' => array(
'sort' => "$['reqlevel', 'name']",
'tabs' => '$tabsRelated'
)
'params' => ['sort' => "$['reqlevel', 'name']"]
);
}
@@ -209,14 +204,13 @@ class ClassPage extends GenericPage
{
$this->extendGlobalData($sets->getJSGlobals(GLOBALINFO_SELF));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'itemset',
'data' => $sets->getListviewData(),
'params' => array(
'note' => sprintf(Util::$filterResultString, '?itemsets&filter=cl='.$this->typeId),
'hiddenCols' => "$['classes']",
'sort' => "$['-level', 'name']",
'tabs' => '$tabsRelated'
'sort' => "$['-level', 'name']"
)
);
}
@@ -231,13 +225,12 @@ class ClassPage extends GenericPage
$trainer = new CreatureList($conditions);
if (!$trainer->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'creature',
'data' => $trainer->getListviewData(),
'params' => array(
'id' => 'trainers',
'name' => '$LANG.tab_trainers',
'tabs' => '$tabsRelated'
'name' => '$LANG.tab_trainers'
)
);
}
@@ -246,12 +239,10 @@ class ClassPage extends GenericPage
$races = new CharRaceList(array(['classMask', $_mask, '&']));
if (!$races->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'race',
'data' => $races->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated'
)
'params' => []
);
}
}

View File

@@ -28,7 +28,7 @@ class ClassesPage extends GenericPage
$classes = new CharClassList();
if (!$classes->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'class',
'data' => $classes->getListviewData(),
'params' => []

View File

@@ -33,7 +33,7 @@ class CurrenciesPage extends GenericPage
$conditions[] = ['category', (int)$this->category[0]];
$money = new CurrencyList($conditions);
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'currency',
'data' => $money->getListviewData(),
'params' => []

View File

@@ -32,7 +32,7 @@ class CurrencyPage extends GenericPage
protected function generatePath()
{
$this->path[] = $this->subject->getField('typeCat');
$this->path[] = $this->subject->getField('category');
}
protected function generateTitle()
@@ -83,11 +83,10 @@ class CurrencyPage extends GenericPage
foreach ($lootTabs->iterate() as $tab)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => $tab[0],
'data' => $tab[1],
'params' => [
'tabs' => '$tabsRelated',
'name' => $tab[2],
'id' => $tab[3],
'extraCols' => $tab[4] ? '$['.implode(', ', array_unique($tab[4])).']' : null,
@@ -162,11 +161,10 @@ class CurrencyPage extends GenericPage
}
}
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'creature',
'data' => $sbData,
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_soldby',
'id' => 'sold-by-npc',
'extraCols' => '$['.implode(', ', $extraCols).']',
@@ -188,11 +186,10 @@ class CurrencyPage extends GenericPage
if ($createdBy->hasSetFields(['reagent1']))
$visCols = ['reagents'];
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $createdBy->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_createdby',
'id' => 'created-by',
'visibleCols' => isset($visCols) ? '$'.json_encode($visCols) : null
@@ -228,11 +225,10 @@ class CurrencyPage extends GenericPage
$boughtBy = new ItemList(array(['id', $boughtBy]));
if (!$boughtBy->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $boughtBy->getListviewData(ITEMINFO_VENDOR, [TYPE_CURRENCY => $this->typeId]),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_currencyfor',
'id' => 'currency-for',
'extraCols' => "$[Listview.funcBox.createSimpleCol('stack', 'stack', '10%', 'stack'), Listview.extraCols.cost]",

View File

@@ -106,13 +106,10 @@ class EventPage extends GenericPage
foreach ($data as &$d)
$d['method'] = $npcIds[$d['id']];
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => CreatureList::$brickFile,
'data' => $data,
'params' => array(
'tabs' => '$tabsRelated',
'note' => $hasFilter ? sprintf(Util::$filterResultString, '?npcs&filter=cr=38;crs='.$this->hId.';crv=0') : null
)
'params' => ['note' => $hasFilter ? sprintf(Util::$filterResultString, '?npcs&filter=cr=38;crs='.$this->hId.';crv=0') : null]
);
}
}
@@ -127,13 +124,10 @@ class EventPage extends GenericPage
foreach ($data as &$d)
$d['method'] = $objectIds[$d['id']];
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => GameObjectList::$brickFile,
'data' => $data,
'params' => array(
'tabs' => '$tabsRelated',
'note' => $hasFilter ? sprintf(Util::$filterResultString, '?objects&filter=cr=16;crs='.$this->hId.';crv=0') : null
)
'params' => ['note' => $hasFilter ? sprintf(Util::$filterResultString, '?objects&filter=cr=16;crs='.$this->hId.';crv=0') : null]
);
}
}
@@ -147,11 +141,10 @@ class EventPage extends GenericPage
{
$this->extendGlobalData($acvs->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => AchievementList::$brickFile,
'data' => $acvs->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
'note' => $hasFilter ? sprintf(Util::$filterResultString, '?achievements&filter=cr=11;crs='.$this->hId.';crv=0') : null,
'visibleCols' => "$['category']"
)
@@ -173,13 +166,10 @@ class EventPage extends GenericPage
{
$this->extendGlobalData($quests->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => QuestList::$brickFile,
'data' => $quests->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
'note' => $hasFilter ? sprintf(Util::$filterResultString, '?quests&filter=cr=33;crs='.$this->hId.';crv=0') : null
)
'params' => ['note' => $hasFilter ? sprintf(Util::$filterResultString, '?quests&filter=cr=33;crs='.$this->hId.';crv=0') : null]
);
$questItems = [];
@@ -212,13 +202,10 @@ class EventPage extends GenericPage
{
$this->extendGlobalData($eventItems->getJSGlobals(GLOBALINFO_SELF));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => ItemList::$brickFile,
'data' => $eventItems->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
'note' => $hasFilter ? sprintf(Util::$filterResultString, '?items&filter=cr=160;crs='.$this->hId.';crv=0') : null
)
'params' => ['note' => $hasFilter ? sprintf(Util::$filterResultString, '?items&filter=cr=160;crs='.$this->hId.';crv=0') : null]
);
}
}
@@ -266,13 +253,12 @@ class EventPage extends GenericPage
$relData = array_merge($relData, $d);
}
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => WorldEventList::$brickFile,
'data' => $relData,
'params' => array(
'id' => 'see-also',
'name' => '$LANG.tab_seealso',
'tabs' => '$tabsRelated',
'hiddenCols' => "$['date']",
'extraCols' => '$[Listview.extraCols.condition]'
)
@@ -312,7 +298,7 @@ class EventPage extends GenericPage
/* finalize related events */
/***************************/
foreach($this->lvData as &$view)
foreach($this->lvTabs as &$view)
{
if ($view['file'] != WorldEventList::$brickFile)
continue;
@@ -327,8 +313,6 @@ class EventPage extends GenericPage
}
}
}
}

View File

@@ -49,19 +49,16 @@ class EventsPage extends GenericPage
if ($d = $events->getField('requires'))
$this->deps[$events->id] = $d;
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'event',
'data' => $events->getListviewData(),
'params' => ['tabs' => '$myTabs']
'params' => []
);
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'calendar',
'data' => array_filter($events->getListviewData(), function($x) {return $x['id'] > 0;}),
'params' => array(
'tabs' => '$myTabs',
'hideCount' => 1
)
'params' => ['hideCount' => 1]
);
}
@@ -81,7 +78,7 @@ class EventsPage extends GenericPage
protected function postCache()
{
// recalculate dates with now()
foreach ($this->lvData as &$views)
foreach ($this->lvTabs as &$views)
{
foreach ($views['data'] as &$data)
{

View File

@@ -164,7 +164,6 @@ class FactionPage extends GenericPage
'data' => $items->getListviewData(),
'showRep' => true,
'params' => array(
'tabs' => '$tabsRelated',
'extraCols' => '$_',
'sort' => "$['standing', 'name']"
)
@@ -173,7 +172,7 @@ class FactionPage extends GenericPage
if ($items->getMatches() > CFG_SQL_LIMIT_DEFAULT)
$tab['params']['note'] = sprintf(Util::$filterResultString, '?items&filter=cr=17;crs='.$this->typeId.';crv=0');
$this->lvData[] = $tab;
$this->lvTabs[] = $tab;
}
// tab: creatures with onKill reputation
@@ -195,15 +194,13 @@ class FactionPage extends GenericPage
'file' => 'creature',
'data' => $killCreatures->getListviewData(),
'showRep' => true,
'params' => array(
'tabs' => '$tabsRelated',
)
'params' => []
);
if ($killCreatures->getMatches() > CFG_SQL_LIMIT_DEFAULT)
$tab['params']['note'] = sprintf(Util::$filterResultString, '?npcs&filter=cr=42;crs='.$this->typeId.';crv=0');
$this->lvData[] = $tab;
$this->lvTabs[] = $tab;
}
}
}
@@ -220,15 +217,14 @@ class FactionPage extends GenericPage
'showRep' => true,
'params' => array(
'id' => 'member',
'name' => '$LANG.tab_members',
'tabs' => '$tabsRelated'
'name' => '$LANG.tab_members'
)
);
if ($members->getMatches() > CFG_SQL_LIMIT_DEFAULT)
$tab['params']['note'] = sprintf(Util::$filterResultString, '?npcs&filter=cr=3;crs='.$this->typeId.';crv=0');
$this->lvData[] = $tab;
$this->lvTabs[] = $tab;
}
}
@@ -238,12 +234,10 @@ class FactionPage extends GenericPage
$objects = new GameObjectList(array(['faction', $_]));
if (!$objects->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'object',
'data' => $objects->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
)
'params' => []
);
}
}
@@ -266,16 +260,13 @@ class FactionPage extends GenericPage
'file' => 'quest',
'data' => $quests->getListviewData($this->typeId),
'showRep' => true,
'params' => array(
'tabs' => '$tabsRelated',
'extraCols' => '$_'
)
'params' => ['extraCols' => '$_']
);
if ($quests->getMatches() > CFG_SQL_LIMIT_DEFAULT)
$tab['params']['note'] = sprintf(Util::$filterResultString, '?quests&filter=cr=1;crs='.$this->typeId.';crv=0');
$this->lvData[] = $tab;
$this->lvTabs[] = $tab;
}
// tab: achievements
@@ -288,13 +279,12 @@ class FactionPage extends GenericPage
{
$this->extendGlobalData($acvs->getJSGlobals(GLOBALINFO_ANY));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'achievement',
'data' => $acvs->getListviewData(),
'params' => array(
'id' => 'criteria-of',
'name' => '$LANG.tab_criteriaof',
'tabs' => '$tabsRelated',
'visibleCols' => "$['category']"
)
);

View File

@@ -56,7 +56,7 @@ class FactionsPage extends GenericPage
if (!$factions->error)
$data = $factions->getListviewData();
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'faction',
'data' => $data,
'params' => []

View File

@@ -8,6 +8,7 @@ trait DetailPage
{
protected $hasComContent = true;
protected $category = null; // not used on detail pages
protected $lvTabs = []; // most pages have this
private $subject = null; // so it will not get cached
@@ -30,6 +31,7 @@ trait ListPage
protected $category = null;
protected $typeId = 0;
protected $filter = [];
protected $lvTabs = []; // most pages have this
private $filterObj = null;

View File

@@ -411,11 +411,10 @@ class ItemPage extends genericPage
foreach ($lootTabs->iterate() as $tab)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => $tab[0],
'data' => $tab[1],
'params' => [
'tabs' => '$tabsRelated',
'name' => $tab[2],
'id' => $tab[3],
'extraCols' => $tab[4] ? '$['.implode(', ', array_unique($tab[4])).']' : null,
@@ -454,11 +453,10 @@ class ItemPage extends genericPage
$lv['condition'][] = ['type' => TYPE_QUEST, 'typeId' => &$reqQuest[$lv['id']], 'status' => 1];
}
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $lootTab->getResult(),
'params' => [
'tabs' => '$tabsRelated',
'name' => $sf[2],
'id' => $sf[3],
'extraCols' => $sf[4] ? "$[".implode(', ', array_unique($sf[4]))."]" : null,
@@ -505,11 +503,10 @@ class ItemPage extends genericPage
if (!$contains->hasSetFields(['slot']))
$hCols[] = 'slot';
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $contains->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_cancontain',
'id' => 'can-contain',
'hiddenCols' => '$'.json_encode($hCols)
@@ -526,11 +523,10 @@ class ItemPage extends genericPage
{
$this->extendGlobalData($contains->getJSGlobals(GLOBALINFO_SELF));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $contains->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_canbeplacedin',
'id' => 'can-be-placed-in',
'hiddenCols' => "$['side']"
@@ -554,11 +550,10 @@ class ItemPage extends genericPage
if (!$criteriaOf->hasSetFields(['rewardIds']))
$hCols = ['rewards'];
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'achievement',
'data' => $criteriaOf->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_criteriaof',
'id' => 'criteria-of',
'visibleCols' => "$['category']",
@@ -579,11 +574,10 @@ class ItemPage extends genericPage
{
$this->extendGlobalData($reagent->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $reagent->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_reagentfor',
'id' => 'reagent-for',
'visibleCols' => "$['reagents']"
@@ -605,11 +599,10 @@ class ItemPage extends genericPage
$lockedObj = new GameObjectList(array(['lockId', $lockIds]));
if (!$lockedObj->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'object',
'data' => $lockedObj->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_unlocks',
'id' => 'unlocks-object'
]
@@ -622,11 +615,10 @@ class ItemPage extends genericPage
{
$this->extendGlobalData($lockedItm->getJSGlobals(GLOBALINFO_SELF));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $lockedItm->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_unlocks',
'id' => 'unlocks-item'
]
@@ -658,11 +650,10 @@ class ItemPage extends genericPage
{
$this->extendGlobalData($saItems->getJSGlobals(GLOBALINFO_SELF));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $saItems->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_seealso',
'id' => 'see-also'
]
@@ -677,11 +668,10 @@ class ItemPage extends genericPage
{
$this->extendGlobalData($starts->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $starts->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_starts',
'id' => 'starts-quest'
]
@@ -700,11 +690,10 @@ class ItemPage extends genericPage
{
$this->extendGlobalData($objective->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $objective->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_objectiveof',
'id' => 'objective-of-quest'
]
@@ -722,11 +711,10 @@ class ItemPage extends genericPage
{
$this->extendGlobalData($provided->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $provided->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_providedfor',
'id' => 'provided-for-quest'
]
@@ -742,11 +730,10 @@ class ItemPage extends genericPage
{
$this->extendGlobalData($sameModel->getJSGlobals(GLOBALINFO_SELF));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'genericmodel',
'data' => $sameModel->getListviewData(ITEMINFO_MODEL),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_samemodelas',
'id' => 'same-model-as',
'genericlinktype' => 'item'
@@ -815,11 +802,10 @@ class ItemPage extends genericPage
}
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'creature',
'data' => $sbData,
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_soldby',
'id' => 'sold-by-npc',
'extraCols' => '$['.implode(', ', $extraCols).']',
@@ -853,11 +839,10 @@ class ItemPage extends genericPage
$iCur = new CurrencyList(array(['itemId', $this->typeId]));
$filter = $iCur->error ? [TYPE_ITEM => $this->typeId] : [TYPE_CURRENCY => $iCur->id];
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $boughtBy->getListviewData(ITEMINFO_VENDOR, $filter),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_currencyfor',
'id' => 'currency-for',
'extraCols' => "$[Listview.funcBox.createSimpleCol('stack', 'stack', '10%', 'stack'), Listview.extraCols.cost]"
@@ -899,14 +884,13 @@ class ItemPage extends genericPage
if ($taughtSpells->hasSetFields(['reagent1']))
$visCols[] = 'reagents';
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $taughtSpells->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'name' => '$LANG.tab_teaches',
'id' => 'teaches',
'visibleCols' => '$'.json_encode($visCols),
'visibleCols' => '$'.json_encode($visCols)
]
);
}

View File

@@ -93,7 +93,6 @@ class ItemsPage extends GenericPage
protected function generateContent()
{
$this->addJS('?data=weight-presets&locale='.User::$localeId.'&t='.$_SESSION['dataKey']);
$this->hasGroupedTabs = false;
$conditions = [];
@@ -237,7 +236,7 @@ class ItemsPage extends GenericPage
if ($groups)
{
$nameSource = Lang::$item['inventoryType'];
$this->hasGroupedTabs = true;
$this->forceTabs = true;
$gbField = 'slot';
}
@@ -263,7 +262,7 @@ class ItemsPage extends GenericPage
$groups[] = $l; // push last value as negativ to signal misc group after $this level
$extraOpts = ['i' => ['o' => ['itemlevel DESC']]];
$nameSource[$l] = Lang::$item['tabOther'];
$this->hasGroupedTabs = true;
$this->forceTabs = true;
$gbField = 'itemlevel';
}
@@ -275,7 +274,7 @@ class ItemsPage extends GenericPage
});
$nameSource = Lang::$game['sources'];
$this->hasGroupedTabs = true;
$this->forceTabs = true;
$gbField = 'source';
break;
@@ -299,6 +298,7 @@ class ItemsPage extends GenericPage
$this->extendGlobalData($items->getJSGlobals());
$tab = array(
'file' => 'item',
'data' => $items->getListviewData($infoMask),
'params' => $this->sharedLV
);
@@ -396,7 +396,7 @@ class ItemsPage extends GenericPage
if ($gbField)
$tab['params']['hideCount'] = '$1';
$this->lvData[] = $tab;
$this->lvTabs[] = $tab;
}
// reformat for use in template
@@ -404,8 +404,8 @@ class ItemsPage extends GenericPage
$this->filter['upg'] = implode(':', array_keys($this->filter['upg']));
// whoops, we have no data? create emergency content
if (!$this->lvData)
$this->lvData[] = ['data' => [], 'params' => []];
if (empty($this->lvTabs))
$this->lvTabs[] = ['file' => 'item', 'data' => [], 'params' => []];
// sort for dropdown-menus
asort(Lang::$game['ra']);

View File

@@ -253,15 +253,14 @@ class ItemsetPage extends GenericPage
'data' => $relSets->getListviewData(),
'params' => array(
'id' => 'see-also',
'name' => '$LANG.tab_seealso',
'tabs' => '$tabsRelated'
'name' => '$LANG.tab_seealso'
)
);
if (!$relSets->hasDiffFields(['classMask']))
$lv['params']['hiddenCols'] = "$['classes']";
$this->lvData[] = $lv;
$this->lvTabs[] = $lv;
$this->extendGlobalData($relSets->getJSGlobals());
}

View File

@@ -58,7 +58,7 @@ class ItemsetsPage extends GenericPage
if ($this->filterObj->error)
$lv['params']['_errors'] = '$1';
$this->lvData = $lv;
$this->lvTabs[] = $lv;
// sort for dropdown-menus
asort(Lang::$itemset['notes'], SORT_NATURAL);

View File

@@ -296,25 +296,23 @@ class NpcPage extends GenericPage
}
if ($normal)
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $normal,
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_abilities',
'id' => 'abilities'
]
)
);
if ($controled)
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $controled,
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_controlledabilities',
'id' => 'controlled-abilities'
]
)
);
}
}
@@ -332,14 +330,13 @@ class NpcPage extends GenericPage
{
$this->extendGlobalData($summoned->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $summoned->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_summonedby',
'id' => 'summoned-by'
]
)
);
}
@@ -385,16 +382,15 @@ class NpcPage extends GenericPage
$data[$sId]['trainingcost'] = $_;
}
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $data,
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_teaches',
'id' => 'teaches',
'visibleCols' => "$['trainingcost']",
'extraCols' => $extra ? '$['.implode(', ', $extra).']' : null
]
)
);
}
}
@@ -410,15 +406,14 @@ class NpcPage extends GenericPage
{
$this->extendGlobalData($soldItems->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $soldItems->getListviewData(ITEMINFO_VENDOR, [TYPE_NPC => $this->typeId]),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_sells',
'id' => 'currency-for',
'extraCols' => "$[Listview.extraCols.condition, Listview.funcBox.createSimpleCol('stack', 'stack', '10%', 'stack'), Listview.extraCols.cost]"
]
)
);
}
}
@@ -488,18 +483,17 @@ class NpcPage extends GenericPage
$lv['condition'][] = ['type' => TYPE_QUEST, 'typeId' => &$reqQuest[$lv['id']], 'status' => 1];
}
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $creatureLoot->getResult(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => $sf[2],
'id' => $sf[3],
'extraCols' => $sf[4] ? "$[".implode(', ', array_unique($sf[4]))."]" : null,
'hiddenCols' => $sf[5] ? "$".json_encode($sf[5]) : null,
'visibleCols' => $sf[6] ? '$'.json_encode($sf[6]) : null,
'sort' => "$['-percent', 'name']",
]
)
);
}
}
@@ -548,27 +542,25 @@ class NpcPage extends GenericPage
if ($_[0])
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $_[0],
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_starts',
'id' => 'starts'
]
)
);
}
if ($_[1])
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $_[1],
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_ends',
'id' => 'ends'
]
)
);
}
}
@@ -587,14 +579,13 @@ class NpcPage extends GenericPage
{
$this->extendGlobalData($objectiveOf->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $objectiveOf->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_objectiveof',
'id' => 'objective-of'
]
)
);
}
@@ -609,14 +600,13 @@ class NpcPage extends GenericPage
{
$this->extendGlobalData($crtOf->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'achievement',
'data' => $crtOf->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_criteriaof',
'id' => 'criteria-of'
]
)
);
}
}

View File

@@ -71,7 +71,7 @@ class NpcsPage extends GenericPage
if ($this->filterObj->error)
$lv['params']['_errors'] = '$1';
$this->lvData = $lv;
$this->lvTabs[] = $lv;
// sort for dropdown-menus
asort(Lang::$game['fa']);

View File

@@ -270,14 +270,13 @@ class ObjectPage extends GenericPage
{
$this->extendGlobalData($summons->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $summons->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'summoned-by',
'name' => '$LANG.tab_summonedby'
]
)
);
}
@@ -293,16 +292,15 @@ class ObjectPage extends GenericPage
foreach ($data as $relId => $d)
$data[$relId]['trigger'] = array_search($relId, $_);
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $data,
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'spells',
'name' => '$LANG.tab_spells',
'hiddenCols' => "$['skill']",
'extraCols' => "$[Listview.funcBox.createSimpleCol('trigger', 'Condition', '10%', 'trigger')]"
]
)
);
}
}
@@ -313,14 +311,13 @@ class ObjectPage extends GenericPage
{
$this->extendGlobalData($acvs->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'achievement',
'data' => $acvs->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'criteria-of',
'name' => '$LANG.tab_criteriaof'
]
)
);
}
@@ -344,27 +341,25 @@ class ObjectPage extends GenericPage
if ($_[0])
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $_[0],
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_starts',
'id' => 'starts'
]
)
);
}
if ($_[1])
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $_[1],
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_ends',
'id' => 'ends'
]
)
);
}
}
@@ -377,14 +372,13 @@ class ObjectPage extends GenericPage
{
$this->extendGlobalData($relQuest->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $relQuest->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_quests',
'id' => 'quests'
]
)
);
}
}
@@ -420,16 +414,15 @@ class ObjectPage extends GenericPage
$extraCols[] = 'Listview.extraCols.percent';
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $goLoot->getResult(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_contains',
'id' => 'contains',
'extraCols' => "$[".implode(', ', array_unique($extraCols))."]",
'hiddenCols' => $hiddenCols ? '$'.json_encode(array_values($hiddenCols)) : null
]
)
);
}
}
@@ -464,14 +457,13 @@ class ObjectPage extends GenericPage
{
$this->extendGlobalData($sameModel->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'object',
'data' => $sameModel->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_samemodelas',
'id' => 'same-model-as'
]
)
);
}
}

View File

@@ -64,7 +64,7 @@ class ObjectsPage extends GenericPage
$params['_errors'] = '$1';
}
$this->lvData = array(
$this->lvTabs[] = array(
'file' => 'object',
'data' => $data,
'params' => $params

View File

@@ -86,12 +86,11 @@ class PetPage extends GenericPage
);
$tng = new CreatureList($condition);
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'creature',
'data' => $tng->getListviewData(NPCINFO_TAMEABLE),
'params' => array(
'name' => '$LANG.tab_tameable',
'tabs' => '$tabsRelated',
'hiddenCols' => "$['type']",
'visibleCols' => "$['skin']",
'note' => sprintf(Util::$filterResultString, '?npcs=1&filter=fa=38'),
@@ -99,12 +98,10 @@ class PetPage extends GenericPage
)
);
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'model',
'data' => $tng->getListviewData(NPCINFO_MODEL),
'params' => array(
'tabs' => '$tabsRelated'
)
'params' => []
);
// tab: diet
@@ -117,12 +114,11 @@ class PetPage extends GenericPage
$food = new ItemList(array(['i.subClass', [5, 8]], ['i.FoodType', $list], CFG_SQL_LIMIT_NONE));
$this->extendGlobalData($food->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $food->getListviewData(),
'params' => array(
'name' => '$LANG.diet',
'tabs' => '$tabsRelated',
'hiddenCols' => "$['source', 'slot', 'side']",
'sort' => "$['level']",
'id' => 'diet'
@@ -155,12 +151,11 @@ class PetPage extends GenericPage
$spells = new SpellList($conditions);
$this->extendGlobalData($spells->getJSGlobals(GLOBALINFO_SELF));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $spells->getListviewData(),
'params' => array(
'name' => '$LANG.tab_abilities',
'tabs' => '$tabsRelated',
'visibleCols' => "$['schools', 'level']",
'id' => 'abilities'
)
@@ -186,11 +181,10 @@ class PetPage extends GenericPage
$talents = new SpellList($conditions);
$this->extendGlobalData($talents->getJSGlobals(GLOBALINFO_SELF));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $talents->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
'visibleCols' => "$['tier', 'level']",
'name' => '$LANG.tab_talents',
'id' => 'talents',

View File

@@ -41,7 +41,7 @@ class PetsPage extends GenericPage
if (!$pets->hasDiffFields(['type']))
$params['hiddenCols'] = "$['type']";
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'pet',
'data' => $pets->getListviewData(),
'params' => $params

View File

@@ -11,7 +11,7 @@ class ProfilePage extends GenericPage
protected $path = [1, 5, 1];
protected $tabId = 1;
protected $tpl = 'profile';
protected $reqDataKey = true;
protected $gDataKey = true;
protected $js = ['filters.js', 'TalentCalc.js', 'swfobject.js', 'profile_all.js', 'profile.js', 'Profiler.js'];
protected $css = array(
['path' => 'TalentCalc.css'],

View File

@@ -93,7 +93,7 @@ class ProfilesPage extends GenericPage
// dont send ID for real chars unless they have some kind of custom avatar
// on second thought .. ids are required for resync, but the function that generates the icon is faulty
$this->lvData = array(
$this->lvTabs[] = array(
'file' => 'profile',
'data' => [$exampleRow],
'params' => [

View File

@@ -547,7 +547,7 @@ class QuestPage extends GenericPage
);
if ($maTab)
$this->lvData[] = $maTab;
$this->lvTabs[] = $maTab;
if ($_ = $this->subject->getField('reqMinRepFaction'))
{
@@ -572,14 +572,13 @@ class QuestPage extends GenericPage
if (!$seeAlso->error)
{
$this->extendGlobalData($seeAlso->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $seeAlso->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_seealso',
'id' => 'see-also'
]
)
);
}
@@ -588,14 +587,13 @@ class QuestPage extends GenericPage
if (!$criteriaOf->error)
{
$this->extendGlobalData($criteriaOf->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'achievement',
'data' => $criteriaOf->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_criteriaof',
'id' => 'criteria-of'
]
)
);
}
}
@@ -825,13 +823,12 @@ class QuestPage extends GenericPage
$attachmentTab = array(
'file' => 'item',
'data' => $mailLoot->getResult(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '[Mail Attachments]',
'id' => 'mail-attachments',
'extraCols' => "$[".implode(', ', array_merge($extraCols, $mailLoot->extraCols))."]",
'hiddenCols' => "$['side', 'slot', 'reqlevel']"
]
)
);
}
}

View File

@@ -73,7 +73,7 @@ class QuestsPage extends GenericPage
if ($this->filterObj->error)
$lv['params']['_errors'] = '$1';
$this->lvData = $lv;
$this->lvTabs[] = $lv;
}
protected function generateTitle()

View File

@@ -109,12 +109,10 @@ class RacePage extends GenericPage
if (!$classes->error)
{
$this->extendGlobalData($classes->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'class',
'data' => $classes->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated'
)
'params' => []
);
}
@@ -128,14 +126,13 @@ class RacePage extends GenericPage
if (!$tongues->error)
{
$this->extendGlobalData($tongues->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $tongues->getListviewData(),
'params' => array(
'id' => 'languages',
'name' => '$LANG.tab_languages',
'hiddenCols' => "$['reagents']",
'tabs' => '$tabsRelated'
'hiddenCols' => "$['reagents']"
)
);
}
@@ -150,14 +147,13 @@ class RacePage extends GenericPage
if (!$racials->error)
{
$this->extendGlobalData($racials->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $racials->getListviewData(),
'params' => array(
'id' => 'racial-traits',
'name' => '$LANG.tab_racialtraits',
'hiddenCols' => "$['reagents']",
'tabs' => '$tabsRelated'
'hiddenCols' => "$['reagents']"
)
);
}
@@ -173,12 +169,10 @@ class RacePage extends GenericPage
if (!$quests->error)
{
$this->extendGlobalData($quests->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $quests->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated'
)
'params' => []
);
}
@@ -196,13 +190,12 @@ class RacePage extends GenericPage
if (!$mounts->error)
{
$this->extendGlobalData($mounts->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $mounts->getListviewData(),
'params' => array(
'id' => 'mounts',
'name' => '$LANG.tab_mounts',
'tabs' => '$tabsRelated',
'hiddenCols' => "$['slot', 'type']"
)
);

View File

@@ -28,7 +28,7 @@ class RacesPage extends GenericPage
$races = new CharRaceList(array(['side', 0, '!']));
if (!$races->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'race',
'data' => $races->getListviewData(),
'params' => []

View File

@@ -146,10 +146,10 @@ class SearchPage extends GenericPage
protected function postCache()
{
if (!empty($this->lvData[3])) // has world events
if (!empty($this->lvTabs[3])) // has world events
{
// update WorldEvents to date()
foreach ($this->lvData[3]['data'] as &$d)
foreach ($this->lvTabs[3]['data'] as &$d)
{
$updated = WorldEventList::updateDates($d['_date']);
unset($d['_date']);
@@ -162,12 +162,12 @@ class SearchPage extends GenericPage
if ($this->searchMask & SEARCH_TYPE_REGULAR)
{
$foundTotal = 0;
foreach ($this->lvData as $_)
foreach ($this->lvTabs as $_)
$foundTotal += count($_['data']);
if ($foundTotal == 1) // only one match -> redirect to find
{
$_ = array_pop($this->lvData);
$_ = array_pop($this->lvTabs);
$type = Util::$typeStrings[$_['type']];
$typeId = key($_['data']);
@@ -246,7 +246,7 @@ class SearchPage extends GenericPage
if (!$asError)
{
if ($itemData = @$this->lvData[6]['data'])
if ($itemData = @$this->lvTabs[6]['data'])
{
$items = [];
foreach ($itemData as $k => $v)
@@ -255,7 +255,7 @@ class SearchPage extends GenericPage
$outItems = "\t".implode(",\n\t", $items)."\n";
}
if ($setData = @$this->lvData[5]['data'])
if ($setData = @$this->lvTabs[5]['data'])
{
$sets = [];
foreach ($setData as $k => $v)
@@ -282,13 +282,13 @@ class SearchPage extends GenericPage
$names = [];
$info = [];
foreach ($this->lvData as $_)
foreach ($this->lvTabs as $_)
$foundTotal += $_['matches'];
if (!$foundTotal || $asError)
return '["'.Util::jsEscape($this->search).'", []]';
foreach ($this->lvData as $idx => $set)
foreach ($this->lvTabs as $idx => $set)
{
$max = max(1, intVal($limit * $set['matches'] / $foundTotal));
$limit -= $max;
@@ -365,7 +365,7 @@ class SearchPage extends GenericPage
foreach ($this->searches as $idx => $ref)
if ($this->searchMask & (1 << $idx))
if ($_ = $this->$ref[0]($cndBase, $shared))
$this->lvData[$idx] = $_;
$this->lvTabs[$idx] = $_;
}
private function _searchCharClass($cndBase) // 0 Classes: $searchMask & 0x00000001
@@ -386,7 +386,7 @@ class SearchPage extends GenericPage
'matches' => $classes->getMatches(),
'file' => CharClassList::$brickFile,
'data' => $data,
'params' => ['tabs' => '$myTabs']
'params' => []
);
if ($classes->getMatches() > $this->maxResults)
@@ -417,7 +417,7 @@ class SearchPage extends GenericPage
'matches' => $races->getMatches(),
'file' => CharRaceList::$brickFile,
'data' => $data,
'params' => ['tabs' => '$myTabs']
'params' => []
);
if ($races->getMatches() > $this->maxResults)
@@ -448,7 +448,7 @@ class SearchPage extends GenericPage
'matches' => $titles->getMatches(),
'file' => TitleList::$brickFile,
'data' => $data,
'params' => ['tabs' => '$myTabs']
'params' => []
);
if ($titles->getMatches() > $this->maxResults)
@@ -486,7 +486,7 @@ class SearchPage extends GenericPage
'matches' => $wEvents->getMatches(),
'file' => WorldEventList::$brickFile,
'data' => $data,
'params' => ['tabs' => '$myTabs']
'params' => []
);
if ($wEvents->getMatches() > $this->maxResults)
@@ -517,7 +517,7 @@ class SearchPage extends GenericPage
'matches' => $money->getMatches(),
'file' => CurrencyList::$brickFile,
'data' => $data,
'params' => ['tabs' => '$myTabs']
'params' => []
);
if ($money->getMatches() > $this->maxResults)
@@ -551,7 +551,7 @@ class SearchPage extends GenericPage
'matches' => $sets->getMatches(),
'file' => ItemsetList::$brickFile,
'data' => $data,
'params' => ['tabs' => '$myTabs'],
'params' => [],
);
$shared['pcsToSet'] = $sets->pieceToSet;
@@ -625,7 +625,7 @@ class SearchPage extends GenericPage
'matches' => $items->getMatches(),
'file' => ItemList::$brickFile,
'data' => $data,
'params' => ['tabs' => '$myTabs']
'params' => []
);
if ($items->getMatches() > $this->maxResults)
@@ -681,7 +681,6 @@ class SearchPage extends GenericPage
'data' => $data,
'params' => [
'id' => 'abilities',
'tabs' => '$myTabs',
'name' => '$LANG.tab_abilities',
'visibleCols' => '$'.json_encode($vis)
]
@@ -737,7 +736,6 @@ class SearchPage extends GenericPage
'data' => $data,
'params' => [
'id' => 'talents',
'tabs' => '$myTabs',
'name' => '$LANG.tab_talents',
'visibleCols' => '$'.json_encode($vis)
]
@@ -784,7 +782,6 @@ class SearchPage extends GenericPage
'data' => $data,
'params' => [
'id' => 'glyphs',
'tabs' => '$myTabs',
'name' => '$LANG.tab_glyphs',
'visibleCols' => "$['singleclass', 'glyphtype']"
]
@@ -831,7 +828,6 @@ class SearchPage extends GenericPage
'data' => $data,
'params' => [
'id' => 'proficiencies',
'tabs' => '$myTabs',
'name' => '$LANG.tab_proficiencies',
'visibleCols' => "$['classes']"
]
@@ -878,7 +874,6 @@ class SearchPage extends GenericPage
'data' => $data,
'params' => [
'id' => 'professions',
'tabs' => '$myTabs',
'name' => '$LANG.tab_professions',
'visibleCols' => "$['source', 'reagents']"
]
@@ -925,7 +920,6 @@ class SearchPage extends GenericPage
'data' => $data,
'params' => [
'id' => 'companions',
'tabs' => '$myTabs',
'name' => '$LANG.tab_companions',
'visibleCols' => "$['reagents']"
]
@@ -972,7 +966,6 @@ class SearchPage extends GenericPage
'data' => $data,
'params' => [
'id' => 'mounts',
'tabs' => '$myTabs',
'name' => '$LANG.tab_mounts',
]
);
@@ -1012,7 +1005,6 @@ class SearchPage extends GenericPage
'data' => $data,
'params' => [
'id' => 'npcs',
'tabs' => '$myTabs',
'name' => '$LANG.tab_npcs',
]
);
@@ -1052,7 +1044,7 @@ class SearchPage extends GenericPage
'matches' => $quests->getMatches(),
'file' => QuestList::$brickFile,
'data' => $data,
'params' => ['tabs' => '$myTabs']
'params' => []
);
if ($quests->getMatches() > $this->maxResults)
@@ -1095,7 +1087,6 @@ class SearchPage extends GenericPage
'file' => AchievementList::$brickFile,
'data' => $data,
'params' => [
'tabs' => '$myTabs',
'visibleCols' => "$['category']"
]
);
@@ -1135,7 +1126,6 @@ class SearchPage extends GenericPage
'file' => AchievementList::$brickFile,
'data' => $data,
'params' => [
'tabs' => '$myTabs',
'visibleCols' => "$['category']",
'hiddenCols' => "$['side', 'points', 'rewards']",
'name' => '$LANG.tab_statistics',
@@ -1175,9 +1165,7 @@ class SearchPage extends GenericPage
'matches' => $zones->getMatches(),
'file' => ZoneList::$brickFile,
'data' => $data,
'params' => [
'tabs' => '$myTabs'
]
'params' => []
);
if ($zones->getMatches() > $this->maxResults)
@@ -1207,9 +1195,7 @@ class SearchPage extends GenericPage
'matches' => $objects->getMatches(),
'file' => GameObjectList::$brickFile,
'data' => $data,
'params' => [
'tabs' => '$myTabs'
]
'params' => []
);
if ($objects->getMatches() > $this->maxResults)
@@ -1241,9 +1227,7 @@ class SearchPage extends GenericPage
'matches' => $factions->getMatches(),
'file' => FactionList::$brickFile,
'data' => $data,
'params' => [
'tabs' => '$myTabs'
]
'params' => []
);
if ($factions->getMatches() > $this->maxResults)
@@ -1274,9 +1258,7 @@ class SearchPage extends GenericPage
'matches' => $skills->getMatches(),
'file' => SkillList::$brickFile,
'data' => $data,
'params' => [
'tabs' => '$myTabs'
]
'params' => []
);
if ($skills->getMatches() > $this->maxResults)
@@ -1307,7 +1289,7 @@ class SearchPage extends GenericPage
'matches' => $pets->getMatches(),
'file' => PetList::$brickFile,
'data' => $data,
'params' => ['tabs' => '$myTabs']
'params' => []
);
if ($pets->getMatches() > $this->maxResults)
@@ -1346,7 +1328,6 @@ class SearchPage extends GenericPage
'data' => $data,
'params' => [
'id' => 'npc-abilities',
'tabs' => '$myTabs',
'name' => '$LANG.tab_npcabilities',
'visibleCols' => "$['level']",
'hiddenCols' => "$['skill']"
@@ -1393,7 +1374,6 @@ class SearchPage extends GenericPage
'file' => SpellList::$brickFile,
'data' => $data,
'params' => [
'tabs' => '$myTabs',
'name' => '$LANG.tab_uncategorizedspells',
'visibleCols' => "$['level']",
'hiddenCols' => "$['skill']",

View File

@@ -73,11 +73,10 @@ class SkillPage extends GenericPage
{
$this->extendGlobalData($recipes->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $recipes->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
'id' => 'recipes',
'name' => '$LANG.tab_recipes',
'visibleCols' => "$['reagents', 'source']",
@@ -102,13 +101,12 @@ class SkillPage extends GenericPage
if ($_ = array_search($this->typeId, $filterRecipe))
$_ = sprintf(Util::$filterResultString, "?items=9.".$_);
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $recipeItems->getListviewData(),
'params' => array(
'id' => 'recipe-items',
'name' => '$LANG.tab_recipeitems',
'tabs' => '$tabsRelated',
'note' => $_
)
);
@@ -132,13 +130,12 @@ class SkillPage extends GenericPage
if ($_ = array_search($this->typeId, $filterItem))
$_ = sprintf(Util::$filterResultString, "?items&filter=cr=86;crs=".$_.";crv=0");
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $created->getListviewData(),
'params' => array(
'id' => 'crafted-items',
'name' => '$LANG.tab_crafteditems',
'tabs' => '$tabsRelated',
'note' => $_
)
);
@@ -160,13 +157,12 @@ class SkillPage extends GenericPage
if ($_ = array_search($this->typeId, $filterItem))
$_ = sprintf(Util::$filterResultString, "?items&filter=cr=99:168;crs=".$_.":2;crv=0:0");
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $reqBy->getListviewData(),
'params' => array(
'id' => 'required-by',
'name' => '$LANG.tab_requiredby',
'tabs' => '$tabsRelated',
'note' => $_
)
);
@@ -183,13 +179,12 @@ class SkillPage extends GenericPage
{
$this->extendGlobalData($reqBy->getJSGlobals(GLOBALINFO_SELF));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'itemset',
'data' => $reqBy->getListviewData(),
'params' => array(
'id' => 'required-by-set',
'name' => '$LANG.tab_requiredby',
'tabs' => '$tabsRelated'
'name' => '$LANG.tab_requiredby'
)
);
}
@@ -226,10 +221,7 @@ class SkillPage extends GenericPage
$lv = array(
'file' => 'spell',
'data' => $spells->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
'visibleCols' => "$['source']"
)
'params' => ['visibleCols' => "$['source']"]
);
switch ($this->cat)
@@ -247,7 +239,7 @@ class SkillPage extends GenericPage
break;
}
$this->lvData[] = $lv;
$this->lvTabs[] = $lv;
}
// tab: trainers [npcs]
@@ -282,11 +274,10 @@ class SkillPage extends GenericPage
{
$this->extendGlobalData($trainer->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'creature',
'data' => $trainer->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
'id' => 'trainer',
'name' => '$LANG.tab_trainers',
)
@@ -320,12 +311,10 @@ class SkillPage extends GenericPage
if (!$quests->error)
{
$this->extendGlobalData($quests->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $quests->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
)
'params' => []
);
}
}
@@ -342,12 +331,10 @@ class SkillPage extends GenericPage
$classes = new CharClassList(array(['id', $class]));
if (!$classes->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'class',
'data' => $classes->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
)
'params' => []
);
}
}
@@ -363,12 +350,10 @@ class SkillPage extends GenericPage
$races = new CharRaceList(array(['id', $race]));
if (!$races->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'race',
'data' => $races->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
)
'params' => []
);
}
}

View File

@@ -37,7 +37,7 @@ class SkillsPage extends GenericPage
$skills = new SkillList($conditions);
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'skill',
'data' => $skills->getListviewData(), // listview content
'params' => []

View File

@@ -327,16 +327,15 @@ class SpellPage extends GenericPage
if (!$modSpells->hasSetFields(['skillLines']))
$msH = "$['skill']";
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $modSpells->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'modifies',
'name' => '$LANG.tab_modifies',
'visibleCols' => "$['level']",
'hiddenCols' => isset($msH) ? $msH : null
]
)
);
$this->extendGlobalData($modSpells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
@@ -379,16 +378,15 @@ class SpellPage extends GenericPage
if (!$modsSpell->hasSetFields(['skillLines']))
$mbH = "$['skill']";
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $modsSpell->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'modified-by',
'name' => '$LANG.tab_modifiedby',
'visibleCols' => "$['level']",
'hiddenCols' => isset($mbH) ? $mbH : null
]
)
);
$this->extendGlobalData($modsSpell->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
@@ -444,17 +442,16 @@ class SpellPage extends GenericPage
if (!$saSpells->hasSetFields(['skillLines']))
$saH = "$['skill']";
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $data,
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'see-also',
'name' => '$LANG.tab_seealso',
'visibleCols' => "$['level']",
'extraCols' => isset($saE) ? $saE : null,
'hiddenCols' => isset($saH) ? $saH : null
]
)
);
$this->extendGlobalData($saSpells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
@@ -470,14 +467,13 @@ class SpellPage extends GenericPage
$ubSets = new ItemsetList($conditions);
if (!$ubSets->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'itemset',
'data' => $ubSets->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'used-by-itemset',
'name' => '$LANG.tab_usedby'
]
)
);
$this->extendGlobalData($ubSets->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
@@ -496,14 +492,13 @@ class SpellPage extends GenericPage
$ubItems = new ItemList($conditions);
if (!$ubItems->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $ubItems->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'used-by-item',
'name' => '$LANG.tab_usedby'
]
)
);
$this->extendGlobalData($ubItems->getJSGlobals(GLOBALINFO_SELF));
@@ -519,14 +514,13 @@ class SpellPage extends GenericPage
$ubObjects = new GameObjectList($conditions);
if (!$ubObjects->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'object',
'data' => $ubObjects->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'used-by-object',
'name' => '$LANG.tab_usedby'
]
)
);
$this->extendGlobalData($ubObjects->getJSGlobals());
@@ -542,14 +536,13 @@ class SpellPage extends GenericPage
$coAchievemnts = new AchievementList($conditions);
if (!$coAchievemnts->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'achievement',
'data' => $coAchievemnts->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'criteria-of',
'name' => '$LANG.tab_criteriaof'
]
)
);
$this->extendGlobalData($coAchievemnts->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
@@ -591,16 +584,15 @@ class SpellPage extends GenericPage
}
}
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $lv,
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'name' => '$LANG.tab_contains',
'id' => 'contains',
'hiddenCols' => "$['side', 'slot', 'source', 'reqlevel']",
'extraCols' => '$'.json_encode($extraCols, JSON_NUMERIC_CHECk)
]
)
);
}
@@ -652,16 +644,15 @@ class SpellPage extends GenericPage
if (!$stacks->hasSetFields(['skillLines']))
$sH = "$['skill']";
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $data,
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'spell-group-stack',
'name' => 'Stack Group', // todo (med): localize
'visibleCols' => "$['stackRules']",
'hiddenCols' => isset($sH) ? $sH : null
]
)
);
$this->extendGlobalData($stacks->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
@@ -705,16 +696,15 @@ class SpellPage extends GenericPage
}
}
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $data,
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'spell-link',
'name' => 'Linked with', // todo (med): localize
'hiddenCols' => "$['skill', 'name']",
'visibleCols' => "$['linkedTrigger', 'linkedEffect']"
]
)
);
$this->extendGlobalData($linked->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
@@ -732,14 +722,13 @@ class SpellPage extends GenericPage
$trigger = new SpellList($conditions);
if (!$trigger->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $trigger->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'triggered-by',
'name' => '$LANG.tab_triggeredby'
]
)
);
$this->extendGlobalData($trigger->getJSGlobals(GLOBALINFO_SELF));
@@ -758,14 +747,13 @@ class SpellPage extends GenericPage
$ubCreature = new CreatureList($conditions);
if (!$ubCreature->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'creature',
'data' => $ubCreature->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'used-by-npc',
'name' => '$LANG.tab_usedby'
]
)
);
$this->extendGlobalData($ubCreature->getJSGlobals(GLOBALINFO_SELF));
@@ -883,14 +871,13 @@ class SpellPage extends GenericPage
$_ = array_merge($_, $parents[$_['parentArea']]);
}
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'zone',
'data' => $lv,
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'extraCols' => $extra ? '$[Listview.extraCols.condition]' : null,
'hiddenCols' => $extra ? "$['instancetype']" : null
]
)
);
}
}
@@ -916,16 +903,15 @@ class SpellPage extends GenericPage
break;
}
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $teaches->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'teaches-spell',
'name' => '$LANG.tab_teaches',
'visibleCols' => '$'.json_encode($vis),
'hiddenCols' => $hid ? '$'.json_encode($hid) : null
]
)
);
}
}
@@ -976,11 +962,10 @@ class SpellPage extends GenericPage
if (!$tbTrainer->error)
{
$this->extendGlobalData($tbTrainer->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'creature',
'data' => $tbTrainer->getListviewData(),
'params' => array(
'tabs' => '$tabsRelated',
'id' => 'taught-by-npc',
'name' => '$LANG.tab_taughtby',
)
@@ -1002,14 +987,13 @@ class SpellPage extends GenericPage
if (!$tbSpell->error)
{
$tbsData = $tbSpell->getListviewData();
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'spell',
'data' => $tbsData,
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'taught-by-spell',
'name' => '$LANG.tab_taughtby'
]
)
);
$this->extendGlobalData($tbSpell->getJSGlobals(GLOBALINFO_SELF));
@@ -1029,14 +1013,13 @@ class SpellPage extends GenericPage
$tbQuest = new QuestList($conditions);
if (!$tbQuest->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $tbQuest->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'reward-from-quest',
'name' => '$LANG.tab_rewardfrom'
]
)
);
$this->extendGlobalData($tbQuest->getJSGlobals());
@@ -1055,14 +1038,13 @@ class SpellPage extends GenericPage
$tbItem = new ItemList($conditions);
if (!$tbItem->error)
{
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'item',
'data' => $tbItem->getListviewData(),
'params' => [
'tabs' => '$tabsRelated',
'params' => array(
'id' => 'taught-by-item',
'name' => '$LANG.tab_taughtby'
]
)
);
$this->extendGlobalData($tbItem->getJSGlobals(GLOBALINFO_SELF));

View File

@@ -100,7 +100,7 @@ class SpellsPage extends GenericPage
$conditions = [];
$visibleCols = [];
$hiddenCols = [];
$this->lvData = array(
$tab = array(
'file' => 'spell',
'data' => [],
'params' => []
@@ -200,10 +200,10 @@ class SpellsPage extends GenericPage
break;
}
$this->lvData['params']['note'] = '$$WH.sprintf(LANG.lvnote_pettalents, "'.$url.'")';
$tab['params']['note'] = '$$WH.sprintf(LANG.lvnote_pettalents, "'.$url.'")';
}
$this->lvData['params']['_petTalents'] = 1; // not conviced, this is correct, but .. it works
$tab['params']['_petTalents'] = 1; // not conviced, this is correct, but .. it works
break;
case -11: // Proficiencies ... the subIds are actually SkillLineCategories
@@ -298,8 +298,8 @@ class SpellsPage extends GenericPage
if (is_array($note))
$note = $note[0];
$this->lvData['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
$this->lvData['params']['sort'] = "$['skill', 'name']";
$tab['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
$tab['params']['sort'] = "$['skill', 'name']";
}
}
@@ -337,8 +337,8 @@ class SpellsPage extends GenericPage
if (is_array($note))
$note = $note[0];
$this->lvData['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
$this->lvData['params']['sort'] = "$['skill', 'name']";
$tab['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
$tab['params']['sort'] = "$['skill', 'name']";
}
}
@@ -362,7 +362,7 @@ class SpellsPage extends GenericPage
$spells = new SpellList($conditions);
$this->extendGlobalData($spells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvData['data'] = $spells->getListviewData();
$tab['data'] = $spells->getListviewData();
// recreate form selection
$this->filter = array_merge($this->filterObj->getForm('form'), $this->filter);
@@ -370,17 +370,17 @@ class SpellsPage extends GenericPage
$this->filter['fi'] = $this->filterObj->getForm();
if (!empty($this->filter['fi']['extraCols']))
$this->lvData['params']['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
$tab['params']['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
// create note if search limit was exceeded; overwriting 'note' is intentional
if ($spells->getMatches() > CFG_SQL_LIMIT_DEFAULT)
{
$this->lvData['params']['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_spellsfound', $spells->getMatches(), CFG_SQL_LIMIT_DEFAULT);
$this->lvData['params']['_truncated'] = 1;
$tab['params']['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_spellsfound', $spells->getMatches(), CFG_SQL_LIMIT_DEFAULT);
$tab['params']['_truncated'] = 1;
}
if ($this->filterObj->error)
$this->lvData['params']['_errors'] = '$1';
$tab['params']['_errors'] = '$1';
$mask = $spells->hasSetFields(['reagent1', 'skillLines', 'trainingCost']);
if ($mask & 0x1)
@@ -391,10 +391,12 @@ class SpellsPage extends GenericPage
$visibleCols[] = 'trainingcost';
if ($visibleCols)
$this->lvData['params']['visibleCols'] = '$'.json_encode($visibleCols);
$tab['params']['visibleCols'] = '$'.json_encode($visibleCols);
if ($hiddenCols)
$this->lvData['params']['hiddenCols'] = '$'.json_encode($hiddenCols);
$tab['params']['hiddenCols'] = '$'.json_encode($hiddenCols);
$this->lvTabs[] = $tab;
// sort for dropdown-menus
asort(Lang::$game['ra']);

View File

@@ -97,15 +97,14 @@ class TitlePage extends GenericPage
$quests = new QuestList(array(['id', $entries]));
$this->extendGlobalData($quests->getJSGlobals(GLOBALINFO_REWARDS));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'quest',
'data' => $quests->getListviewData(),
'params' => array(
'id' => 'reward-from-quest',
'name' => '$LANG.tab_rewardfrom',
'hiddenCols' => "$['experience', 'money']",
'visibleCols' => "$['category']",
'tabs' => '$tabsRelated'
'visibleCols' => "$['category']"
)
);
break;
@@ -113,15 +112,14 @@ class TitlePage extends GenericPage
$acvs = new AchievementList(array(['id', $entries]));
$this->extendGlobalData($acvs->getJSGlobals());
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'achievement',
'data' => $acvs->getListviewData(),
'params' => array(
'id' => 'reward-from-achievement',
'name' => '$LANG.tab_rewardfrom',
'visibleCols' => "$['category']",
'sort' => "$['reqlevel', 'name']",
'tabs' => '$tabsRelated'
'sort' => "$['reqlevel', 'name']"
)
);
break;

View File

@@ -46,7 +46,7 @@ class TitlesPage extends GenericPage
if (!$titles->hasAnySource())
$params['hiddenCols'] = "$['source']";
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'title',
'data' => $titles->getListviewData(),
'params' => $params

View File

@@ -67,34 +67,34 @@ class UtilityPage extends GenericPage
header('Location: ?'.Util::$typeStrings[$type].'='.$typeId);
die();
case 'latest-comments':
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'commentpreview',
'data' => [],
'params' => []
);
break;
case 'latest-screenshots':
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'screenshot',
'data' => [],
'params' => []
);
break;
case 'latest-videos':
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'video',
'data' => [],
'params' => []
);
break;
case 'latest-articles':
$this->lvData = [];
$this->lvTabs = [];
break;
case 'latest-additions':
$extraText = '';
break;
case 'unrated-comments':
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'commentpreview',
'data' => [],
'params' => []
@@ -115,10 +115,10 @@ class UtilityPage extends GenericPage
if (!$typeObj->error)
{
$this->extendGlobalData($typeObj->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED | GLOBALINFO_REWARDS));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => $typeObj::$brickFile,
'data' => $typeObj->getListviewData(),
'params' => ['tabs' => '$myTabs']
'params' => []
);
}
}
@@ -127,7 +127,7 @@ class UtilityPage extends GenericPage
if ($this->category && !in_array($this->category[0], [1, 7, 30]))
header('Location: ?most-comments=1'.($this->rss ? '&rss' : null));
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'commentpreview',
'data' => [],
'params' => []

View File

@@ -67,7 +67,7 @@ class ZonesPage extends GenericPage
$zones = new ZoneList($conditions);
$this->map = null;
$this->lvData[] = array(
$this->lvTabs[] = array(
'file' => 'zone',
'data' => $zones->getListviewData(),
'params' => []

View File

@@ -1,3 +1,4 @@
<div class="clear"></div>
<div class="text">
<h2><?php echo Lang::$main['contribute']; ?></h2>
</div>
@@ -17,4 +18,3 @@
tabsContribute.add(LANG.tab_suggestavideo, {id: 'suggest-a-video'});
tabsContribute.flush();
</script>
<div class="clear"></div>

View File

@@ -0,0 +1,46 @@
<?php
$relTabs = !empty($relTabs);
$tabVar = $relTabs ? 'tabsRelated' : 'myTabs';
$isTabbed = !empty($this->forceTabs) || $relTabs || count($this->lvTabs) > 1;
if ($isTabbed):
?>
<div class="clear"></div>
<div id="tabs-generic"></div>
<?php endif; ?>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php
if (!empty($this->gemScores)): // inherited from items.tpl.php
echo " var fi_gemScores = ".json_encode($this->gemScores, JSON_NUMERIC_CHECK).";\n";
endif;
if ($isTabbed):
echo " var ".$tabVar." = new Tabs({parent: \$WH.ge('tabs-generic')});\n";
endif;
foreach ($this->lvTabs as $lv):
if (!empty($lv['data']) || (count($this->lvTabs) == 1 && !$relTabs)):
if ($isTabbed):
$lv['params']['tabs'] = '$'.$tabVar;
endif;
$this->lvBrick($lv['file'], ['data' => $lv['data'], 'params' => $lv['params']]);
endif;
endforeach;
if ($relTabs):
?>
new Listview({template: 'comment', id: 'comments', name: LANG.tab_comments, tabs: <?php echo $tabVar; ?>, parent: 'lv-generic', data: lv_comments});
new Listview({template: 'screenshot', id: 'screenshots', name: LANG.tab_screenshots, tabs: <?php echo $tabVar; ?>, parent: 'lv-generic', data: lv_screenshots});
if (lv_videos.length || (g_user && g_user.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO)))
new Listview({template: 'video', id: 'videos', name: LANG.tab_videos, tabs: <?php echo $tabVar; ?>, parent: 'lv-generic', data: lv_videos});
<?php
endif;
if ($isTabbed):
echo " ".$tabVar.".flush();\n";
endif;
?>
//]]></script>

View File

@@ -1,18 +0,0 @@
<div id="tabs-generic"></div>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
var tabsRelated = new Tabs({parent: $WH.ge('tabs-generic')});
<?php
foreach ($this->lvData as $lv):
if (!empty($lv['data'])):
$this->lvBrick($lv['file'], ['data' => $lv['data'], 'params' => $lv['params']]);
endif;
endforeach;
?>
new Listview({template: 'comment', id: 'comments', name: LANG.tab_comments, tabs: tabsRelated, parent: 'lv-generic', data: lv_comments});
new Listview({template: 'screenshot', id: 'screenshots', name: LANG.tab_screenshots, tabs: tabsRelated, parent: 'lv-generic', data: lv_screenshots});
if (lv_videos.length || (g_user && g_user.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO)))
new Listview({template: 'video', id: 'videos', name: LANG.tab_videos, tabs: tabsRelated, parent: 'lv-generic', data: lv_videos});
tabsRelated.flush();
//]]></script>

View File

@@ -1,8 +1,8 @@
<?php $this->brick('header'); ?>
<div id="main">
<div id="main-precontents"></div>
<div id="main-contents" class="main-contents">
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<?php $this->brick('announcement'); ?>
@@ -106,20 +106,17 @@ echo ' '.Lang::$account['editAccount']."\n";
endif;
?>
</div>
<?php
/*
<div class="clear"></div>
<div id="related-tabs"></div>
<div id="lv-generic" class="listview">
<script type="text/javascript">//<![CDATA[
var tabsRelated = new Tabs({parent: $WH.ge('related-tabs')});
<?php
foreach ($this->lvData as $lv):
if (!empty($lv['data'])):
$this->lvBrick($lv['file'], ['data' => $lv['data'], 'params' => $lv['params']]);
endif;
endforeach;
?>
/* set in header*/
// relevant tabs here
# set in header
var lv_comments = [{id:1191765,type:12,typeId:1,subject:'Example Comment',preview:'And here is a little preview for this comment, that is capped after 75 char....',rating:15,date:'2010/11/27 22:23:16',elapsed:43866462,deleted:0,purged:1,domain:'live'}];
var lv_screenshots = [], lv_videos = [];
new Listview({template: "commentpreview", id: "comments", name: LANG.tab_comments, tabs: tabsRelated, parent: "lv-generic", onBeforeCreate: Listview.funcBox.beforeUserComments, hiddenCols: ['author'], data: lv_comments});
@@ -127,7 +124,13 @@ endforeach;
new Listview({template: "video", id: "videos", name: LANG.tab_videos, tabs: tabsRelated, parent: "lv-generic", data: lv_videos});
tabsRelated.flush();
//]]></script>
</div>
</div>
*/
?>
<?php $this->brick('lvTabs'); ?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>

View File

@@ -1,8 +1,8 @@
<?php $this->brick('header'); ?>
<div id="main">
<div id="main-precontents"></div>
<div id="main-contents" class="main-contents">
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<div class="pad3"></div>
<?php if (!empty($this->text)): ?>
<div class="inputbox">
@@ -59,6 +59,7 @@
<div class="inputbox" style="position: relative">
<h1><?php echo $this->head; ?></h1>
<div id="inputbox-error"><?php echo $this->error; ?></div>
<table align="center">
<tr>
<td align="right"><?php echo Lang::$account['email'].lang::$main['colon']; ?></td>
@@ -78,6 +79,7 @@
</tr>
<input type="hidden" name="token" value="<?php echo $this->token; ?>" />
</table>
</div>
</form>
@@ -121,7 +123,7 @@
<script type="text/javascript">$WH.ge('email-generic').focus()</script>
<?php endif; ?>
<div class="clear"></div>
</div>
</div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>

View File

@@ -1,8 +1,8 @@
<?php $this->brick('header'); ?>
<div id="main">
<div id="main-precontents"></div>
<div id="main-contents" class="main-contents">
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<div class="pad3"></div>
<script type="text/javascript">
function inputBoxValidate(f)
@@ -48,6 +48,7 @@
</td>
</tr>
</table>
<br>
<div style="position: absolute; right: 5px; bottom: 5px;"><?php echo Lang::$account['forgot'].lang::$main['colon']; ?><a href="?account=forgotusername"><?php echo Lang::$account['forgotUser']; ?></a> | <a href="?account=forgotpassword"><?php echo Lang::$account['forgotPass']; ?></a></div>
</div>
@@ -61,7 +62,7 @@ endif;
?>
<script type="text/javascript">$WH.ge('username-generic').focus()</script>
<div class="clear"></div>
</div>
</div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>

View File

@@ -1,8 +1,8 @@
<?php $this->brick('header'); ?>
<div id="main">
<div id="main-precontents"></div>
<div id="main-contents" class="main-contents">
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<div class="pad3"></div>
<?php if (!empty($this->text)): ?>
<div class="inputbox">
@@ -79,6 +79,7 @@
<div class="inputbox" style="position: relative">
<h1><?php echo $this->head; ?></h1>
<div id="inputbox-error"><?php echo $this->error; ?></div>
<table align="center">
<tr>
<td align="right"><?php echo Lang::$account['user'].lang::$main['colon']; ?></td>
@@ -105,13 +106,14 @@
</td>
</tr>
</table>
</div>
</form>
<script type="text/javascript">$WH.ge('username-generic').focus()</script>
<?php endif; ?>
<div class="clear"></div>
</div>
</div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>

View File

@@ -106,11 +106,12 @@ endif;
</div>
<?php
$this->brick('tabsRelated');
$this->brick('lvTabs', ['relTabs' => true]);
$this->brick('contribute');
?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->

View File

@@ -78,10 +78,7 @@ endforeach;
?>
//]]></script>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php $this->lvBrick($this->lvData['file'], ['data' => $this->lvData['data'], 'params' => $this->lvData['params']] ); ?>
//]]></script>
<?php $this->brick('lvTabs'); ?>
<div class="clear"></div>
</div><!-- main-contents -->

View File

@@ -1,8 +1,8 @@
<?php $this->brick('header'); ?>
<div id="main">
<div id="main-precontents"></div>
<div id="main-contents" class="main-contents">
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<?php $this->brick('announcement'); ?>
@@ -18,8 +18,9 @@ endforeach;
new Summary({template:'compare',id:'compare',parent:'compare-generic',groups:<?php echo json_encode($this->summary, JSON_NUMERIC_CHECK); ?>});
//]]></script>
</div>
<div class="clear"></div>
</div>
</div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>

View File

@@ -55,11 +55,12 @@ endif;
</div>
<?php
$this->brick('tabsRelated');
$this->brick('lvTabs', ['relTabs' => true]);
$this->brick('contribute');
?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->

View File

@@ -83,11 +83,12 @@ $this->brick('book');
</div>
<?php
$this->brick('tabsRelated');
$this->brick('lvTabs', ['relTabs' => true]);
$this->brick('contribute');
?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->

View File

@@ -20,7 +20,6 @@ endif;
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
<form action="?items<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel">
<div style="float: left"><?php echo Lang::$item['_quality'].Lang::$main['colon']; ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['qu[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small>
@@ -193,31 +192,7 @@ endforeach;
?>
//]]></script>
<?php
if ($this->hasGroupedTabs):
echo " <div id=\"tabs-generic\"></div>\n";
endif;
?>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php
if (!empty($this->gemScores)):
echo " var fi_gemScores = ".json_encode($this->gemScores, JSON_NUMERIC_CHECK).";\n";
endif;
if ($this->hasGroupedTabs):
echo " var tabsGroups = new Tabs({parent: \$WH.ge('tabs-generic')});\n";
endif;
foreach ($this->lvData as $tab):
$this->lvBrick('item', ['data' => $tab['data'], 'params' => $tab['params']]);
endforeach;
if ($this->hasGroupedTabs):
echo " tabsGroups.flush();\n";
endif;
?>
//]]></script>
<?php $this->brick('lvTabs'); ?>
<div class="clear"></div>
</div><!-- main-contents -->

View File

@@ -83,11 +83,12 @@ endforeach;
</div>
<?php
$this->brick('tabsRelated');
$this->brick('lvTabs', ['relTabs' => true]);
$this->brick('contribute');
?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->

View File

@@ -1,6 +1,6 @@
<?php
$this->brick('header');
$f = $this->filter
$f = $this->filter; // shorthand
?>
<div class="main" id="main">
@@ -13,7 +13,7 @@ $f = $this->filter
g_initPath(<?php echo json_encode($this->path, JSON_NUMERIC_CHECK).', '.(empty($f['query']) ? 0 : 1) ?>);
<?php
if (!empty($f['query'])):
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [2]), { filter: '+={$filter.query|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [2])) });
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [2]), { filter: '+={$f['query']|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [2])) });
endif;
?>
</script>
@@ -27,9 +27,7 @@ endif;
<select name="qu[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818">
<?php
foreach (Lang::$item['quality'] as $i => $str):
if ($str):
echo ' <option value="'.$i.'" class="q'.$i.'"'.(isset($f['qu']) && in_array($i, (array)$f['qu']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
endforeach;
?>
</select>
@@ -121,10 +119,7 @@ endforeach;
?>
//]]></script>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php $this->lvBrick($this->lvData['file'], ['data' => $this->lvData['data'], 'params' => $this->lvData['params']]); ?>
//]]></script>
<?php $this->brick('lvTabs'); ?>
<div class="clear"></div>
</div><!-- main-contents -->

View File

@@ -22,33 +22,10 @@ if (!empty($this->name) || !empty($this->h1Links)):
'</div>';
endif;
if (!empty($this->lvData)):
if (count($this->lvData) > 1):
echo '<div id="tabs-generic"></div>';
endif;
$this->brick('lvTabs');
?>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php
if (count($this->lvData) > 1):
echo 'var myTabs = new Tabs({parent: $WH.ge(\'tabs-generic\')});';
endif;
foreach ($this->lvData as $lv):
if (isset($lv['file'])):
$this->lvBrick($lv['file'], ['data' => $lv['data'], 'params' => $lv['params']]);
endif;
endforeach;
if (count($this->lvData) > 1):
echo 'myTabs.flush();';
endif;
?>
//]]></script>
<div class="clear"></div>
<?php
endif;
?>
</div><!-- main-contents -->
</div><!-- main -->

View File

@@ -1,8 +1,8 @@
<?php $this->brick('header'); ?>
<div id="main">
<div id="main-precontents"></div>
<div id="main-contents" class="main-contents">
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<?php $this->brick('announcement'); ?>
@@ -55,7 +55,8 @@
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>

View File

@@ -147,10 +147,12 @@ endif;
</div>
<?php
$this->brick('tabsRelated');
$this->brick('lvTabs', ['relTabs' => true]);
$this->brick('contribute');
?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->

View File

@@ -13,7 +13,7 @@ $f = $this->filter; // shorthand
g_initPath(<?php echo json_encode($this->path, JSON_NUMERIC_CHECK).', '.(empty($f['query']) ? 0 : 1) ?>);
<?php
if (!empty($f['query'])):
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [4]), { filter: '+={$filter.query|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [45])) });
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [4]), { filter: '+={$f['query']|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [45])) });
endif;
?>
</script>
@@ -111,10 +111,7 @@ endforeach;
?>
//]]></script>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php $this->lvBrick($this->lvData['file'], ['data' => $this->lvData['data'], 'params' => $this->lvData['params']]); ?>
//]]></script>
<?php $this->brick('lvTabs'); ?>
<div class="clear"></div>
</div><!-- main-contents -->

View File

@@ -84,11 +84,12 @@ $this->brick('book');
</div>
<?php
$this->brick('tabsRelated');
$this->brick('lvTabs', ['relTabs' => true]);
$this->brick('contribute');
?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->

View File

@@ -13,7 +13,7 @@ $f = $this->filter; // shorthand
g_initPath(<?php echo json_encode($this->path, JSON_NUMERIC_CHECK).', '.(empty($f['query']) ? 0 : 1) ?>);
<?php
if (!empty($f['query'])):
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [5]), { filter: '+={$filter.query|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [5])) });
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [5]), { filter: '+={$f['query']|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [5])) });
endif;
?>
</script>
@@ -52,10 +52,7 @@ endforeach;
?>
//]]></script>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php $this->lvBrick($this->lvData['file'], ['data' => $this->lvData['data'], 'params' => $this->lvData['params']]); ?>
//]]></script>
<?php $this->brick('lvTabs'); ?>
<div class="clear"></div>
</div><!-- main-contents -->

View File

@@ -114,10 +114,7 @@ endforeach;
?>
//]]></script>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php $this->lvBrick($this->lvData['file'], ['data' => $this->lvData['data'], 'params' => $this->lvData['params']]); ?>
//]]></script>
<?php $this->brick('lvTabs'); ?>
<div class="clear"></div>
</div><!-- main-contents -->

View File

@@ -225,11 +225,12 @@ endif;
</div>
<?php
$this->brick('tabsRelated');
$this->brick('lvTabs', ['relTabs' => true]);
$this->brick('contribute');
?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->

View File

@@ -13,7 +13,7 @@ $f = $this->filter; // shorthand
g_initPath(<?php echo json_encode($this->path, JSON_NUMERIC_CHECK).', '.(empty($f['query']) ? 0 : 1) ?>);
<?php
if (!empty($f['query'])):
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [3]), { filter: '+={$filter.query|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [3])) });
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [3]), { filter: '+={$f['query']|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [3])) });
endif;
?>
</script>
@@ -93,10 +93,7 @@ endforeach;
?>
//]]></script>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php $this->lvBrick($this->lvData['file'], ['data' => $this->lvData['data'], 'params' => $this->lvData['params']]); ?>
//]]></script>
<?php $this->brick('lvTabs'); ?>
<div class="clear"></div>
</div><!-- main-contents -->

View File

@@ -1,7 +1,7 @@
<?php $this->brick('header'); ?>
<div id="main">
<div id="main-precontents"></div>
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<?php $this->brick('announcement'); ?>
@@ -9,7 +9,7 @@
<div class="text">
<a href="<?php echo Util::$wowheadLink; ?>" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
<?php
if ($this->lvData):
if ($this->lvTabs):
echo ' <h1>'.Lang::$search['foundResult'].' <i>'.Util::htmlEscape($this->search).'</i>';
if ($this->invalid):
echo '<span class="sub">'.sprintf(Lang::$search['ignoredTerms'], implode(', ', $this->invalid)).'</span>';
@@ -17,18 +17,9 @@ if ($this->lvData):
echo "</h1>\n";
?>
</div>
<div id="tabs-generic"></div>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">
var myTabs = new Tabs({parent: $WH.ge('tabs-generic')});
<?php
foreach ($this->lvData as $lv):
$this->lvBrick($lv['file'], ['data' => $lv['data'], 'params' => $lv['params']]);
endforeach;
?>
myTabs.flush();
</script>
<?php
$this->brick('lvTabs');
else:
echo ' <h1>'.Lang::$search['noResult'].' <i>'.Util::htmlEscape($this->search).'</i>';
if ($this->invalid):
@@ -36,16 +27,14 @@ else:
endif;
echo "</h1>\n";
?>
<div class="search-noresults"/></div>
<div class="search-noresults"></div>
<?php
echo ' '.Lang::$search['tryAgain']."\n";
endif;
?>
<div class="clear"></div>
</div>
</div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>

View File

@@ -232,10 +232,11 @@ endforeach;
</div>
<?php
$this->brick('tabsRelated');
$this->brick('lvTabs', ['relTabs' => true]);
$this->brick('contribute');
?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->

View File

@@ -13,7 +13,7 @@ $f = $this->filter; // shorthand
g_initPath(<?php echo json_encode($this->path, JSON_NUMERIC_CHECK).', '.(empty($f['query']) ? 0 : 1) ?>);
<?php
if (!empty($f['query'])):
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [1]), { filter: '+={$filter.query|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [1])) });
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [1]), { filter: '+={$f['query']|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [1])) });
endif;
?>
</script>
@@ -159,12 +159,7 @@ endforeach;
?>
//]]></script>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php
$this->lvBrick($this->lvData['file'], ['data' => $this->lvData['data'], 'params' => $this->lvData['params']]);
?>
//]]></script>
<?php $this->brick('lvTabs'); ?>
<div class="clear"></div>
</div><!-- main-contents -->

View File

@@ -1,8 +1,8 @@
<?php $this->brick('header'); ?>
<div id="main">
<div id="main-precontents"></div>
<div id="main-contents" class="main-contents">
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<?php $this->brick('announcement'); ?>
@@ -15,8 +15,9 @@
<script type="text/javascript">
<?php echo $this->tcType; ?>_init();
</script>
<div class="clear"></div>
</div>
</div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>