Commit 7792a8c8 by Tuomas Riihimäki

Merge branch 'primelayout_fix' into 'master'

Primelayout fix

Sivupalkkien sulkeminen jää selaimen kekseihin ja tila säilyy sielä.
2 parents 7af996b3 cedc9e68
<!DOCTYPE html <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:tools="http://java.sun.com/jsf/composite/tools" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:tools="http://java.sun.com/jsf/composite/tools" xmlns:bill="http://java.sun.com/jsf/composite/cditools/bills" xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core">
xmlns:bill="http://java.sun.com/jsf/composite/cditools/bills" xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core">
<h:body> <h:body>
...@@ -15,6 +14,9 @@ ...@@ -15,6 +14,9 @@
<h1>#{i18n['page.bill.show.header']}</h1> <h1>#{i18n['page.bill.show.header']}</h1>
</ui:define> </ui:define>
<ui:define name="content"> <ui:define name="content">
<p:outputPanel id="billPanel">
<ui:fragment rendered="#{billEditView.bill.paid}"> <ui:fragment rendered="#{billEditView.bill.paid}">
<h:outputText value="#{i18n['bill.billIsPaid']}" /> <h:outputText value="#{i18n['bill.billIsPaid']}" />
<br /> <br />
...@@ -59,19 +61,17 @@ ...@@ -59,19 +61,17 @@
</table> </table>
</ui:fragment> </ui:fragment>
<ui:fragment rendered="#{!billEditView.bill.paid and !billEditView.bill.expired}">
<h:form> <p:outputPanel rendered="#{!billEditView.bill.paid and !billEditView.bill.expired}">
<p:commandButton id="cancelbtn" onclick="PF('confirmation').show()" onerror="location.reload(true);" value="#{i18n['bill.cancel']}" /> <h:form>
<p:commandButton id="cancelbtn" actionListener="#{billEditView.expireBill()}" onerror="location.reload(true);" value="#{i18n['bill.cancel']}" update=":billPanel">
<p:confirm header="Confirmation" message="Are you sure?" icon="ui-icon-alert" />
</p:commandButton>
<p:confirmDialog id="confirmDialog" message="#{i18n['generic.sure.message']}" header="#{i18n['generic.sure.header']}" severity="alert" widgetVar="confirmation"> </h:form>
</p:outputPanel>
</p:outputPanel>
<p:commandButton value="#{i18n['generic.sure.yes']}" onerror="location.reload(true);" onclick="PF('confirmation').hide()" actionListener="#{billEditView.expireBill()}" ajax="false" />
<p:commandButton value="#{i18n['generic.sure.no']}" onerror="location.reload(true);" onclick="PF('confirmation').hide()" type="button" />
</p:confirmDialog>
</h:form>
</ui:fragment>
</ui:define> </ui:define>
</ui:composition> </ui:composition>
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
</ui:repeat> </ui:repeat>
$(".languageSelector .ui-button-text").text(""); $(".languageSelector .ui-button-text").text("");
}); });
var apina = null;
</script> </script>
<!--[if lt IE 7]> <!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p> <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
...@@ -68,10 +69,12 @@ ...@@ -68,10 +69,12 @@
<p:layout fullPage="true" id="mainlayoutpanel"> <p:layout widgetVar="mainlayout" fullPage="true" id="mainlayoutpanel" >
<p:layoutUnit id="toppanel" position="north" styleClass="bgColor1" size="60"> <p:layoutUnit id="toppanel" position="north" styleClass="bgColor1" size="60">
<div id="header_box"> <div id="header_box">
<div id="header_left"> <div id="header_left">
...@@ -111,10 +114,12 @@ ...@@ -111,10 +114,12 @@
</div> </div>
</p:layoutUnit> </p:layoutUnit>
<p:layoutUnit header="#{i18n['menu']}" collapsible="true" id="leftpanel" position="west" resizable="true" size="200" minSize="100"> <p:layoutUnit header="#{i18n['menu']}" collapsible="true" id="leftpanel" position="west" resizable="true" size="200" minSize="100" >
<nav> <nav>
<p:panelMenu model="#{primeMenuView.menuModel}" /> <h:form id="mainMenu">
<p:panelMenu id="panelmenu" model="#{primeMenuView.menuModel}" />
</h:form>
<h:link style="font-size: 10px;" rendered="#{readerView.shopToOthers}" outcome="/shop/showReaderEvents" value="Readers" /> <h:link style="font-size: 10px;" rendered="#{readerView.shopToOthers}" outcome="/shop/showReaderEvents" value="Readers" />
</nav> </nav>
</p:layoutUnit> </p:layoutUnit>
...@@ -141,7 +146,7 @@ ...@@ -141,7 +146,7 @@
<p:menubar rendered="#{primeMenuView.hasSecondaryMenu}" model="#{primeMenuView.secondaryMenuModel}" /> <p:menubar rendered="#{primeMenuView.hasSecondaryMenu}" model="#{primeMenuView.secondaryMenuModel}" />
<h:form id="messages"> <h:form id="messages">
<p:growl id="growl" showDetail="true" /> <p:growl id="growl" showDetail="true" />
</h:form> </h:form>
...@@ -164,7 +169,7 @@ ...@@ -164,7 +169,7 @@
</p:layoutUnit> </p:layoutUnit>
<p:layoutUnit header="#{i18n['user.info']}" resizable="true" collapsible="true" id="rightpanel" position="east"> <p:layoutUnit header="#{i18n['user.info']}" resizable="true" collapsible="true" id="rightpanel" position="east">
...@@ -207,11 +212,36 @@ ...@@ -207,11 +212,36 @@
</p:layoutUnit> </p:layoutUnit>
</p:layout> </p:layout>
<h:form>
<p:confirmDialog global="true" showEffect="fade" hideEffect="explode">
<p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
</p:confirmDialog>
</h:form>
<footer class="bgColor1"> </footer> <footer class="bgColor1"> </footer>
<script type="text/javascript"> <script type="text/javascript">
$(function() {
// autoresize for main panels, this is magic :)
PrimeFaces.widgets.mainlayout.layout.loadCookie();
PrimeFaces.widgets.mainlayout.onclose = function() {
PrimeFaces.widgets.mainlayout.layout.saveCookie()
}
PrimeFaces.widgets.mainlayout.onopen = function() {
PrimeFaces.widgets.mainlayout.layout.saveCookie()
}
});
PrimeFaces.locales['fi'] = { PrimeFaces.locales['fi'] = {
closeText : 'Sulje', closeText : 'Sulje',
prevText : 'Edellinen', prevText : 'Edellinen',
......
...@@ -191,6 +191,13 @@ ...@@ -191,6 +191,13 @@
</section> </section>
<h:form>
<p:confirmDialog global="true" showEffect="fade" hideEffect="explode">
<p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
</p:confirmDialog>
</h:form>
<footer class="bgColor1"> </footer> <footer class="bgColor1"> </footer>
<script type="text/javascript"> <script type="text/javascript">
......
...@@ -175,6 +175,7 @@ public class PrimeMenuView extends GenericCDIView { ...@@ -175,6 +175,7 @@ public class PrimeMenuView extends GenericCDIView {
DefaultMenuItem subItem = new DefaultMenuItem(); DefaultMenuItem subItem = new DefaultMenuItem();
subItem.setValue(I18n.get(child.getKey())); subItem.setValue(I18n.get(child.getKey()));
subItem.setOutcome(subm.get(0).getOutcome()); subItem.setOutcome(subm.get(0).getOutcome());
ret.addElement(subItem); ret.addElement(subItem);
...@@ -280,12 +281,12 @@ public class PrimeMenuView extends GenericCDIView { ...@@ -280,12 +281,12 @@ public class PrimeMenuView extends GenericCDIView {
if (m.getSitepage() != null) if (m.getSitepage() != null)
{ {
outcome = new StringBuilder("/pages/index?id=").append(m.getSitepage().getId()).toString(); outcome = new StringBuilder("/pages/index?id=").append(m.getSitepage().getId()).toString();
} else { } else {
outcome = m.getItem().getUrl(); outcome = m.getItem().getUrl();
} }
String key = I18n.get(m.getKey()); String key = I18n.get(m.getKey());
item.setValue(key); item.setValue(key);
item.setOutcome(outcome); item.setOutcome(outcome);
} }
......
...@@ -37,11 +37,11 @@ public class ProductListView extends PaginationView<Product> { ...@@ -37,11 +37,11 @@ public class ProductListView extends PaginationView<Product> {
private static final long serialVersionUID = -5621674984772482156L; private static final long serialVersionUID = -5621674984772482156L;
@EJB @EJB
private transient ProductBeanLocal pizzabean; private transient ProductBeanLocal productBean;
public void initView() { public void initView() {
if (super.requirePermissions(ShopPermission.LIST_ALL_PRODUCTS)) { if (super.requirePermissions(ShopPermission.LIST_ALL_PRODUCTS)) {
super.setResults(pizzabean.getProducts()); super.setResults(productBean.getProducts());
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!