Commit dfe5e1e0 by Tuomas Riihimäki

Reverted shopToUser.xhtml

1 parent dd9ffa70
......@@ -20,31 +20,7 @@
<h:form id="shoppingcartform">
<h:panelGrid columns="2">
<h:panelGroup>
<div id="shopItems">
<ui:repeat value="#{productShopView.shoppingcart}" var="cart">
<div class="shopItem">
<h:commandLink action="#{productShopView.addOne}" value="#{cart.product.name}">
<f:ajax render="@form" />
</h:commandLink>
</div>
</ui:repeat>
</div>
</h:panelGroup>
<h:panelGroup>
<h:dataGrid >
</h:dataGrid>
<h:outputLabel value="#{i18n['shop.readBarcode']}" />
<h:inputText id="barcode" value="#{productShopView.barcode}" />
<h:commandButton action="#{productShopView.readBarcode}" onclick="blip(); return true;" value="#{i18n['productShopView.readBarcode']}">
<f:ajax render="@form" onevent="barcodeReadEvent" execute="@form" />
</h:commandButton>
<h:panelGrid columns="2">
<h:outputLabel value="#{i18n['shop.accountBalance']}" />
<h:outputText value="#{productShopView.accountBalance}">
......@@ -61,36 +37,24 @@
<f:ajax render="@form" event="valueChange" />
<f:convertNumber />
</h:inputText>
</h:panelGroup>
</h:panelGrid>
<h:panelGroup>
<h:outputLabel value="#{i18n['shop.readBarcode']}" />
<h:inputText id="barcode" value="#{productShopView.barcode}" />
<h:commandButton action="#{productShopView.readBarcode}" onclick="blip(); return true;" value="#{i18n['productShopView.readBarcode']}">
<f:ajax render="@form" onevent="barcodeReadEvent" execute="@form" />
</h:commandButton>
</h:panelGroup>
</h:panelGrid>
<h:outputText value="#{i18n['product.shopInstant']}" />
<h:selectBooleanCheckbox value="#{productShopView.payInstant}">
<f:ajax render="@form" execute="@form" />
</h:selectBooleanCheckbox>
<h:outputScript library="primefaces" name="jquery/jquery.js" />
<div style="margin-top: 5px;">
<h:commandButton action="#{cc.attrs.commitaction}" id="commitbutton-top" value="#{cc.attrs.commitValue}" />
</div>
<div>
<h:outputText value="#{i18n['productshop.total']} " />
<h:outputText value="#{productShopView.totalPrice}">
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
</h:outputText>
</div>
<h:commandButton action="#{cc.attrs.commitaction}" id="commitbutton-botton" value="#{cc.attrs.commitValue}" />
<products:shop commitaction="#{productShopView.commitShoppingCart()}" items="#{productShopView.shoppingcart}" commitValue="#{i18n['productshop.commit']}" />
</h:form>
<script>
var blipSnd = new Audio(
......@@ -98,7 +62,6 @@
$(function() {
$("#shoppingcartform\\:barcode").focus();
});
function blip() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!