1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
| <?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<f:view>
<h:head>
<style>
.header{
font-weight:bold;
}
.rich-calendar-header{
text-align:center;
}
.organizer-cell {
width: 90px;
height: 90px;
overflow: hidden;
}
</style>
</h:head>
<h:body>
<h:form id="form">
<rich:messages/>
<a4j:jsFunction name="ajaxSubmit" oncomplete="#{rich:component('panel')}.show()" reRender="editContent" />
<rich:calendar value="#{calendarBean.selectedDate}"
popup="false" showApplyButton="false"
cellWidth="100px" cellHeight="100px"
boundaryDatesMode="none" showWeeksBar="false"
dataModel="#{calendarDataModel}" onchanged="if (event.rich.date) {ajaxSubmit();}" oncurrentdateselect="return false" id="organizer" valueChangeListener="#{calendarDataModel.valueChanged}" showFooter="false">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Current Month" styleClass="header"/>
</h:panelGroup>
</f:facet>
<a4j:outputPanel layout="block" id="cell" onclick="#{rich:component('organizer')}.resetSelectedDate()" style="height: 100%;" styleClass="organizer-cell">
<div>
<h:outputText value="{day}" style="align:center"/>
</div>
<div> </div>
<div>
<h:outputText value="{data.shortDescription.escapeHTML()}" />
</div>
<div>
<h:outputText value="{data.description.escapeHTML()}"/>
</div>
</a4j:outputPanel>
</rich:calendar>
</h:form>
<rich:modalPanel id="panel" resizeable="false">
<f:facet name="header">Edit Day:</f:facet>
<f:facet name="controls">
<h:graphicImage value="resources/images/home.jpg" id="hidelink" styleClass="hidelink"/>
<rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
</f:facet>
<h:form>
<h:panelGrid columns="2" id="editContent">
<h:outputText value="Short Description:"/>
<h:inputText value="#{calendarDataModel.currentShortDescription}"/>
<h:outputText value="Day Notes:"/>
<h:inputTextarea value="#{calendarDataModel.currentDescription}"/>
<a4j:commandButton value="Store" action="#{calendarDataModel.storeDayDetails}" id="storebutton" oncomplete="#{rich:component('panel')}.hide()" reRender="organizer"/>
<button type="button" id="cancelbutton" onclick="#{rich:component('panel')}.hide()">Cancel</button>
</h:panelGrid>
</h:form>
</rich:modalPanel>
</h:body>
</f:view>
</html> |
Partager