show offers panel
This commit is contained in:
parent
0dd14eae8e
commit
51a8666332
3 changed files with 25 additions and 1 deletions
|
|
@ -71,6 +71,10 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
#view-my-offers-root {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#create-offer-controls {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
const buttonStartCreateOffer = document.getElementById(
|
||||
'button-start-create-offer'
|
||||
);
|
||||
const buttonViewMyOffers = document.getElementById('button-view-my-offers');
|
||||
const closeOfferControls = document.getElementById('close-offer-controls-x');
|
||||
const createOfferRoot = document.getElementById('create-offer-root');
|
||||
const viewMyOffersRoot = document.getElementById('view-my-offers-root');
|
||||
const buyOrSellButtonGroup = document.getElementById(
|
||||
'button-group-buy-or-sell'
|
||||
);
|
||||
|
|
@ -49,6 +51,11 @@ function toggleCreateOfferControls() {
|
|||
createOfferRoot.style.display === 'block' ? 'none' : 'block';
|
||||
}
|
||||
|
||||
function toggleViewMyOffersPanel() {
|
||||
viewMyOffersRoot.style.display =
|
||||
viewMyOffersRoot.style.display === 'block' ? 'none' : 'block';
|
||||
}
|
||||
|
||||
function modifyPremiumValue(delta) {
|
||||
const regexExpression = /-*\d+/;
|
||||
const numValue = parseInt(premiumValue.innerText.match(regexExpression)[0]);
|
||||
|
|
@ -169,6 +176,10 @@ buttonStartCreateOffer.addEventListener('click', () => {
|
|||
toggleCreateOfferControls();
|
||||
});
|
||||
|
||||
buttonViewMyOffers.addEventListener('click', () => {
|
||||
toggleViewMyOffersPanel();
|
||||
});
|
||||
|
||||
closeOfferControls.addEventListener('click', () => {
|
||||
toggleCreateOfferControls();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,13 +12,19 @@
|
|||
<%- include("partials/appCommonHeader") %>
|
||||
|
||||
<div class="over-background" id="offers-root">
|
||||
<button
|
||||
id="button-view-my-offers"
|
||||
class="button-primary button-medium font-medium"
|
||||
>
|
||||
Ver mis ofertas
|
||||
</button>
|
||||
<button
|
||||
id="button-start-create-offer"
|
||||
class="button-primary button-medium font-medium"
|
||||
style="display: block"
|
||||
>
|
||||
Crear nueva oferta
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<div class="over-background" id="create-offer-root">
|
||||
<div id="create-offer-controls">
|
||||
|
|
@ -179,6 +185,9 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="over-background" id="view-my-offers-root">
|
||||
|
||||
</div>
|
||||
<div
|
||||
id="offer-created-confirmation"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue