[jboss-svn-commits] JBL Code SVN: r11143 - labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Apr 19 20:08:42 EDT 2007


Author: unibrew
Date: 2007-04-19 20:08:42 -0400 (Thu, 19 Apr 2007)
New Revision: 11143

Modified:
   labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_new_preview.xhtml
   labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml
   labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_reply_preview.xhtml
Log:
[JBFORUMS-210] PostingReplyPostView, together with its preview subview, done. Additionally, small fixes to preview subview for PostingNewPostView.

Modified: labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_new_preview.xhtml
===================================================================
--- labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_new_preview.xhtml	2007-04-20 00:01:38 UTC (rev 11142)
+++ labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_new_preview.xhtml	2007-04-20 00:08:42 UTC (rev 11143)
@@ -23,12 +23,13 @@
 -->
 
 <div xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://java.sun.com/jsf/facelets"
-       xmlns:c="http://java.sun.com/jstl/core"
-       xmlns:h="http://java.sun.com/jsf/html"
-       xmlns:f="http://java.sun.com/jsf/core"
-       xmlns:forums="http://www.jboss.com/products/jbossportal/forums"
-       class="PostviewStyle">
+     xmlns:ui="http://java.sun.com/jsf/facelets"
+     xmlns:c="http://java.sun.com/jstl/core"
+     xmlns:h="http://java.sun.com/jsf/html"
+     xmlns:f="http://java.sun.com/jsf/core"
+     xmlns:forums="http://www.jboss.com/products/jbossportal/forums"
+     class="PostviewStyle">
+
 <table border="0" cellpadding="5" cellspacing="0" width="100%" name="table" id="table" >
     <tr>
         <td colspan="2" class="PostViewMainHeader">
@@ -40,25 +41,20 @@
             ${resource.Posted}: ${newTopic.postDate}
             &#160;&#160;&#160; ${resource.Post_subject}: ${newTopic.subject}
         </td>
-    </tr>
-	   <tr>
-	      <td class="row1">
-	         <table width="100%" border="0" cellspacing="0" cellpadding="0">
-	            <tr>
-	               <td>
-	                  <span class="postbody">
-                              #{forums:formatMessage(newTopic.message,false)}
-                          </span>
-	               </td>
-	            </tr>
-	         </table>
-	      </td>
-	   </tr>
-	   <!-- <tr>
-	      <td colspan="2" class="forumthreadfooter">
-	      	<img src="#{forums:themeURL('resourceSpacerURL')}" width="1" height="1" />
-	      </td>
-	   </tr>-->
+    </tr>
+    <tr>
+        <td class="row1">
+            <table width="100%" border="0" cellspacing="0" cellpadding="0">
+                <tr>
+                    <td>
+                        <span class="postbody">
+                            <h:outputText value="#{forums:formatMessage(newTopic.message,false)}" escape="false" />
+                        </span>
+                    </td>
+                </tr>
+            </table>
+        </td>
+    </tr>
 </table>
 <hr />
 </div>

Modified: labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml
===================================================================
--- labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml	2007-04-20 00:01:38 UTC (rev 11142)
+++ labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml	2007-04-20 00:08:42 UTC (rev 11143)
@@ -25,11 +25,11 @@
 <div  xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:c="http://java.sun.com/jstl/core"
-      xmlns:h="http://java.sun.com/jsf/html"      
+      xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:t="http://myfaces.apache.org/tomahawk"
       xmlns:forums="http://www.jboss.com/products/jbossportal/forums"
-      class="bb"
+      class="forumscontainer"
 >
 <ui:composition template="/views/common/common.xhtml">
 <ui:define name="mainContent">
@@ -282,279 +282,395 @@
 <!-- Checking whether bean was initialized. If not, the initialization should execute. -->
 <c:if test="#{replyTopic.initialized}"></c:if>
 
+<c:if test="#{replyTopic.preview}">
+    <ui:include src="/views/topics/posting_reply_preview.xhtml"/>
+    <br clear="all"/>
+</c:if>
+
+<div class="forumtitletext">
+    <h4>${resource.Post_a_reply}</h4>
+</div>
 
-	<c:if test="#{replyTopic.preview}">
-   			<ui:include src="/views/topics/posting_reply_preview.xhtml"/>
-   			<br clear="all"/>
-	</c:if>
+<div class="PostviewStyle">
+<h:form id="post" enctype="multipart/form-data">
+<table border="0" cellpadding="5" cellspacing="0" width="100%" name="table" id="table" >
 
-
-<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
-	<h:form id="post" enctype="multipart/form-data">
-	    <!-- keeps the forum where this topic is being created in context, this is a control parameter -->
-		<input type="hidden" name="f" value="#{replyTopic.forumId}"/>
-		<input type="hidden" name="t" value="#{replyTopic.topicId}"/>	
-		<c:if test="#{param['page'] ne null}">
-        	<input type="hidden" name="page" value="#{param['page']}"/>
-        </c:if>      	
-				
-	    <!-- add Subject -->
-		<tr>
-	   		<td class="row1" width="22%">
-	   			<span class="gen">
-	   				<b>${resource.Subject}</b>	   				
-	   			</span>
-	   		</td>
-	   		<td class="row2" width="78%">
-	   			<span class="gen">					
-					<h:inputText value="#{replyTopic.subject}" size="45" maxlength="200" style="width:450px" tabindex="2" styleClass="post"/>
-				</span>
-	   		</td>
-		</tr>
-		
-		
-		<!-- Add Message -->
-		<tr>
-			<td class="row1" valign="top">
-			   <table width="100%" border="0" cellspacing="0" cellpadding="1">
-			      <tr>
-			         <td><span class="gen"><b>${resource.Message_body}</b></span></td>
-			      </tr>
-			      <tr>
-			         <td valign="middle" align="center"><br/>
-			            <table width="100" border="0" cellspacing="0" cellpadding="5">
-			               <tr align="center">
-			                  <td colspan="" class="gensmall"><b></b></td>
-			               </tr>			               			               
-			            </table>
-			         </td>
-			      </tr>
-			   </table>
-			</td>
-			<td class="row2" valign="top"><span class="gen"> <span class="genmed"> 
-			</span>
-			<table width="450" border="0" cellspacing="0" cellpadding="2">
-	         <tr align="center" valign="middle">
-	            <td><span class="genmed">
-				  <input type="button" class="button" accesskey="b" name="addbbcode0" value=" B "
-	                  style="font-weight:bold; width: 30px" onClick="bbstyle(0)" onMouseOver="helpline('b')"/>
-				  </span></td>
-	            <td><span class="genmed">
-				  <input type="button" class="button" accesskey="i" name="addbbcode2" value=" i "
-	                  style="font-style:italic; width: 30px" onClick="bbstyle(2)" onMouseOver="helpline('i')"/>
-				  </span></td>
-	            <td><span class="genmed">
-				  <input type="button" class="button" accesskey="u" name="addbbcode4" value=" u "
-	                  style="text-decoration: underline; width: 30px" onClick="bbstyle(4)" onMouseOver="helpline('u')"/>
-				  </span></td>
-	            <td><span class="genmed">
-				  <input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px"
-	                  onClick="bbstyle(6)" onMouseOver="helpline('q')"/>
-				  </span></td>
-	            <td><span class="genmed">
-				  <input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px"
-	                  onClick="bbstyle(8)" onMouseOver="helpline('c')"/>
-				  </span></td>
-	            <td><span class="genmed">
-				  <input type="button" class="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px"
-	                  onClick="bbstyle(10)" onMouseOver="helpline('l')"/>
-				  </span></td>
-	            <td><span class="genmed">
-				  <input type="button" class="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px"
-	                  onClick="bbstyle(12)" onMouseOver="helpline('o')"/>
-				  </span></td>
-	            <td><span class="genmed">
-				  <input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px"
-	                  onClick="bbstyle(14)" onMouseOver="helpline('p')"/>
-				  </span></td>
-	            <td><span class="genmed">
-				  <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL"
-	                  style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')"/>
-				  </span></td>
-	         </tr>
-	         <tr>
-	            <td colspan="9">
-	               <table width="100%" border="0" cellspacing="0" cellpadding="0">
-	                  <tr>
-	                     <td><span class="genmed"> &#160;${resource.Font_color}:
-						<select name="addbbcode18"
-	                       onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;"
-	                       onMouseOver="helpline('s')">
-	                  <option style="color:black; background-color: " value=""
-	                          class="genmed">${resource.color_default}</option>
-	                  <option style="color:darkred; background-color: " value="darkred"
-	                          class="genmed">${resource.color_dark_red}</option>
-	                  <option style="color:red; background-color: " value="red"
-	                          class="genmed">${resource.color_red}</option>
-	                  <option style="color:orange; background-color: " value="orange"
-	                          class="genmed">${resource.color_orange}</option>
-	                  <option style="color:brown; background-color: " value="brown"
-	                          class="genmed">${resource.color_brown}</option>
-	                  <option style="color:yellow; background-color: " value="yellow"
-	                          class="genmed">${resource.color_yellow}</option>
-	                  <option style="color:green; background-color: " value="green"
-	                          class="genmed">${resource.color_green}</option>
-	                  <option style="color:olive; background-color: " value="olive"
-	                          class="genmed">${resource.color_olive}</option>
-	                  <option style="color:cyan; background-color: " value="cyan"
-	                          class="genmed">${resource.color_cyan}</option>
-	                  <option style="color:blue; background-color: " value="blue"
-	                          class="genmed">${resource.color_blue}</option>
-	                  <option style="color:darkblue; background-color: " value="darkblue"
-	                          class="genmed">${resource.color_dark_blue}</option>
-	                  <option style="color:indigo; background-color: " value="indigo"
-	                          class="genmed">${resource.color_indigo}</option>
-	                  <option style="color:violet; background-color: " value="violet"
-	                          class="genmed">${resource.color_violet}</option>
-	                  <option style="color:white; background-color: " value="white"
-	                          class="genmed">${resource.color_white}</option>
-	                  <option style="color:black; background-color: " value="black"
-	                          class="genmed">${resource.color_black}</option>
-	                  </select> &#160;${resource.Font_size}:<select name="addbbcode20"
-	                                                              onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')"
-	                                                              onMouseOver="helpline('f')">
-	                        <option value="7" class="genmed">${resource.font_tiny}</option>
-	                        <option value="9" class="genmed">${resource.font_small}</option>
-	                        <option value="12" class="genmed" selected="true">${resource.font_normal}</option>
-	                        <option value="18" class="genmed">${resource.font_large}</option>
-	                        <option value="24" class="genmed">${resource.font_huge}</option>
-	                     </select>
-						</span></td>
-	                     <td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)"
-	                                                                                 class="genmed"
-	                                                                                 onMouseOver="helpline('a')">${resource.Close_Tags}</a></span>
-	                     </td>
-	                  </tr>
-	               </table>
-	            </td>
-	         </tr>
-	         <tr>
-	            <td colspan="9"><span class="gensmall">
-				  <input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px"
-	                  class="helpline" value="${resource.Styles_tip}"/>
-				  </span></td>
-	         </tr>
-	         <tr>
-	            <td colspan="9">
-	              <span class="gen">
-					  <h:inputTextarea id="message" value="#{replyTopic.message}" rows="15" cols="35" 
-					  style="width:450px" 
-					  tabindex="3" styleClass="post"
-		              onselect="storeCaret(this);" onkeyup="storeCaret(this);" onclick="storeCaret(this);">			              	
-		              </h:inputTextarea>	              
-				  </span>
-				</td>
-	         </tr>
-	      </table>
-		  </span>
-		 </td>
-	   </tr>
-	
-	
-		<forums:isAllowed fragment="acl://managePostAttachments">	
-		<!-- attachment ui -->				
-		<tr>
-   			<th class="thHead" colspan="2">${resource.Add_attachment_title}</th>
-		</tr>
-		
-		<tr>
-		   <td class="row1" colspan="2">
-		   	<span class="gensmall">
-		   		${resource.Add_attachment_explain}<br/>
-		   	</span>
-		   </td>
-		</tr>
-		
-		
-		<!-- upload button -->
-		<tr>
-		   <td class="row1"><span class="gen"><b>${resource.File_name}</b></span></td>
-		   <td class="row2">
-		   	<span class="genmed">   		
-		   		<t:inputFileUpload value="#{replyTopic.attachment}" size="40" styleClass="post"/>
-		   	</span>
-		   </td>
-		</tr>
-		
-		
-		<!-- comment -->
-		<tr>
-		   <td class="row1"><span class="gen"><b>${resource.File_comment}</b></span></td>
-		   <td class="row2">
-		   	<span class="genmed">   		
-		   		<h:inputTextarea value="#{replyTopic.attachmentComment}" rows="3" cols="35" styleClass="post"/>
-		   	</span>
-		    <span class="gen">    	
-		    	<h:commandButton action="#{replyTopic.addAttachment}" value="${resource.Add_attachment}" styleClass="liteoption"/>
-		    </span>
-		   </td>
-		</tr>
-		
-		<c:if test="#{replyTopic.numberOfAttachments>0}">
-
-		<tr>
-		   <th class="thHead" colspan="2">${resource.Posted_attachments}</th>
-		</tr>
-		
-		<!-- uploaded list of attachments -->
-		<input type="hidden" name="ATTACHMENT"/>
-		<c:forEach items="#{replyTopic.attachments}" var="attachRow" varStatus="idx">
-		   <tr>
-		      <td class="row1"><span class="gen"><b>${resource.File_name}</b></span></td>
-		      <td class="row2"><span class="gen">${attachRow.fileName}</span></td>
-		   </tr>
-		   <tr>
-		      <td class="row1"><span class="gen"><b>${resource.File_comment}</b></span></td>
-		      <td class="row2">
-			      <span class="genmed">	      	
-			      	<h:inputTextarea id="attachment_${idx.index}" value="#{attachRow.comment}" rows="3" cols="35" styleClass="post"/>   			
-			      </span>
-		      </td>
-		   </tr>
-		   <tr>
-		      <td class="row1"><span class="gen"><b>${resource.Options}</b></span></td>
-		      <td class="row2"><span class="genmed">			 	   	
-					&#160; 			
-					<h:commandButton action="#{replyTopic.updateAttachment}" value="${resource.Update_comment}" styleClass="liteoption"
-					onclick="selectAttachment('${idx.index}');"/>	
-					&#160; 			
-					<h:commandButton action="#{replyTopic.deleteAttachment}" value="${resource.Delete_attachment}" styleClass="liteoption" 
-					onclick="selectAttachment('${idx.index}');"/>            		
-		       </span>
-		      </td>
-		   </tr>   
-		</c:forEach>		
-		</c:if>	   	
-		</forums:isAllowed>
-	
-	
-	  <!-- hookup the buttons -->	
-	  <tr>
-	   <td class="catBottom" colspan="2" align="center" height="28"> 	   	  
-	      <h:commandButton action="#{replyTopic.preview}" value="${resource.Preview}" 
-	      onclick="return checkForm(this.parentNode)" 
-	      styleClass="mainoption"
-	      tabindex="5"/>
-	      &#160;
-	      <!--TODO: Missing execution of javascript checking form - onclick="return checkForm(this.parentNode)" -->
-	      <h:commandButton action="#{replyTopic.execute}" value="${resource.Submit}" 	      
-	      styleClass="mainoption"
-	      accesskey="s" tabindex="6"/>	      	
-	      &#160;
-	      <h:commandButton action="#{replyTopic.cancel}" value="${resource.Cancel}" accesskey="c" tabindex="7" styleClass="mainoption"/>	      
-	   </td>
-	</tr>
-	
-	<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
-	   <tr>
-	      <td align="right" valign="top"><span class="gensmall"></span></td>
-	   </tr>
-	</table>
-	
-</h:form>
-</table>
-
-</ui:define>
-</ui:composition>
-
-</div>
\ No newline at end of file
+    <!-- keeps the forum where this topic is being created in context, this is a control parameter -->
+    <input type="hidden" name="f" value="#{replyTopic.forumId}"/>
+    <input type="hidden" name="t" value="#{replyTopic.topicId}"/>
+    <c:if test="#{param['page'] ne null}">
+        <input type="hidden" name="page" value="#{param['page']}"/>
+    </c:if>
+    
+    <tr>
+        <td colspan="2" class="PostViewMainHeader">${resource.Compose_Message}</td>
+    </tr>
+    <tr class="PostViewMainDescription">
+        <td colspan="2">${resource.Posting_Description}</td>
+    </tr>
+    
+    <!-- add Subject -->
+    <tr class="PostViewUnderlineBoth">
+        <td>
+            <label class="forumformlabelbold">
+                ${resource.Subject}
+            </label>
+        </td>
+        <td>
+            <h:inputText value="#{replyTopic.subject}" maxlength="200" 
+                         size="45" style="width: 450px;" tabindex="2"/>
+        </td>
+    </tr>
+    
+    <!-- Add Message -->
+    <tr>
+        <td valign="top">
+            <table border="0" cellpadding="1" cellspacing="0" width="100%">
+                <tbody>
+                    <tr>
+                        <td>
+                            <label class="forumformlabelbold">
+                                {resource.Message_body}
+                            </label>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td align="center" valign="middle">
+                            <br />
+                            <table border="0" cellpadding="5" cellspacing="0" width="100">
+                                <tbody>
+                                    <tr align="center">
+                                        <td>
+                                            <b></b>
+                                        </td>
+                                    </tr>
+                                </tbody>
+                            </table>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </td>
+        <td valign="top">
+            <table width="100%" border="0" cellpadding="3" cellspacing="1" class="forumline">
+            <tbody>
+                <tr>
+                    <td class="row2" valign="top">
+                        <span class="genmed"></span>
+                        <table border="0" cellpadding="2" cellspacing="0" width="450">
+                        <tbody>
+                            <tr align="center" valign="middle">
+                                <td>
+                                    <span class="genmed">
+                                        <input type="button" class="button buttonMed" accesskey="b"
+                                               name="addbbcode0" value=" B " style="font-weight:bold; width: 30px"
+                                               onClick="bbstyle(0)" onMouseOver="helpline('b')"/>
+                                    </span>
+                                </td>
+                                <td>
+                                    <span class="genmed">
+                                        <input type="button" class="button buttonMed" accesskey="i"
+                                               name="addbbcode2" value=" i " style="font-style:italic; width: 30px"
+                                               onClick="bbstyle(2)" onMouseOver="helpline('i')"/>
+                                    </span>
+                                </td>
+                                <td>
+                                    <span class="genmed">
+                                        <input type="button" class="button buttonMed" accesskey="u"
+                                               name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px"
+                                               onClick="bbstyle(4)" onMouseOver="helpline('u')"/>
+                                    </span>
+                                </td>
+                                <td>
+                                    <span class="genmed">
+                                        <input type="button" class="button buttonMed" accesskey="q"
+                                               name="addbbcode6" value="Quote" style="width: 50px"
+                                               onClick="bbstyle(6)" onMouseOver="helpline('q')"/>
+                                    </span>
+                                </td>
+                                <td>
+                                    <span class="genmed">
+                                        <input type="button" class="button buttonMed" accesskey="c"
+                                               name="addbbcode8" value="Code" style="width: 40px"
+                                               onClick="bbstyle(8)" onMouseOver="helpline('c')"/>
+                                    </span>
+                                </td>
+                                <td>
+                                    <span class="genmed">
+                                        <input type="button" class="button buttonMed" accesskey="l"
+                                               name="addbbcode10" value="List" style="width: 40px"
+                                               onClick="bbstyle(10)" onMouseOver="helpline('l')"/>
+                                    </span>
+                                </td>
+                                <td>
+                                    <span class="genmed">
+                                        <input type="button" class="button buttonMed" accesskey="o"
+                                               name="addbbcode12" value="List=" style="width: 40px"
+                                               onClick="bbstyle(12)" onMouseOver="helpline('o')"/>
+                                    </span>
+                                </td>
+                                <td>
+                                    <span class="genmed">
+                                        <input type="button" class="button buttonMed" accesskey="p"
+                                               name="addbbcode14" value="Img" style="width: 40px"
+                                               onClick="bbstyle(14)" onMouseOver="helpline('p')"/>
+                                    </span>
+                                </td>
+                                <td>
+                                    <span class="genmed">
+                                        <input type="button" class="button buttonMed" accesskey="w"
+                                               name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px"
+                                               onClick="bbstyle(16)" onMouseOver="helpline('w')"/>
+                                    </span>
+                                </td>
+                            </tr>
+                            <tr>
+                                <td colspan="9">
+                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+                                    <tbody>
+                                        <tr>
+                                            <td>
+                                                <span class="genmed">
+                                                    &#160;${resource.Font_color}:
+                                                    <select name="addbbcode18"
+                                                            onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;"
+                                                            onMouseOver="helpline('s')">
+                                                        <option style="color:black; background-color: "
+                                                                value="" class="genmed">
+                                                            ${resource.color_default}
+                                                        </option>
+                                                        <option style="color:darkred; background-color: "
+                                                                value="darkred" class="genmed">
+                                                            ${resource.color_dark_red}
+                                                        </option>
+                                                        <option style="color:red; background-color: "
+                                                                value="red" class="genmed">
+                                                            ${resource.color_red}
+                                                        </option>
+                                                        <option style="color:orange; background-color: "
+                                                                value="orange" class="genmed">
+                                                            ${resource.color_orange}
+                                                        </option>
+                                                        <option style="color:brown; background-color: "
+                                                                value="brown" class="genmed">
+                                                            ${resource.color_brown}
+                                                        </option>
+                                                        <option style="color:yellow; background-color: "
+                                                                value="yellow" class="genmed">
+                                                            ${resource.color_yellow}
+                                                        </option>
+                                                        <option style="color:green; background-color: "
+                                                                value="green" class="genmed">
+                                                            ${resource.color_green}
+                                                        </option>
+                                                        <option style="color:olive; background-color: "
+                                                                value="olive" class="genmed">
+                                                            ${resource.color_olive}
+                                                        </option>
+                                                        <option style="color:cyan; background-color: "
+                                                                value="cyan" class="genmed">
+                                                            ${resource.color_cyan}
+                                                        </option>
+                                                        <option style="color:blue; background-color: "
+                                                                value="blue" class="genmed">
+                                                            ${resource.color_blue}
+                                                        </option>
+                                                        <option style="color:darkblue; background-color: "
+                                                                value="darkblue" class="genmed">
+                                                            ${resource.color_dark_blue}
+                                                        </option>
+                                                        <option style="color:indigo; background-color: "
+                                                                value="indigo" class="genmed">
+                                                            ${resource.color_indigo}
+                                                        </option>
+                                                        <option style="color:violet; background-color: "
+                                                                value="violet" class="genmed">
+                                                            ${resource.color_violet}
+                                                        </option>
+                                                        <option style="color:white; background-color: "
+                                                                value="white" class="genmed">
+                                                            ${resource.color_white}
+                                                        </option>
+                                                        <option style="color:black; background-color: "
+                                                                value="black" class="genmed">
+                                                            ${resource.color_black}
+                                                        </option>
+                                                    </select>
+                                                    &#160;${resource.Font_size}:
+                                                    <select name="addbbcode20"
+                                                            onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')"
+                                                            onMouseOver="helpline('f')">
+                                                        <option value="7" class="genmed">
+                                                            ${resource.font_tiny}
+                                                        </option>
+                                                        <option value="9" class="genmed">
+                                                            ${resource.font_small}
+                                                        </option>
+                                                        <option value="12" class="genmed" selected="true">
+                                                            ${resource.font_normal}
+                                                        </option>
+                                                        <option value="18" class="genmed">
+                                                            ${resource.font_large}
+                                                        </option>
+                                                        <option value="24" class="genmed">
+                                                            ${resource.font_huge}
+                                                        </option>
+                                                    </select>
+                                                </span>
+                                            </td>
+                                            <td nowrap="nowrap" align="right">
+                                                <span class="gensmall">
+                                                    <a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">
+                                                        ${resource.Close_Tags}
+                                                    </a>
+                                                </span>
+                                            </td>
+                                        </tr>
+                                    </tbody>
+                                    </table>
+                                </td>
+                            </tr>
+                            <tr>
+                                <td colspan="9">
+                                    <span class="gensmall">
+                                        <input type="text" name="helpbox" size="45" maxlength="100"
+                                               style="width:450px; font-size:10px"
+                                               class="helpline" value="${resource.Styles_tip}"/>
+                                    </span>
+                                </td>
+                            </tr>
+                            <tr>
+                                <td colspan="9">
+                                    <h:inputTextarea id="message" value="#{replyTopic.message}"
+                                                     rows="15" cols="35"
+                                                     style="width:450px"
+                                                     tabindex="3" styleClass="post"
+                                                     onselect="storeCaret(this);"
+                                                     onkeyup="storeCaret(this);"
+                                                     onclick="storeCaret(this)">
+                                    </h:inputTextarea>
+                                </td>
+                            </tr>
+                        </tbody>
+                        </table>
+                    </td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+    </tr>
+    
+    <!-- attachment ui -->
+    <forums:isAllowed fragment="acl://managePostAttachments">
+    <tr>
+        <td colspan="2" class="PostViewMainHeader">
+            ${resource.Add_attachment_title}
+        </td>
+    </tr>
+    <tr class="PostViewMainDescription">
+        <td colspan="2">
+            ${resource.Add_attachment_explain}
+        </td>
+    </tr>
+    
+    <!-- upload button -->
+    <tr class="PostViewUnderline">
+        <td>
+            <label class="forumformlabelbold">
+                ${resource.File_name}
+            </label>
+        </td>
+        <td>
+            <t:inputFileUpload value="#{replyTopic.attachment}" size="40" styleClass="post"/>
+        </td>
+    </tr>
+    
+    <!-- comment -->
+    <tr valign="top" class="PostViewUnderline">
+        <td>
+            <label class="forumformlabelbold">
+                ${resource.File_comment}
+            </label>
+        </td>
+        <td>
+            <h:inputTextarea value="#{replyTopic.attachmentComment}" rows="3" styleClass="width: 450px;"/>
+        </td>
+    </tr>
+    <tr class="PostViewUnderline">
+        <td></td>
+        <td>
+            <h:commandButton action="#{replyTopic.addAttachment}" value="${resource.Add_attachment}" styleClass="buttonMed"/>
+        </td>
+    </tr>
+    
+    <c:if test="#{replyTopic.numberOfAttachments>0}">
+    <tr>
+        <th class="thHead" colspan="2">${resource.Posted_attachments}</th>
+    </tr>
+    
+    <!-- uploaded list of attachments -->
+    <input type="hidden" name="ATTACHMENT"/>
+    <c:forEach items="#{replyTopic.attachments}" var="attachRow" varStatus="idx">
+    <tr class="PostViewUnderline">
+        <td>
+            <label class="forumformlabelbold">
+                ${resource.File_name}
+            </label>
+        </td>
+        <td>
+            ${attachRow.fileName}
+        </td>
+    </tr>
+    <tr valign="top" class="PostViewUnderline">
+        <td>
+            <label class="forumformlabelbold">
+                ${resource.File_comment}
+            </label>
+        </td>
+        <td>
+            <h:inputTextarea id="attachment_${idx.index}" value="#{attachRow.comment}" rows="3" cols="35" styleClass="post"/>
+        </td>
+    </tr>
+    <tr class="PostViewUnderline">
+        <td></td>
+        <td>
+            <h:commandButton action="#{replyTopic.updateAttachment}" value="${resource.Update_comment}"
+                         styleClass="buttonMed" onclick="selectAttachment('${idx.index}');"/>
+            &#160;
+            <h:commandButton action="#{replyTopic.deleteAttachment}" value="${resource.Delete_attachment}"
+                             styleClass="buttonMed" onclick="selectAttachment('${idx.index}');"/>
+        </td>
+    </tr>
+    </c:forEach>
+    </c:if>
+    </forums:isAllowed>
+</table>
+
+<!-- hookup the buttons -->
+<div class="forumformbuttonrow">
+    <ul>
+        <li>
+            <h:commandButton action="#{replyTopic.preview}" value="${resource.Preview}"
+                             onclick="return checkForm(this.parentNode)"
+                             styleClass="buttonMed"
+                             tabindex="5"/>
+        </li>
+        <li>
+            <!--TODO: Missing execution of javascript checking form - onclick="return checkForm(this.parentNode)" -->
+            <h:commandButton action="#{replyTopic.execute}" value="${resource.Submit}"
+                             styleClass="buttonMed"
+                             accesskey="s" tabindex="6"/>
+        </li>
+        <li>
+            <h:commandButton action="#{replyTopic.cancel}" value="${resource.Cancel}"
+                             accesskey="c" tabindex="7" styleClass="buttonMed"/>
+        </li>
+    </ul>
+</div>
+</h:form>
+</div>
+
+</ui:define>
+</ui:composition>
+
+</div>

