[jboss-cvs] jboss-seam/examples/wiki/view/plugins/forumTopics ...
Christian Bauer
christian at hibernate.org
Tue Dec 18 23:29:30 EST 2007
User: cbauer
Date: 07/12/18 23:29:30
Modified: examples/wiki/view/plugins/forumTopics topicForm.xhtml
topicControls.xhtml topicTable.xhtml plugin.xhtml
Log:
Major rewrite of the most of the application
Revision Changes Path
1.2 +19 -14 jboss-seam/examples/wiki/view/plugins/forumTopics/topicForm.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: topicForm.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/plugins/forumTopics/topicForm.xhtml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- topicForm.xhtml 9 Nov 2007 15:00:29 -0000 1.1
+++ topicForm.xhtml 19 Dec 2007 04:29:30 -0000 1.2
@@ -15,29 +15,32 @@
<h:form id="topicForm">
<div class="form">
+ <ui:include src="../../includes/statusIndicator.xhtml">
+ <ui:param name="statusId" value="topicFormStatus"/>
+ </ui:include>
+
<div class="formHead">
- <h:outputText value="New Topic"/>
+ <h:outputText value="#{messages['forum.label.NewTopic']}"/>
</div>
<a:region>
<s:div styleClass="formFields formBorder">
<s:decorate id="nameDecorate" template="../../includes/formFieldDecorate.xhtml">
- <ui:define name="label">Subject</ui:define>
- <h:inputText id="topicName" tabindex="1" size="90" maxlength="255" required="true" value="#{topicHome.instance.name}">
- <a:support event="onblur" reRender="nameDecorate"/>
- </h:inputText>
+ <ui:define name="label">#{messages['forum.label.Subject']}</ui:define>
+ <h:inputText id="topicName" tabindex="1" size="60" maxlength="255" required="true" value="#{topicHome.instance.name}"/>
</s:decorate>
<ui:include src="../../includes/wikiTextEditor.xhtml">
<ui:param name="textEditorId" value="topic"/>
<ui:param name="textPreviewId" value="topicPreview"/>
<ui:param name="namingContainer" value="forumTopicsPlugin\\\\:topicForm"/>
- <ui:param name="label" value="Message"/>
+ <ui:param name="statusId" value="topicFormStatus"/>
+ <ui:param name="label" value="#{messages['forum.label.Message']}"/>
<ui:param name="valueBinding" value="#{topicHome.formContent}"/>
<ui:param name="valueMaxLength" value="32768"/>
<ui:param name="valueRequired" value="true"/>
- <ui:param name="textEditorColumns" value="88"/>
+ <ui:param name="textEditorColumns" value="60"/>
<ui:param name="textEditorRows" value="20"/>
</ui:include>
@@ -47,18 +50,18 @@
<ui:param name="valueBinding" value="#{topicHome.instance.content}"/>
<ui:param name="enablePlugins" value="false"/>
<ui:param name="baseDocument" value="#{topicHome.instance}"/>
- <ui:param name="baseDirectory" value="#{topicHome.parentDirectory}"/>
+ <ui:param name="baseDirectory" value="#{currentDirectory}"/>
</ui:include>
</s:div>
<s:fragment rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}">
<s:div styleClass="entry">
<div class="label">
- <h:outputText value="Options:"/>
+ <h:outputText value="#{messages['forum.label.Options']}:"/>
</div>
<div class="input">
- <h:selectBooleanCheckbox value="#{topicHome.instance.sticky}" tabindex="1"/>
- <h:outputText value="Sticky posting"/>
+ <h:selectBooleanCheckbox value="#{topicHome.sticky}" tabindex="1"/>
+ <h:outputText value="#{messages['forum.label.StickyPosting']}"/>
</div>
</s:div>
@@ -66,7 +69,7 @@
<div class="label"> </div>
<div class="input">
<h:selectBooleanCheckbox value="#{topicHome.instance.enableCommentForm}" tabindex="1"/>
- <h:outputText value="Open topic, allow replies"/>
+ <h:outputText value="#{messages['forum.label.OpenTopicAllowReplies']}"/>
</div>
</s:div>
</s:fragment>
@@ -79,15 +82,17 @@
<div class="input">
<a:commandLink id="save" action="#{topicHome.persist}"
+ eventsQueue="ajaxEventQueue"
reRender="forumTopicsPluginContainer, messageBoxContainer"
tabindex="1" accesskey="#{messages['forum.button.Save.accesskey']}"
- styleClass="button saveButton">
+ styleClass="button saveButton sessionEventTrigger">
<h:outputText escape="false" styleClass="buttonLabel" value="#{messages['forum.button.Save']}"/>
</a:commandLink>
<a:commandLink action="#{topicHome.cancel}"
reRender="forumTopicsPluginContainer, messageBoxContainer"
- tabindex="1" styleClass="buttonNonpersistent"
+ eventsQueue="ajaxEventQueue"
+ tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger"
accesskey="#{messages['forum.button.Cancel.accesskey']}">
<h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.Cancel']}"/>
</a:commandLink>
1.3 +29 -19 jboss-seam/examples/wiki/view/plugins/forumTopics/topicControls.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: topicControls.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/plugins/forumTopics/topicControls.xhtml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- topicControls.xhtml 20 Nov 2007 08:05:10 -0000 1.2
+++ topicControls.xhtml 19 Dec 2007 04:29:30 -0000 1.3
@@ -8,11 +8,13 @@
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:s="http://jboss.com/products/seam/taglib">
+<s:fragment rendered="#{topicHome.showForm}">
+ <script type="text/javascript">startSessionTimeoutCheck();</script>
+</s:fragment>
+
<s:fragment rendered="#{not topicHome.showForm}">
- <s:div styleClass="forumDescription">
- <h:outputText value="#{currentDirectory.description}"/>
- </s:div>
+ <script type="text/javascript">stopSessionTimeoutCheck();</script>
<s:div styleClass="forumsFeedLink undecoratedLink" rendered="#{not empty currentDirectory.feed}">
<h:outputLink value="#{facesContext.externalContext.request.contextPath}/servlets/feeds/atom.seam?feedId=#{currentDirectory.feed.id}"
@@ -22,6 +24,12 @@
</h:outputLink>
</s:div>
+ <h:panelGrid columns="2" styleClass="forumDescriptionTopicControls"
+ columnClasses="forumDescription, topicControls"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:outputText value="#{currentDirectory.description}"/>
+
<h:form>
<h:panelGroup>
@@ -31,17 +39,19 @@
<h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.ForumList']}"/>
</h:outputLink>
- <a:commandLink rendered="#{s:hasPermission('Node', 'create', currentDirectory)}"
- action="#{topicHome.newTopic}"
- reRender="forumTopicsPluginContainer, messageBoxContainer"
+ <s:fragment rendered="#{s:hasPermission('Node', 'create', currentDirectory)}">
+ <h:outputLink value="#{wiki:renderURL(currentDocument)}?showTopicForm=true"
accesskey="#{messages['forum.button.NewTopic.accesskey']}"
tabindex="1" styleClass="buttonNonpersistent">
<h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.NewTopic']}"/>
- </a:commandLink>
+ </h:outputLink>
+ </s:fragment>
</h:panelGroup>
</h:form>
+ </h:panelGrid>
+
</s:fragment>
</s:div>
\ No newline at end of file
1.3 +30 -63 jboss-seam/examples/wiki/view/plugins/forumTopics/topicTable.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: topicTable.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/plugins/forumTopics/topicTable.xhtml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- topicTable.xhtml 20 Nov 2007 08:05:10 -0000 1.2
+++ topicTable.xhtml 19 Dec 2007 04:29:30 -0000 1.3
@@ -15,107 +15,74 @@
<div class="box">
<h:dataTable id="topicTable"
- var="topic"
+ var="t"
value="#{forumQuery.topics}"
rendered="#{not empty forumQuery.topics}"
styleClass="datatable topLeftBottomBorder topicTable"
- headerClass="regularHeader rightBorder alignCenter"
- columnClasses="onePercentColumn rightBorder alignCenter, defaultColumn rightBorder alignLeft,
- onePercentColumn rightBorder alignCenter, fivePercentColumn rightBorder alignCenter,
- tenPercentColumn rightBorder alignCenter"
+ headerClass="regularHeader rightBorder alignCenter smallFont"
+ columnClasses="onePercentColumn rightBorder alignCenter smallFont, defaultColumn rightBorder alignLeft wrapWhitespace,
+ onePercentColumn rightBorder alignCenter smallFont, fivePercentColumn rightBorder alignCenter smallFont,
+ tenPercentColumn rightBorder alignCenter smallFont"
rowClasses="rowOdd,rowEven"
cellpadding="0" cellspacing="0" border="0">
<h:column>
- <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/icon.#{topic.iconName}.gif" width="22" height="26"/>
+ <f:facet name="header"> </f:facet>
+ <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/icon.#{t.iconName}.gif" width="22" height="26"/>
</h:column>
<h:column>
<f:facet name="header">Topic</f:facet>
- <h:outputLink value="#{wiki:renderURL(topic)}" tabindex="1">
- <h:outputText value="#{wiki:truncateString(topic.name, 60, '...')}"/>
+ <h:outputLink value="#{wiki:renderURL(t.topic)}" tabindex="1">
+ <h:outputText value="#{wiki:truncateString(t.topic.name, 60, '...')}"/>
</h:outputLink>
</h:column>
<h:column>
<f:facet name="header">Replies</f:facet>
- <h:outputText value="#{topic.numOfComments}" rendered="#{topic.numOfComments != 0}"/>
- <h:outputText value="-" rendered="#{topic.numOfComments == 0}"/>
+ <h:outputText value="#{t.numOfReplies}" rendered="#{t.numOfReplies != 0}"/>
+ <h:outputText value="-" rendered="#{t.numOfReplies == 0}"/>
</h:column>
<h:column>
<f:facet name="header">Author</f:facet>
- <s:fragment rendered="#{wiki:isRegularUser(topic.createdBy)}">
- <s:div styleClass="undecoratedLink">
- <h:outputLink value="#"
- onclick="jQuery('#userInfoPopup#{topic.createdBy.id}').jqmShow().css({right: '11%'});">
- <h:outputText value="#{topic.createdBy.fullname}"/>
- </h:outputLink>
- </s:div>
- <ui:include src="../forumPosting/userInfoPopup.xhtml">
- <ui:param name="user" value="#{topic.createdBy}"/>
- <ui:param name="userInfoPopupId" value="#{topic.createdBy.id}"/>
+ <ui:include src="../../includes/userInfoLink.xhtml">
+ <ui:param name="user" value="#{t.topic.createdBy}"/>
</ui:include>
- </s:fragment>
- <s:div rendered="#{not wiki:isRegularUser(topic.createdBy)}">
- <h:outputText value="#{topic.createdBy.fullname}"/>
- </s:div>
</h:column>
<h:column>
<f:facet name="header">Last Post</f:facet>
- <s:fragment rendered="#{not empty topic.lastComment}">
- <h:outputLink value="#{wiki:renderCommentURL(topic, topic.lastComment)}" tabindex="1">
- <h:outputText value="#{topic.lastComment.createdOn}">
- <f:convertDateTime type="both" timeZone="#{wikiPreferences.timeZone}"/>
+
+ <s:fragment rendered="#{not empty t.lastComment}">
+ <h:outputLink value="#{wiki:renderURL(t.lastComment)}" tabindex="1">
+ <h:outputText value="#{t.lastComment.createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{wikiPreferences.timeZone}"/>
</h:outputText>
<h:graphicImage styleClass="topicGotoIcon" value="/themes/#{wikiPreferences.themeName}/img/icon.posting_goto.gif" width="18" height="9"/>
</h:outputLink>
- <s:fragment rendered="#{wiki:isRegularUser(topic.lastComment.fromUser)}">
- <s:div styleClass="undecoratedLink">
- <h:outputLink value="#"
- onclick="jQuery('#userInfoPopup#{topic.lastComment.id}').jqmShow().css({right: '1%'});">
- <h:outputText value="#{topic.lastComment.fromUser.fullname}"/>
- </h:outputLink>
- </s:div>
- <ui:include src="../forumPosting/userInfoPopup.xhtml">
- <ui:param name="user" value="#{topic.lastComment.fromUser}"/>
- <ui:param name="userInfoPopupId" value="#{topic.lastComment.id}"/>
+ <ui:include src="../../includes/userInfoLink.xhtml">
+ <ui:param name="user" value="#{t.lastComment.createdBy}"/>
</ui:include>
- </s:fragment>
- <s:div rendered="#{not wiki:isRegularUser(topic.lastComment.fromUser)}">
- <h:outputText value="#{topic.lastComment.fromUser.fullname}"/>
- </s:div>
</s:fragment>
- <s:fragment rendered="#{empty topic.lastComment}">
- <h:outputLink value="#{wiki:renderURL(topic)}" tabindex="1">
- <h:outputText value="#{topic.createdOn}">
- <f:convertDateTime type="both" timeZone="#{wikiPreferences.timeZone}"/>
+
+ <s:fragment rendered="#{empty t.lastComment}">
+ <h:outputLink value="#{wiki:renderURL(t.topic)}" tabindex="1">
+ <h:outputText value="#{t.topic.createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{wikiPreferences.timeZone}"/>
</h:outputText>
<h:graphicImage styleClass="topicGotoIcon" value="/themes/#{wikiPreferences.themeName}/img/icon.posting_goto.gif" width="18" height="9"/>
</h:outputLink>
- <s:fragment rendered="#{wiki:isRegularUser(topic.createdBy)}">
- <s:div styleClass="undecoratedLink">
- <h:outputLink value="#"
- onclick="jQuery('#userInfoPopup#{topic.id}').jqmShow().css({right: '1%'});">
- <h:outputText value="#{topic.createdBy.fullname}"/>
- </h:outputLink>
- </s:div>
- <ui:include src="../forumPosting/userInfoPopup.xhtml">
- <ui:param name="user" value="#{topic.createdBy}"/>
- <ui:param name="userInfoPopupId" value="#{topic.id}"/>
+ <ui:include src="../../includes/userInfoLink.xhtml">
+ <ui:param name="user" value="#{t.topic.createdBy}"/>
</ui:include>
- </s:fragment>
- <s:div rendered="#{not wiki:isRegularUser(topic.createdBy)}">
- <h:outputText value="#{topic.createdBy.fullname}"/>
- </s:div>
</s:fragment>
</h:column>
1.3 +0 -9 jboss-seam/examples/wiki/view/plugins/forumTopics/plugin.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: plugin.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/plugins/forumTopics/plugin.xhtml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- plugin.xhtml 20 Nov 2007 08:05:10 -0000 1.2
+++ plugin.xhtml 19 Dec 2007 04:29:30 -0000 1.3
@@ -9,15 +9,6 @@
<s:span id="forumTopicsPluginContainer">
- <script type="text/javascript">jQuery(function() {
- jQuery(".userInfoPopupContainer")
- .jqm({trigger: false, overlay: 0})
- .css({ right: "1%"});
- });</script>
- <script type="text/javascript">jQuery(function() {
- wrapBoxes();
- });</script>
-
<ui:include src="topicControls.xhtml"/>
<ui:include src="topicForm.xhtml"/>
More information about the jboss-cvs-commits
mailing list