Commit 067ffb02 by Tuomas Riihimäki

If user has cursor in product count field, and presses 'buy', the limits of the …

…product might not get updated.
1 parent 20f273a7
......@@ -53,11 +53,13 @@
<p:outputPanel rendered="#{!cart.product.usershopAutoproduct}">
<p:commandButton action="#{productShopView.addMinusOne}" value="#{i18n['productshop.minusOne']}" update="billcart" />
<p:inputText size="2" id="cartcount" escape="false" value="#{cart.count}">
<f:ajax render="@form"
listener="#{productShopView.countChangeListener}" />
<p:inputText onblur="$('.focusdisabler').attr('disabled',false).removeClass('ui-state-disabled'); $('.focusenabler').attr('disabled',true).addClass('ui-state-disabled')" onfocus="$('.focusdisabler').attr('disabled',true).addClass('ui-state-disabled'); $('.focusenabler').attr('disabled',false).removeClass('ui-state-disabled');"
size="2" id="cartcount" escape="false" value="#{cart.count}" >
<!-- f:ajax render="@form" listener="#{productShopView.countChangeListener}" /> -->
<f:convertNumber maxFractionDigits="2" minFractionDigits="0" />
</p:inputText>
<p:commandButton action="#{productShopView.addOne}" update="billcart" value="#{i18n['productshop.plusOne']}" />
</p:outputPanel>
</p:column>
......@@ -146,9 +148,11 @@
function initPaymentButtons() {
};
</script>
<p:commandButton ajax="false" onerror="location.reload(true);"
<p:commandButton styleClass="focusdisabler" ajax="false" onerror="location.reload(true);"
action="#{cc.attrs.commitaction}" id="commitbutton-botton"
value="#{cc.attrs.commitValue}" />
<p:commandButton actionListener="#{productShopView.countChangeListener}" onclick="return false;" styleClass="focusenabler" disabled="true" value="Päivitä hinnat"></p:commandButton>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!