mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 00:53:17 +02:00
First steps
This commit is contained in:
parent
36453644e0
commit
7d4fd995f2
2 changed files with 24 additions and 1 deletions
|
@ -87,8 +87,26 @@
|
|||
});
|
||||
}
|
||||
|
||||
function buyButtonClicked(name, author, price) {
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: "CHECKOUT",
|
||||
itemName: name,
|
||||
itemAuthor: author,
|
||||
itemPrice: price
|
||||
}));
|
||||
}
|
||||
|
||||
function injectHiFiCode() {
|
||||
// Nothing to do.
|
||||
$('#side-info').find('.btn').attr('href', '#')
|
||||
$('#side-info').find('.btn').on('click', function () {
|
||||
buyButtonClicked("TEST ITEM", "Zach Fox", 10);
|
||||
});
|
||||
|
||||
$('.item-footer').find('#price-or-edit').find('a').attr('href', '#')
|
||||
$('.item-footer').find('#price-or-edit').find('a').on('click', function () {
|
||||
buyButtonClicked("TEST ITEM", "Zach Fox", 10);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function updateClaraCode() {
|
||||
|
|
|
@ -59,6 +59,11 @@
|
|||
tablet.gotoWebScreen(MARKETPLACE_URL_INITIAL, MARKETPLACES_INJECT_SCRIPT_URL);
|
||||
tablet.webEventReceived.connect(function (message) {
|
||||
|
||||
if (message.type === "CHECKOUT") {
|
||||
print("ZRF: Buy Button Clicked: ", JSON.stringify(message));
|
||||
//tablet.pushOntoStack("");
|
||||
}
|
||||
|
||||
if (message === GOTO_DIRECTORY) {
|
||||
tablet.gotoWebScreen(MARKETPLACES_URL, MARKETPLACES_INJECT_SCRIPT_URL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue