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

Christian Bauer christian at hibernate.org
Fri May 4 08:35:28 EDT 2007


  User: cbauer  
  Date: 07/05/04 08:35:28

  Modified:    examples/wiki/view     fileEdit.xhtml dirEdit.xhtml
                        userHome.xhtml docEdit.xhtml
  Log:
  Switched to much nicer jQuery modal dialogs
  
  Revision  Changes    Path
  1.15      +33 -35    jboss-seam/examples/wiki/view/fileEdit.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: fileEdit.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/fileEdit.xhtml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -b -r1.14 -r1.15
  --- fileEdit.xhtml	26 Apr 2007 15:11:50 -0000	1.14
  +++ fileEdit.xhtml	4 May 2007 12:35:28 -0000	1.15
  @@ -6,7 +6,7 @@
                   xmlns:f="http://java.sun.com/jsf/core"
                   xmlns:h="http://java.sun.com/jsf/html"
                   xmlns:wiki="http://jboss.com/products/seam/wiki"
  -                xmlns:rich="http://richfaces.ajax4jsf.org/rich"
  +                xmlns:j4j="http://javascript4jsf.dev.java.net/"
                   template="themes/#{wikiPreferences.themeName}/template.xhtml">
   
   <ui:define name="includeHeaders">
  @@ -39,6 +39,24 @@
   
   <ui:define name="content">
   
  +    <s:span rendered="#{fileHome.managed}">
  +        <ui:include src="includes/directorySelector.xhtml">
  +            <ui:param name="home" value="#{fileHome}"/>
  +        </ui:include>
  +    </s:span>
  +
  +    <s:span rendered="#{s:hasPermission('User', 'isAdmin', currentUser) and fileHome.managed}">
  +        <ui:include src="includes/ownerSelector.xhtml">
  +            <ui:param name="home" value="#{fileHome}"/>
  +        </ui:include>
  +    </s:span>
  +
  +    <s:span rendered="#{fileHome.managed}">
  +        <ui:include src="includes/deleteConfirmation.xhtml">
  +            <ui:param name="home" value="#{fileHome}"/>
  +        </ui:include>
  +    </s:span>
  +
       <h:form enctype="multipart/form-data">
           <div class="form">
               <div class="formHead">
  @@ -48,26 +66,26 @@
   
               <div class="formFields formBorder wideLabels">
   
  -                <s:div id="selectedDirectory" styleClass="entry" rendered="#{fileHome.managed}">
  +                <s:div styleClass="entry" rendered="#{fileHome.managed}">
                       <div class="label">In directory:</div>
                       <div class="output">
  -                        #{fileHome.parentDirectory}
  -                        <h:outputLink id="selectDirectory" value="javascript:Richfaces.showModalPanel('directorySelection',{width:250, height:250, top:100})"
  -                                      tabindex="1" styleClass="buttonNonpersistent"><span class="buttonLabel">...</span></h:outputLink>
  +                        <s:span id="directoryNameDisplay">#{fileHome.parentDirectory}</s:span>
  +
  +                        <h:outputLink id="selectDirectory" value="#" tabindex="1" styleClass="buttonNonpersistent"><j4j:idProxy
  +                                        id="openDialogDirectorySelection"/><span class="buttonLabel">...</span></h:outputLink>
                       </div>
                   </s:div>
   
  -                <s:div id="selectedCreator" styleClass="entry" rendered="#{fileHome.managed}">
  +                <s:div styleClass="entry" rendered="#{fileHome.managed}">
                       <div class="label">Created On:</div>
                       <div class="output">
                           <h:outputText value="#{fileHome.instance.createdOn}">
                               <f:convertDateTime type="both" timeZone="#{wikiPreferences.timeZone}"/>
                           </h:outputText>
  -                        (#{fileHome.instance.createdBy.username})
  -                        <h:outputLink id="selectCreator" rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}"
  -                                      value="javascript:Richfaces.showModalPanel('creatorSelection',{width:625, height:320, top:150})"
  -                                      tabindex="1"
  -                                      styleClass="buttonNonpersistent"><span class="buttonLabel">...</span></h:outputLink>
  +                        <s:span id="ownerDisplay">&#160;(#{fileHome.instance.createdBy.username})</s:span>
  +                        <h:outputLink id="selectOwner" value="#" tabindex="1" styleClass="buttonNonpersistent"
  +                                      rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}"><j4j:idProxy
  +                                        id="openDialogOwnerSelection"/><span class="buttonLabel">...</span></h:outputLink>
                       </div>
                   </s:div>
   
  @@ -174,9 +192,10 @@
                                      rendered="#{fileHome.managed}"
                                      tabindex="6" accesskey="U" styleClass="button"><span class="buttonLabel"><u>U</u>pdate</span></h:commandLink>
   
  -                        <h:outputLink id="delete" value="javascript:Richfaces.showModalPanel('deleteConfirmation',{})"
  -                                      rendered="#{fileHome.managed}"
  -                                      tabindex="7" accesskey="D" styleClass="button"><span class="buttonLabel"><u>D</u>elete</span></h:outputLink>
  +                        <h:outputLink id="delete" value="#" tabindex="7" accesskey="D" styleClass="button"
  +                                      rendered="#{fileHome.managed}"><j4j:idProxy
  +                                id="openDialogDelete"/><span class="buttonLabel"><u>D</u>elete</span></h:outputLink>
  +
                       </div>
                   </div>
   
  @@ -185,27 +204,6 @@
           </div>
       </h:form>
   
  -    <ui:decorate template="includes/confirmationModalDialog.xhtml">
  -        <ui:param name="confirmationModalDialogId" value="deleteConfirmation"/>
  -        <ui:define name="confirmationContent">
  -            <p>Are you sure you want to delete the file '#{fileHome.instance.name}'?</p>
  -        </ui:define>
  -        <ui:define name="confirmationOption">
  -            <h:commandLink id="delete" action="#{fileHome.remove}"
  -                           accesskey="O" styleClass="button">
  -                <span class="buttonLabel"><u>O</u>k</span>
  -            </h:commandLink>
  -        </ui:define>
  -    </ui:decorate>
  -
  -    <ui:include src="includes/directorySelector.xhtml">
  -        <ui:param name="nodeHome" value="#{fileHome}"/>
  -    </ui:include>
  -
  -    <ui:include src="includes/creatorSelector.xhtml">
  -        <ui:param name="nodeHome" value="#{fileHome}"/>
  -    </ui:include>
  -
   </ui:define>
   
   <ui:define name="footer">&#160;</ui:define>
  
  
  
  1.21      +23 -28    jboss-seam/examples/wiki/view/dirEdit.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: dirEdit.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/dirEdit.xhtml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -b -r1.20 -r1.21
  --- dirEdit.xhtml	26 Apr 2007 15:11:51 -0000	1.20
  +++ dirEdit.xhtml	4 May 2007 12:35:28 -0000	1.21
  @@ -6,7 +6,7 @@
                   xmlns:f="http://java.sun.com/jsf/core"
                   xmlns:h="http://java.sun.com/jsf/html"
                   xmlns:wiki="http://jboss.com/products/seam/wiki"
  -                xmlns:rich="http://richfaces.ajax4jsf.org/rich"
  +                xmlns:j4j="http://javascript4jsf.dev.java.net/"
                   xmlns:a="https://ajax4jsf.dev.java.net/ajax"
                   template="themes/#{wikiPreferences.themeName}/template.xhtml">
   
  @@ -40,6 +40,19 @@
   
   <ui:define name="content">
   
  +<s:span rendered="#{s:hasPermission('User', 'isAdmin', currentUser) and directoryHome.managed}">
  +    <ui:include src="includes/ownerSelector.xhtml">
  +        <ui:param name="home" value="#{directoryHome}"/>
  +    </ui:include>
  +</s:span>
  +
  +<s:span rendered="#{directoryHome.managed and !empty directoryHome.instance.parent}">
  +    <ui:include src="includes/deleteConfirmation.xhtml">
  +        <ui:param name="home" value="#{directoryHome}"/>
  +    </ui:include>
  +</s:span>
  +
  +
   <h:form>
   <div class="form">
   <div class="formHead">
  @@ -60,17 +73,16 @@
               </div>
           </s:div>
   
  -        <s:div id="selectedCreator" styleClass="entry" rendered="#{directoryHome.managed}">
  +        <s:div styleClass="entry" rendered="#{directoryHome.managed}">
               <div class="label">Created On:</div>
               <div class="output">
                   <h:outputText value="#{directoryHome.instance.createdOn}">
                       <f:convertDateTime type="both" timeZone="#{wikiPreferences.timeZone}"/>
                   </h:outputText>
  -                (#{directoryHome.instance.createdBy.username})
  -                <h:outputLink id="selectCreator" rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}"
  -                              value="javascript:Richfaces.showModalPanel('creatorSelection',{width:625, height:320, top:150})"
  -                              tabindex="1"
  -                              styleClass="buttonNonpersistent"><span class="buttonLabel">...</span></h:outputLink>
  +                <s:span id="ownerDisplay">&#160;(#{directoryHome.instance.createdBy.username})</s:span>
  +                <h:outputLink id="selectOwner" value="#" tabindex="1" styleClass="buttonNonpersistent"
  +                              rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}"><j4j:idProxy
  +                                id="openDialogOwnerSelection"/><span class="buttonLabel">...</span></h:outputLink>
               </div>
           </s:div>
   
  @@ -192,10 +204,10 @@
                              rendered="#{directoryHome.managed}"
                              tabindex="7" accesskey="U"><span class="buttonLabel"><u>U</u>pdate</span></h:commandLink>
   
  -            <h:outputLink id="delete" value="javascript:Richfaces.showModalPanel('deleteConfirmation',{})"
  -                          rendered="#{directoryHome.managed
  -                                     and !empty directoryHome.instance.parent}"
  -                          tabindex="8" accesskey="D" styleClass="button"><span class="buttonLabel"><u>D</u>elete</span></h:outputLink>
  +            <h:outputLink id="delete" value="#" tabindex="8" accesskey="D" styleClass="button"
  +                          rendered="#{directoryHome.managed and !empty directoryHome.instance.parent}"><j4j:idProxy
  +                    id="openDialogDelete"/><span class="buttonLabel"><u>D</u>elete</span></h:outputLink>
  +
           </div>
       </div>
   
  @@ -204,23 +216,6 @@
   </div>
   </h:form>
   
  -<ui:decorate template="includes/confirmationModalDialog.xhtml">
  -    <ui:param name="confirmationModalDialogId" value="deleteConfirmation"/>
  -    <ui:define name="confirmationContent">
  -        <p>Are you sure you want to delete the directory '#{directoryHome.instance.name}'?</p>
  -    </ui:define>
  -    <ui:define name="confirmationOption">
  -        <h:commandLink id="delete" action="#{directoryHome.remove}"
  -                       accesskey="O" styleClass="button">
  -            <span class="buttonLabel"><u>O</u>k</span>
  -        </h:commandLink>
  -    </ui:define>
  -</ui:decorate>
  -
  -<ui:include src="includes/creatorSelector.xhtml">
  -    <ui:param name="nodeHome" value="#{directoryHome}"/>
  -</ui:include>
  -
   </ui:define>
   
   <ui:define name="footer">&#160;</ui:define>
  
  
  
  1.7       +11 -17    jboss-seam/examples/wiki/view/userHome.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: userHome.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/userHome.xhtml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- userHome.xhtml	22 Apr 2007 20:09:26 -0000	1.6
  +++ userHome.xhtml	4 May 2007 12:35:28 -0000	1.7
  @@ -7,6 +7,7 @@
                   xmlns:h="http://java.sun.com/jsf/html"
                   xmlns:rich="http://richfaces.ajax4jsf.org/rich"
                   xmlns:a="https://ajax4jsf.dev.java.net/ajax"
  +                xmlns:j4j="http://javascript4jsf.dev.java.net/"
                   xmlns:wiki="http://jboss.com/products/seam/wiki"
                   template="themes/#{wikiPreferences.themeName}/template.xhtml">
   
  @@ -41,6 +42,12 @@
   
   <ui:define name="content">
   
  +<s:span rendered="#{s:hasPermission('User', 'delete', userHome.instance)}">
  +    <ui:include src="includes/deleteConfirmation.xhtml">
  +        <ui:param name="home" value="#{userHome}"/>
  +    </ui:include>
  +</s:span>
  +
   <h:form><div class="form">
   
       <rich:panelBar styleClass="formPanel"
  @@ -194,9 +201,10 @@
                                  action="#{userHome.update}"
                                  tabindex="9" accesskey="U"><span class="buttonLabel"><u>U</u>pdate</span></h:commandLink>
   
  -                <h:outputLink id="delete" value="javascript:Richfaces.showModalPanel('deleteConfirmation',{width:375, height:125})"
  -                              rendered="#{s:hasPermission('User', 'delete', userHome.instance)}"
  -                              tabindex="9" accesskey="D" styleClass="button"><span class="buttonLabel"><u>D</u>elete</span></h:outputLink>
  +                <h:outputLink id="delete" value="#" tabindex="9" accesskey="D" styleClass="button"
  +                              rendered="#{s:hasPermission('User', 'delete', userHome.instance)}"><j4j:idProxy
  +                        id="openDialogDelete"/><span class="buttonLabel"><u>D</u>elete</span></h:outputLink>
  +
   
               </div>
           </div>
  @@ -205,20 +213,6 @@
   
   </div></h:form>
   
  -<ui:decorate template="includes/confirmationModalDialog.xhtml">
  -    <ui:param name="confirmationModalDialogId" value="deleteConfirmation"/>
  -    <ui:define name="confirmationContent">
  -        <p>Are you sure you want to delete the user '#{userHome.instance.username}'?
  -            Note that any existing home directory or documents owned by this user will not be deleted.</p>
  -    </ui:define>
  -    <ui:define name="confirmationOption">
  -        <h:commandLink id="delete" action="#{userHome.remove}"
  -                       accesskey="O" styleClass="button">
  -            <span class="buttonLabel"><u>O</u>k</span>
  -        </h:commandLink>
  -    </ui:define>
  -</ui:decorate>
  -
   
   </ui:define>
   
  
  
  
  1.30      +31 -35    jboss-seam/examples/wiki/view/docEdit.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: docEdit.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/docEdit.xhtml,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -b -r1.29 -r1.30
  --- docEdit.xhtml	3 May 2007 14:10:50 -0000	1.29
  +++ docEdit.xhtml	4 May 2007 12:35:28 -0000	1.30
  @@ -8,7 +8,6 @@
                   xmlns:a="https://ajax4jsf.dev.java.net/ajax"
                   xmlns:wiki="http://jboss.com/products/seam/wiki"
                   xmlns:j4j="http://javascript4jsf.dev.java.net/"
  -                xmlns:rich="http://richfaces.ajax4jsf.org/rich"
                   template="themes/#{wikiPreferences.themeName}/template.xhtml">
   
   <ui:define name="includeHeaders">
  @@ -49,6 +48,24 @@
   
   <ui:define name="content">
   
  +    <s:span rendered="#{documentHome.managed}">
  +        <ui:include src="includes/directorySelector.xhtml">
  +            <ui:param name="home" value="#{documentHome}"/>
  +        </ui:include>
  +    </s:span>
  +
  +    <s:span rendered="#{s:hasPermission('User', 'isAdmin', currentUser) and documentHome.managed}">
  +        <ui:include src="includes/ownerSelector.xhtml">
  +            <ui:param name="home" value="#{documentHome}"/>
  +        </ui:include>
  +    </s:span>
  +
  +    <s:span rendered="#{documentHome.managed and documentHome.instance.id != wikiStart.id}">
  +        <ui:include src="includes/deleteConfirmation.xhtml">
  +            <ui:param name="home" value="#{documentHome}"/>
  +        </ui:include>
  +    </s:span>
  +
       <h:form>
   
           <div class="form">
  @@ -60,26 +77,26 @@
   
               <div class="formFields formBorder">
   
  -                <s:div id="selectedDirectory" styleClass="entry" rendered="#{documentHome.managed}">
  +                <s:div styleClass="entry" rendered="#{documentHome.managed}">
                       <div class="label">In directory:</div>
                       <div class="output">
  -                        #{documentHome.parentDirectory}
  -                        <h:outputLink id="selectDirectory" value="javascript:Richfaces.showModalPanel('directorySelection',{width:250, height:250, top:100})"
  -                                      tabindex="1" styleClass="buttonNonpersistent"><span class="buttonLabel">...</span></h:outputLink>
  +                        <s:span id="directoryNameDisplay">#{documentHome.parentDirectory}</s:span>
  +
  +                        <h:outputLink id="selectDirectory" value="#" tabindex="1" styleClass="buttonNonpersistent"><j4j:idProxy
  +                                        id="openDialogDirectorySelection"/><span class="buttonLabel">...</span></h:outputLink>
                       </div>
                   </s:div>
   
  -                <s:div id="selectedCreator" styleClass="entry" rendered="#{documentHome.managed}">
  +                <s:div styleClass="entry" rendered="#{documentHome.managed}">
                       <div class="label">Created On:</div>
                       <div class="output">
                           <h:outputText value="#{documentHome.instance.createdOn}">
                               <f:convertDateTime type="both" timeZone="#{wikiPreferences.timeZone}"/>
                           </h:outputText>
  -                        (#{documentHome.instance.createdBy.username})
  -                        <h:outputLink id="selectCreator" rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}"
  -                                      value="javascript:Richfaces.showModalPanel('creatorSelection',{width:625, height:320, top:150})"
  -                                      tabindex="1"
  -                                      styleClass="buttonNonpersistent"><span class="buttonLabel">...</span></h:outputLink>
  +                        <s:span id="ownerDisplay">&#160;(#{documentHome.instance.createdBy.username})</s:span>
  +                        <h:outputLink id="selectOwner" value="#" tabindex="1" styleClass="buttonNonpersistent"
  +                                      rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}"><j4j:idProxy
  +                                        id="openDialogOwnerSelection"/><span class="buttonLabel">...</span></h:outputLink>
                       </div>
                   </s:div>
   
  @@ -213,9 +230,9 @@
                                      rendered="#{documentHome.managed}"
                                      tabindex="4" accesskey="U" styleClass="button"><span class="buttonLabel"><u>U</u>pdate</span></h:commandLink>
   
  -                        <h:outputLink id="delete" value="javascript:Richfaces.showModalPanel('deleteConfirmation',{})"
  -                                      rendered="#{documentHome.managed and documentHome.instance.id != wikiStart.id}"
  -                                      tabindex="4" accesskey="D" styleClass="button"><span class="buttonLabel"><u>D</u>elete</span></h:outputLink>
  +                        <h:outputLink id="delete" value="#" tabindex="4" accesskey="D" styleClass="button"
  +                                      rendered="#{documentHome.managed and documentHome.instance.id != wikiStart.id}"><j4j:idProxy
  +                                id="openDialogDelete"/><span class="buttonLabel"><u>D</u>elete</span></h:outputLink>
   
                       </div>
                   </div>
  @@ -226,27 +243,6 @@
   
       </h:form>
   
  -    <ui:decorate template="includes/confirmationModalDialog.xhtml">
  -        <ui:param name="confirmationModalDialogId" value="deleteConfirmation"/>
  -        <ui:define name="confirmationContent">
  -            <p>Are you sure you want to delete the document '#{documentHome.instance.name}'?</p>
  -        </ui:define>
  -        <ui:define name="confirmationOption">
  -            <h:commandLink id="delete" action="#{documentHome.remove}"
  -                           accesskey="O" styleClass="button">
  -                <span class="buttonLabel"><u>O</u>k</span>
  -            </h:commandLink>
  -        </ui:define>
  -    </ui:decorate>
  -
  -    <ui:include src="includes/directorySelector.xhtml">
  -        <ui:param name="nodeHome" value="#{documentHome}"/>
  -    </ui:include>
  -
  -    <ui:include src="includes/creatorSelector.xhtml">
  -        <ui:param name="nodeHome" value="#{documentHome}"/>
  -    </ui:include>
  -
       <s:div styleClass="documentDisplay" id="preview">
           <s:div rendered="#{documentHome.enabledPreview}">
               <s:div rendered="#{currentDocument.nameAsTitle}"><h1 class="documentTitle">#{currentDocument.name}</h1></s:div>
  
  
  



More information about the jboss-cvs-commits mailing list