Added the add button to all sections.

This commit is contained in:
bluesaxman 2020-09-21 13:49:09 -06:00
parent 53e5b063f1
commit 9ba77c96fc

View File

@ -93,7 +93,11 @@ function updateEvent() {
updateEvent();
}
});
// Add Hand
buttonAdd("#hands",null,"+",function () {
popupDialog("addHand","Please name new hand",true, inputDialog,{"inputType":"text"},function (newHandName) {
window.gameSession.send('{"action":"add","type":"hand","id":"'+newHandName+'"}');
});
}, "add_button", "li");
}
if (window.UI.menu.pools.button.checked) {
elementPlace("#display","pools",null,"ol");
@ -109,7 +113,11 @@ function updateEvent() {
updateEvent();
}
});
// Add Pool
buttonAdd("#pools",null,"+",function () {
popupDialog("addHand","Please name new pool",true, inputDialog,{"inputType":"text"},function (newPoolName) {
window.gameSession.send('{"action":"add","type":"pool","id":"'+newPoolName+'"}');
});
}, "add_button", "li");
}
}