Modified: labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_reply_preview.xhtml
===================================================================
--- labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_reply_preview.xhtml	2007-04-20 00:01:38 UTC (rev 11142)
+++ labs/jbossforums/branches/forums101P22/forums/src/resources/portal-forums-war/views/topics/posting_reply_preview.xhtml	2007-04-20 00:08:42 UTC (rev 11143)
@@ -20,44 +20,41 @@
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
--->
-
-<table xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://java.sun.com/jsf/facelets"
-       xmlns:c="http://java.sun.com/jstl/core"
-       xmlns:h="http://java.sun.com/jsf/html"      
-       xmlns:f="http://java.sun.com/jsf/core"
-       xmlns:forums="http://www.jboss.com/products/jbossportal/forums"
-       class="forumline"
-       width="100%" cellspacing="1" cellpadding="4" border="0"
->	  
-	   <tr>
-	      <th height="25" class="thHead">${resource.Preview}</th>
-	   </tr>
-	   <tr>
-	      <td class="row1">
-	      	<img src="#{forums:contextPath()}/subSilver/images/icon_minipost.gif" alt="${resource.Post}"/>
-	      	<span class="postdetails">${resource.Posted}: ${replyTopic.postDate} 
-	      		&#160;&#160;&#160; ${resource.Post_subject}: ${replyTopic.subject}
-	      	</span>
-	      </td>
-	   </tr>
-	   <tr>
-	      <td class="row1">
-	         <table width="100%" border="0" cellspacing="0" cellpadding="0">
-	            <tr>
-	               <td>
-	                  <span class="postbody">
-                              #{forums:formatMessage(replyTopic.message,false)}
-                          </span>
-	               </td>
-	            </tr>
-	         </table>
-	      </td>
-	   </tr>
-	   <tr>
-	      <td class="spaceRow" height="1">
-	      	<img src="#{forums:contextPath()}/subSilver/images/spacer.gif" width="1" height="1"/>
-	      </td>
-	   </tr>
-</table>
+-->
+
+<div xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:ui="http://java.sun.com/jsf/facelets"
+     xmlns:c="http://java.sun.com/jstl/core"
+     xmlns:h="http://java.sun.com/jsf/html"
+     xmlns:f="http://java.sun.com/jsf/core"
+     xmlns:forums="http://www.jboss.com/products/jbossportal/forums"
+     class="PostviewStyle">
+
+<table border="0" cellpadding="5" cellspacing="0" width="100%" name="table" id="table" >
+    <tr>
+        <td colspan="2" class="PostViewMainHeader">
+            ${resource.Preview}
+        </td>
+    </tr>
+    <tr class="PostViewMainDescription">
+        <td colspan="2">
+            ${resource.Posted}: ${replyTopic.postDate}
+            &#160;&#160;&#160; ${resource.Post_subject}: ${replyTopic.subject}
+        </td>
+    </tr>
+    <tr>
+        <td class="row1">
+            <table width="100%" border="0" cellspacing="0" cellpadding="0">
+                <tr>
+                    <td>
+                        <span class="postbody">
+                            <h:outputText value="#{forums:formatMessage(replyTopic.message,false)}" escape="false" />
+                        </span>
+                    </td>
+                </tr>
+            </table>
+        </td>
+    </tr>
+</table>
+<hr />
+</div>




More information about the jboss-svn-commits mailing list