diff --git a/src/interaction/slaveInteract.js b/src/interaction/slaveInteract.js index 512fc04de2acade0d594f99ebe93491120b24ae3..bd06ceb72dab601db2cf692fa48c058bb193a71d 100644 --- a/src/interaction/slaveInteract.js +++ b/src/interaction/slaveInteract.js @@ -79,49 +79,41 @@ App.UI.SlaveInteract.mainPage = function(slave) { { title: "Description", id: "description", - onClick: () => jQuery("#content-description").empty().append(App.UI.SlaveInteract.description(slave)), get node() { return App.UI.SlaveInteract.description(slave); } }, { title: "Modify", id: "modify", - onClick: () => jQuery("#content-modify").empty().append(App.UI.SlaveInteract.modify(slave)), get node() { return App.UI.SlaveInteract.modify(slave); } }, { title: "Work", id: "work", - onClick: () => jQuery("#content-work").empty().append(App.UI.SlaveInteract.work(slave)), get node() { return App.UI.SlaveInteract.work(slave); } }, { title: "Appearance", id: "appearance", - onClick: () => jQuery("#content-appearance").empty().append(App.UI.SlaveInteract.wardrobe(slave)), get node() { return App.UI.SlaveInteract.wardrobe(slave); } }, { title: "Physical Regimen", id: "physical-regimen", - onClick: () => jQuery("#content-physical-regimen").empty().append(App.UI.SlaveInteract.physicalRegimen(slave)), get node() { return App.UI.SlaveInteract.physicalRegimen(slave); } }, { title: "Rules", id: "rules", - onClick: () => jQuery("#content-rules").empty().append(App.UI.SlaveInteract.rules(slave)), get node() { return App.UI.SlaveInteract.rules(slave); } }, { title: "Financial", id: "financial", - onClick: () => jQuery("#content-financial").empty().append(App.UI.SlaveInteract.financial(slave)), get node() { return App.UI.SlaveInteract.financial(slave); } }, { title: "Customize", id: "customize", - onClick: () => jQuery("#content-customize").empty().append(App.UI.SlaveInteract.custom(slave)), get node() { return App.UI.SlaveInteract.custom(slave); } }, { @@ -171,6 +163,7 @@ App.UI.SlaveInteract.mainPage = function(slave) { btn.innerHTML = item.title; btn.onclick = (event) => { App.UI.tabBar.openTab(event, item.id); + jQuery(`#content-${item.id}`).empty().append(item.node); if (item.hasOwnProperty("onClick")){ item.onClick(); }