[jboss-cvs] jboss-seam/examples/wiki/view ...

Christian Bauer christian at hibernate.org
Mon Oct 1 15:08:05 EDT 2007


  User: cbauer  
  Date: 07/10/01 15:08:05

  Modified:    examples/wiki/view      docDisplay_d.xhtml docEdit_d.xhtml
                        adminHome_d.xhtml
  Added:       examples/wiki/view      tagDisplay_m.xhtml
                        tagDisplay_d.xhtml
  Log:
  Tagging of content, JBSEAM-1851
  
  Revision  Changes    Path
  1.4       +20 -2     jboss-seam/examples/wiki/view/docDisplay_d.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: docDisplay_d.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/docDisplay_d.xhtml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- docDisplay_d.xhtml	24 Sep 2007 08:23:19 -0000	1.3
  +++ docDisplay_d.xhtml	1 Oct 2007 19:08:04 -0000	1.4
  @@ -55,6 +55,22 @@
                                   renderBaseDirectory="#{documentHome.parentDirectory}"
                                   enablePlugins="true"/>
           </s:div>
  +
  +        <s:div rendered="#{documentHome.instance.pluginsUsed.contains('showTags') and not empty documentHome.instance.tags}"
  +               styleClass="documentTags undecoratedLink">
  +            <s:div>
  +                Tags:&#160;
  +                <ui:repeat var="tag" value="#{documentHome.instance.tagsSplit}">
  +                    <s:link view="/tagDisplay_#{skin}.xhtml" value="#{tag}">
  +                        <f:param value="#{tag}" name="tag"/>
  +                    </s:link>
  +
  +                    <h:outputText rendered="#{documentHome.instance.tagsSplit.indexOf(tag) &lt; documentHome.instance.tagsSplit.size()-1}"
  +                                  value="&#160;|&#160;"/>
  +                </ui:repeat>
  +            </s:div>
  +        </s:div>
  +
           <s:div rendered="#{wikiPreferences.showDocumentCreatorHistory and not documentHome.instance.pluginsUsed.contains('hideCreatorHistory')}"
                  styleClass="documentCreatorHistory undecoratedLink">
               <s:div>
  @@ -111,9 +127,11 @@
   
       <ui:include src="includes/attachmentDisplay.xhtml"/>
   
  +    <s:span id="commentDisplayForm">
       <ui:include src="includes/commentsDisplay.xhtml"/>
   
       <ui:include src="includes/commentForm.xhtml"/>
  +    </s:span>
   
   </ui:define>
   
  
  
  
  1.6       +44 -0     jboss-seam/examples/wiki/view/docEdit_d.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: docEdit_d.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/docEdit_d.xhtml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- docEdit_d.xhtml	25 Sep 2007 14:30:45 -0000	1.5
  +++ docEdit_d.xhtml	1 Oct 2007 19:08:04 -0000	1.6
  @@ -248,6 +248,50 @@
                                   </s:div>
                               </s:div>
   
  +                            <s:div styleClass="entry">
  +                                <div class="label">Tags:</div>
  +                                <div class="input">
  +                                    <h:inputText id="tagsInput" tabindex="1" size="70" maxlength="1024" required="false" value="#{documentHome.instance.tags}">
  +                                        <a:support event="onblur" reRender="popularTagsList"/>
  +                                    </h:inputText>
  +                                </div>
  +                            </s:div>
  +
  +                            <script type="text/javascript">
  +                                function appendTag(tag) {
  +                                    oldValue = jQuery('#docEditForm\\:tagsInput').val();
  +                                    if (oldValue != null &amp;&amp; oldValue.length > 0) {
  +                                        jQuery('#docEditForm\\:tagsInput').val(
  +                                            trimString(oldValue) + (stringEndsWith(trimString(oldValue), ",") ? " " : ", ") + tag
  +                                        );
  +                                    } else {
  +                                        jQuery('#docEditForm\\:tagsInput').val(tag);
  +                                    }
  +                                    refreshPopularTagsList();
  +                                }
  +                            </script>
  +                            <a:jsFunction name="refreshPopularTagsList"
  +                                          reRender="popularTagsList"/>
  +
  +                            <s:div styleClass="entry" id="popularTagsList">
  +                                <div class="label">Popular Tags:</div>
  +                                <div class="input">
  +                                    <h:panelGroup>
  +                                        <ui:repeat var="tagCount" value="#{documentHome.popularTags}">
  +                                            <s:span styleClass="undecoratedLink">
  +                                                <s:fragment rendered="#{not documentHome.instance.tags.contains(tagCount.tag)}">
  +                                                    <h:outputLink value="#"
  +                                                                  onclick="appendTag('#{tagCount.tag}')" >#{tagCount.tag}</h:outputLink>
  +                                                    &#160;
  +                                                </s:fragment>
  +                                            </s:span>
  +                                        </ui:repeat>
  +                                    </h:panelGroup>
  +                                    
  +                                </div>
  +                            </s:div>
  +                            
  +
                           </div>
                       </a:region>
   
  
  
  
  1.2       +4 -4      jboss-seam/examples/wiki/view/adminHome_d.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: adminHome_d.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/adminHome_d.xhtml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- adminHome_d.xhtml	4 Sep 2007 09:33:18 -0000	1.1
  +++ adminHome_d.xhtml	1 Oct 2007 19:08:04 -0000	1.2
  @@ -141,7 +141,7 @@
           </div>
   
           <div id="linkProtocols">
  -            <div class="formFields" style="padding: 20px;">
  +            <s:div id="linkProtocolsRegion" styleClass="formFields" style="padding: 20px;">
               <a:region>
   
               <p>
  @@ -175,7 +175,7 @@
                       #{lp.link}
                   </h:column>
                   <h:column>
  -                    <a:commandLink status="adminForm:status" id="removeLinkProtocol" styleClass="buttonNonpersistent" reRender="linkProtocolTable"
  +                    <a:commandLink status="adminForm:status" id="removeLinkProtocol" styleClass="buttonNonpersistent" reRender="linkProtocolsRegion"
                                      action="#{adminHome.removeLinkProtocol()}"><span class="buttonLabel">Remove</span></a:commandLink>
                   </h:column>
               </h:dataTable>
  @@ -197,14 +197,14 @@
                   <div class="entry">
                       <div class="label">&#160;</div>
                       <div class="input">
  -                        <a:commandLink status="adminForm:status" id="addLinkProtocol" styleClass="buttonNonpersistent" reRender="linkProtocolTable, linkProtocolForm"
  +                        <a:commandLink status="adminForm:status" id="addLinkProtocol" styleClass="buttonNonpersistent" reRender="linkProtocolsRegion"
                                          action="#{adminHome.addLinkProtocol}"><span class="buttonLabel">Add</span></a:commandLink>
                       </div>
                   </div>
               </s:div>
   
               </a:region>
  -            </div>
  +            </s:div>
           </div>
   
           <div id="systemPrefs">
  
  
  
  1.1      date: 2007/10/01 19:08:04;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/tagDisplay_m.xhtml
  
  Index: tagDisplay_m.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:h="http://java.sun.com/jsf/html"
                  xmlns:wiki="http://jboss.com/products/seam/wiki"
                  template="themes/#{wikiPreferences.themeName}/#{skin}/template.xhtml">
  
  <ui:define name="screenname">Tag Display</ui:define>
  
  <ui:define name="content">
      Tag Display is not available with this skin.
  </ui:define>
  
  </ui:composition>
  
  
  
  1.1      date: 2007/10/01 19:08:04;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/tagDisplay_d.xhtml
  
  Index: tagDisplay_d.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:h="http://java.sun.com/jsf/html"
                  template="themes/#{wikiPreferences.themeName}/template.xhtml">
  
  <ui:define name="screenname">Tag: #{tagHome.tag}</ui:define>
  
  <ui:define name="content">
  
  <div class="box">
  
      <h:dataTable id="tagTable" var="node"
                   value="#{tagHome.taggedDocuments}"
                   rendered="#{!empty tagHome.taggedDocuments}"
                   styleClass="datatable topLeftBottomBorder"
                   headerClass="regularHeader rightBorder"
                   columnClasses="onePercentColumn rightBorder alignLeft, defaultColumn rightBorder alignLeft,
                                  twentyPercentColumn rightBorder alignLeft, twentyPercentColumn rightBorder alignLeft"
                   rowClasses="rowOdd,rowEven"
                   cellpadding="0" cellspacing="0" border="0">
  
          <h:column>
              <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/icon.doc.gif"
                              width="18" height="20"/>
          </h:column>
          <h:column>
              <f:facet name="header">
                  Tag: #{tagHome.tag}
              </f:facet>
              <h:outputLink value="#{wiki:renderURL(node)}">#{node.name}</h:outputLink>
          </h:column>
          <h:column>
              <f:facet name="header">
                  Owner
              </f:facet>
              #{node.createdBy.fullname}
          </h:column>
          <h:column>
              <f:facet name="header">
                  Created On
              </f:facet>
              <h:outputText value="#{node.createdOn}">
                  <f:convertDateTime type="both" timeZone="#{wikiPreferences.timeZone}"/>
              </h:outputText>
          </h:column>
          <h:column rendered="#{!empty node.lastModifiedOn and !empty node.lastModifiedBy}">
              <f:facet name="header">
                  Last Modified On
              </f:facet>
              <h:outputText value="#{node.lastModifiedOn}">
                  <f:convertDateTime type="both" timeZone="#{wikiPreferences.timeZone}"/>
              </h:outputText>
              (#{node.lastModifiedBy.username})
          </h:column>
          <h:column rendered="#{empty node.lastModifiedOn or empty node.lastModifiedBy}">
              <f:facet name="header">
                  Last Modified On
              </f:facet>
              -
          </h:column>
  
  
      </h:dataTable>
  
  </div>
  </ui:define>
  
  <ui:define name="footer">&#160;</ui:define>
  
  </ui:composition>
  
  
  
  



More information about the jboss-cvs-commits mailing list