Add page for the fe classes

This commit is contained in:
dario-cfpt
2020-02-25 08:26:30 +01:00
parent fa173d1f19
commit d2fa8edb74
9 changed files with 211 additions and 39 deletions

View File

@ -9,8 +9,14 @@ routes = [
}
},
{
name: 'classes',
path: '/classes/',
templateUrl: './pages/classes.html',
on: {
pageAfterIn: () => {
displayAllClasses();
}
}
},
{
name: 'stat',
@ -28,10 +34,28 @@ routes = [
$$("#picture-char").attr("src", "img/characters/" + char.firstName + ".png");
actualCharId = charId;
createTableOfStats();
createListOfAvailableClasses()
displayTableOfGrowthRates();
createListOfAvailableClasses();
displayCharGrowthRates();
}
createEventForGraphSwitch(displayGraphOfGrowthRates);
createEventForGraphSwitch(displayGraphOfGrowthRatesForChar);
}
}
},
{
name: 'feclass',
path: '/class/:id',
templateUrl: './pages/feclass.html',
on: {
pageInit: (e, page) => {
const id = page.route.params.id;
if (id != null) {
const feclass = feData.classes.find(x => x.id == id);
$$("#title-char").text(feclass.name);
actualClassId = id;
createTableOfStats();
displayClassGrowthRates();
}
createEventForGraphSwitch(displayGraphOfGrowthRatesForClass);
}
}
},