[jboss-svn-commits] JBL Code SVN: r11410 - in labs/jbossforums/branches/forums101P26/forums/src: resources/portal-forums-war/views/topics and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Apr 27 08:40:32 EDT 2007


Author: unibrew
Date: 2007-04-27 08:40:32 -0400 (Fri, 27 Apr 2007)
New Revision: 11410

Modified:
   labs/jbossforums/branches/forums101P26/forums/src/main/org/jboss/portlet/forums/ui/action/EditPost.java
   labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml
   labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_edit_preview.xhtml
   labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml
   labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml
Log:
[JBLAB-209] EditPostingView finished.

Modified: labs/jbossforums/branches/forums101P26/forums/src/main/org/jboss/portlet/forums/ui/action/EditPost.java
===================================================================
--- labs/jbossforums/branches/forums101P26/forums/src/main/org/jboss/portlet/forums/ui/action/EditPost.java	2007-04-27 12:00:25 UTC (rev 11409)
+++ labs/jbossforums/branches/forums101P26/forums/src/main/org/jboss/portlet/forums/ui/action/EditPost.java	2007-04-27 12:40:32 UTC (rev 11410)
@@ -48,6 +48,14 @@
  */
 public class EditPost extends PostAction
 {
+    
+    private boolean isFirstPost = false;
+    
+    public boolean isFirstPost ()
+    {
+        return isFirstPost;
+    }
+    
     //constructor------------------------------------------------------------------------------------------------------------------
     /**
      * 
@@ -103,6 +111,12 @@
 	            
 	            //setup the attachment related information
 	            this.setupAttachments(post.getAttachments());
+                    
+                    isFirstPost = false;
+                    if(topic.getFirstPost().getId().intValue()==post.getId().intValue())
+                    {
+                        isFirstPost = true;
+                    }
 	        }
 	        
 	        navState = Constants.START_EDIT_POST;
@@ -160,13 +174,6 @@
                throw new Exception(JSFUtil.getBundleMessage(Constants.BUNDLE_NAME,Constants.TOPIC_LOCKED_ERR_KEY));
             }
 	        
-	        
-	        boolean isFirstPost = false;
-	        if(topic.getFirstPost().getId().intValue()==post.getId().intValue())
-	        {
-	            isFirstPost = true;
-	        }
-	        
 	        //setup the message/subject related data
 	        Message message = PortalUtil.createMessage();
 	        message.setText(this.message);

Modified: labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml
===================================================================
--- labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml	2007-04-27 12:00:25 UTC (rev 11409)
+++ labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml	2007-04-27 12:40:32 UTC (rev 11410)
@@ -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">
@@ -278,376 +278,504 @@
 
 //--&gt;
 </script>
-
-	<c:if test="#{editPost.preview}">
-   			<ui:include src="/views/topics/posting_edit_preview.xhtml"/>
-   			<br clear="all"/>
-	</c:if>
-
-
-<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="p" value="#{editPost.postId}"/>	      	
-		<input type="hidden" name="t" value="#{editPost.topicId}"/>	      	
-				
-	    <!-- 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="#{editPost.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="#{editPost.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>
-	
-	<!-- Add Options -->
-	<tr>
-	   <td class="row1" valign="top">
-	   	<span class="gen">
-	   		<b>${resource.Options}</b>
-	   	</span>
-	   </td>
-	   <td class="row2"><span class="gen"> </span>
-	      <table cellspacing="0" cellpadding="1" border="0">		         		         		         		         		         		         	         
-	            <tr>
-	               <td></td>
-	               <td>
-	               <span class="gen">
-	         	    	<span class="gen">${resource.Post_topic_as}:
-	         	    	    <h:selectOneRadio value="#{editPost.topicType}" styleClass="gen">
-			            		<f:selectItem itemValue="0" itemLabel="Normal">
-			            			<f:verbatim>&#160;&#160;&#160;</f:verbatim>
-			            		</f:selectItem>			            		
-			            		<f:selectItem itemValue="1" itemLabel="Sticky">
-			            			<f:verbatim>&#160;&#160;&#160;</f:verbatim>
-			            		</f:selectItem>			            		
-			            		<f:selectItem itemValue="2" itemLabel="Announcement">
-			            			<f:verbatim>&#160;&#160;&#160;</f:verbatim>
-			            		</f:selectItem>			            		
-		            		</h:selectOneRadio>
-		            	</span>
-		            </span>
-	         	   </td>
-	            </tr>	         
-	      </table>
-	   </td>
-	</tr>
-
-		<forums:isAllowed fragment="acl://managePoll">	
-		<c:if test="#{editPost.pollPresent}">
-		<!-- poll ui -->			
-        <!-- title -->    
-        <tr>		    
-   			<th class="thHead" colspan="2">${resource.Add_poll}</th>
-		</tr>		
-		
-		<!-- setup poll question -->
-		<tr>
-		   <td class="row1"><span class="gen"><b>${resource.Poll_question}</b></span></td>
-		   <td class="row2">
-		   		<span class="genmed">   			
-		   			<h:inputText value="#{editPost.question}" size="50" maxlength="255" styleClass="post"/>
-		   		</span>
-		   </td>
-		</tr>		
-		
-		<!-- update poll options already added -->
-		<input type="hidden" name="o"/>
-		<c:forEach items="#{editPost.options}" var="optionRow" varStatus="idx">
-		   <tr>
-		      <td class="row1"><span class="gen"><b>${resource.Poll_option}</b></span></td>
-		      <td class="row2">
-		      		<span class="genmed">
-			            <input type="text" id="option_${idx.index}" name="option_${idx.index}" value="${optionRow}" size="50" class="post" maxlength="255"/>
-		            </span>&#160;            
-		            <h:commandButton action="#{editPost.updateOption}" value="${resource.Update}" styleClass="liteoption"
-                            onclick="selectOption(${idx.index});"/>
-		            <h:commandButton action="#{editPost.deleteOption}" value="${resource.Delete}" styleClass="liteoption"
-		            onclick="selectOption(${idx.index});"/>            
-		      </td>
-		   </tr>
-		</c:forEach>
-		
-		
-		<!-- add poll options -->
-		<tr>
-		   <td class="row1"><span class="gen"><b>${resource.Poll_option}</b></span></td>
-		   <td class="row2">
-		   	<span class="genmed">   		
-		   		<h:inputText value="#{editPost.option}" size="50" maxlength="255" styleClass="post"/>
-		   	</span> &#160;   	
-		   	<h:commandButton action="#{editPost.addOption}" value="${resource.Add_option}" styleClass="liteoption"/>
-		   </td>
-		</tr>
-		
-		
-		<!-- setup poll duration -->
-		<tr>
-		   <td class="row1">
-		   	<span class="gen"><b>${resource.Poll_for}</b></span>
-		   </td>
-		   <td class="row2">
-		   	<span class="genmed">   		
-		   		<h:inputText value="#{editPost.activeDuration}" size="3" maxlength="3" styleClass="post"/>
-		   	</span>&#160;
-		    <span class="gen"><b>${resource.Days}</b></span> &#160; <span class="gensmall">${resource.Poll_for_explain}</span>
-		   </td>
-		</tr>		
-					
-		<!-- enable/disable delete option -->		
-		<tr>
-			<td colspan="2" align="center">
-				<input type="button" value="${resource.Delete_poll}" 
-				onclick="javascript:document.location='#{forums:outputLink('/views/topics/delete_poll.jsf',true)}';"/>
-			</td>		    
-		</tr>
-	  </c:if>
-	  </forums:isAllowed>								
-
-		<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="#{editPost.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="#{editPost.attachmentComment}" rows="3" cols="35" styleClass="post"/>
-		   	</span>
-		    <span class="gen">    	
-		    	<h:commandButton action="#{editPost.addAttachment}" value="${resource.Add_attachment}" styleClass="liteoption"/>
-		    </span>
-		   </td>
-		</tr>
-		
-		<c:if test="#{editPost.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="#{editPost.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="#{editPost.updateAttachment}" value="${resource.Update_comment}" styleClass="liteoption"	
-						onclick="selectAttachment('${idx.index}');"/> &#160; 			
-						<h:commandButton action="#{editPost.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="#{editPost.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="#{editPost.execute}" value="${resource.Submit}" 	      
-	      styleClass="mainoption"
-	      accesskey="s" tabindex="6"/>	      	
-	      &#160;
-	      <h:commandButton action="#{editPost.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>
-
+
+<c:if test="#{editPost.preview}">
+    <ui:include src="/views/topics/posting_edit_preview.xhtml"/>
+    <br clear="all"/>
+</c:if>
+
+<div class="forumtitletext">
+    <h4>${resource.Edit_Post}</h4>
+</div>
+
+<div class="PostviewStyle">
+<h:form id="post" enctype="multipart/form-data">
+<table border="0" cellpadding="5" cellspacing="0" width="100%" name="table" id="table" >
+
+    <!-- keeps the topic where this post is being edited in context, this is a control parameter -->
+    <input type="hidden" name="t" value="#{editPost.topicId}"/>
+    <input type="hidden" name="p" value="#{editPost.postId}"/>
+    
+    <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="#{editPost.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="#{editPost.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>
+
+    <!-- Add Options -->
+    <c:if test="#{editPost.firstPost}">
+    <tr class="PostViewUnderlineBoth">
+        <td valign="top">
+            <label class="forumformlabelbold">
+                ${resource.Options}
+            </label>
+        </td>
+        <td>
+            ${resource.Post_topic_as}:
+            <h:selectOneRadio value="#{editPost.topicType}" styleClass="gen">
+                <f:selectItem itemValue="0" itemLabel="Normal">
+                    <f:verbatim>&#160;&#160;&#160;</f:verbatim>
+                </f:selectItem>
+                <f:selectItem itemValue="1" itemLabel="Sticky">
+                    <f:verbatim>&#160;&#160;&#160;</f:verbatim>
+                </f:selectItem>
+                <f:selectItem itemValue="2" itemLabel="Announcement">
+                    <f:verbatim>&#160;&#160;&#160;</f:verbatim>
+                </f:selectItem>
+            </h:selectOneRadio>
+        </td>
+    </tr>
+    </c:if>
+    
+    <!-- poll ui -->
+    <forums:isAllowed fragment="acl://managePoll">
+    <c:if test="#{editPost.firstPost}">
+    
+	<tr class="PostViewMainHeader">
+        <td colspan="2">
+            ${resource.Add_poll}
+        </td>
+    </tr>
+    <tr class="PostViewMainDescription">
+        <td colspan="2">
+            ${resource.Add_poll_explain}
+        </td>
+    </tr>
+    
+    <!-- setup poll question -->
+    <tr>
+        <td class="PostViewUnderline">
+            <label class="forumformlabelbold">
+                ${resource.Poll_question}
+            </label>
+        </td>
+        <td>
+            <h:inputText value="#{editPost.question}" maxlength="255" styleClass="width: 450px;"/>
+        </td>
+    </tr>
+    
+    <!-- update poll options already added -->
+    <input type="hidden" name="o"/>
+    <c:forEach items="${editPost.options}" var="optionRow" varStatus="idx">
+    <tr class="PostViewUnderline">
+        <td>
+            <label class="forumformlabelbold">
+                ${resource.Poll_option}
+            </label>
+        </td>
+        <td>
+            <input type="text" id="option_${idx.index+1}" name="option_${idx.index+1}"
+                   value="${optionRow}" style="width: 450px;" maxlength="255"/>
+            &#160;
+            <h:commandButton action="#{editPost.updateOption}" value="${resource.Update}"
+                             styleClass="buttonMed" onclick="selectOption(${idx.index+1});"/>
+            <h:commandButton action="#{editPost.deleteOption}" value="${resource.Delete}"
+                             styleClass="buttonMed" onclick="selectOption(${idx.index+1});"/>
+        </td>
+    </tr>
+    </c:forEach>
+    
+    <!-- add poll options -->
+    <tr class="PostViewUnderline">
+        <td>
+            <label class="forumformlabelbold">
+                ${resource.Poll_option}
+            </label>
+        </td>
+        <td>  		
+            <h:inputText value="#{editPost.option}" maxlength="255" styleClass="width: 450px;"/>
+            &#160;   	
+            <h:commandButton action="#{editPost.addOption}"
+                             value="${resource.Add_option}"
+                             styleClass="buttonMed"/>
+        </td>
+    </tr>
+		
+		
+    <!-- setup poll duration -->
+    <tr class="PostViewUnderline">
+        <td>
+            <label class="forumformlabelbold">
+                ${resource.Poll_for}
+            </label>
+        </td>
+        <td>
+            <h:inputText value="#{editPost.activeDuration}" size="3" maxlength="3"/>
+            &#160;
+            <strong>
+                ${resource.Days}
+            </strong>
+            &#160;
+            ${resource.Poll_for_explain}
+        </td>
+    </tr>
+    
+    </c:if>
+    </forums:isAllowed>
+    
+    <!-- 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="#{editPost.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="#{editPost.attachmentComment}" rows="3" styleClass="width: 450px;"/>
+        </td>
+    </tr>
+    <tr class="PostViewUnderline">
+        <td></td>
+        <td>
+            <h:commandButton action="#{editPost.addAttachment}" value="${resource.Add_attachment}" styleClass="buttonMed"/>
+        </td>
+    </tr>
+    
+    <c:if test="#{editPost.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="#{editPost.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="#{editPost.updateAttachment}" value="${resource.Update_comment}"
+                         styleClass="buttonMed" onclick="selectAttachment('${idx.index}');"/>
+            &#160;
+            <h:commandButton action="#{editPost.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="#{editPost.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="#{editPost.execute}" value="${resource.Submit}"
+                             styleClass="buttonMed"
+                             accesskey="s" tabindex="6"/>
+        </li>
+        <li>
+            <h:commandButton action="#{editPost.cancel}" value="${resource.Cancel}"
+                             accesskey="c" tabindex="7" styleClass="buttonMed"/>
+        </li>
+    </ul>
+</div>
+</h:form>
+</div>
+
+</ui:define>
+</ui:composition>
+
 </div>
\ No newline at end of file

Modified: labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_edit_preview.xhtml
===================================================================
--- labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_edit_preview.xhtml	2007-04-27 12:00:25 UTC (rev 11409)
+++ labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_edit_preview.xhtml	2007-04-27 12:40:32 UTC (rev 11410)
@@ -21,43 +21,40 @@
 * 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}: ${editPost.postDate} 
-	      		&#160;&#160;&#160; ${resource.Post_subject}: ${editPost.subject}
-	      	</span>
-	      </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(editPost.message,false)}" escape="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}: ${editPost.postDate}
+            &#160;&#160;&#160; ${resource.Post_subject}: ${editPost.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(editPost.message,false)}" escape="false" />
+                        </span>
+                    </td>
+                </tr>
+            </table>
+        </td>
+    </tr>
+</table>
+<hr />
+</div>

Modified: labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml
===================================================================
--- labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml	2007-04-27 12:00:25 UTC (rev 11409)
+++ labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml	2007-04-27 12:40:32 UTC (rev 11410)
@@ -323,7 +323,7 @@
                     <tr>
                         <td>
                             <label class="forumformlabelbold">
-                                {resource.Message_body}
+                                ${resource.Message_body}
                             </label>
                         </td>
                     </tr>

Modified: labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml
===================================================================
--- labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml	2007-04-27 12:00:25 UTC (rev 11409)
+++ labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml	2007-04-27 12:40:32 UTC (rev 11410)
@@ -330,7 +330,7 @@
                     <tr>
                         <td>
                             <label class="forumformlabelbold">
-                                {resource.Message_body}
+                                ${resource.Message_body}
                             </label>
                         </td>
                     </tr>




More information about the jboss-svn-commits mailing list