Commit dfe5e1e0 by Tuomas Riihimäki

Reverted shopToUser.xhtml

1 parent dd9ffa70
...@@ -20,31 +20,7 @@ ...@@ -20,31 +20,7 @@
<h:form id="shoppingcartform"> <h:form id="shoppingcartform">
<h:panelGrid columns="2"> <h:panelGrid columns="2">
<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:outputLabel value="#{i18n['shop.accountBalance']}" /> <h:outputLabel value="#{i18n['shop.accountBalance']}" />
<h:outputText value="#{productShopView.accountBalance}"> <h:outputText value="#{productShopView.accountBalance}">
...@@ -61,36 +37,24 @@ ...@@ -61,36 +37,24 @@
<f:ajax render="@form" event="valueChange" /> <f:ajax render="@form" event="valueChange" />
<f:convertNumber /> <f:convertNumber />
</h:inputText> </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:panelGrid>
<h:outputText value="#{i18n['product.shopInstant']}" /> <h:outputText value="#{i18n['product.shopInstant']}" />
<h:selectBooleanCheckbox value="#{productShopView.payInstant}"> <h:selectBooleanCheckbox value="#{productShopView.payInstant}">
<f:ajax render="@form" execute="@form" /> <f:ajax render="@form" execute="@form" />
</h:selectBooleanCheckbox> </h:selectBooleanCheckbox>
<h:outputScript library="primefaces" name="jquery/jquery.js" /> <products:shop commitaction="#{productShopView.commitShoppingCart()}" items="#{productShopView.shoppingcart}" commitValue="#{i18n['productshop.commit']}" />
<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}" />
</h:form> </h:form>
<script> <script>
var blipSnd = new Audio( var blipSnd = new Audio(
...@@ -98,7 +62,6 @@ ...@@ -98,7 +62,6 @@
$(function() { $(function() {
$("#shoppingcartform\\:barcode").focus(); $("#shoppingcartform\\:barcode").focus();
}); });
function blip() { function blip() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!