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

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


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

  Modified:    examples/wiki/view/includes         userControl.xhtml
                        directorySelector.xhtml accessLevelSelector.xhtml
  Added:       examples/wiki/view/includes         deleteConfirmation.xhtml
                        popupDialog.xhtml ownerSelector.xhtml
  Removed:     examples/wiki/view/includes        
                        confirmationModalDialog.xhtml creatorSelector.xhtml
  Log:
  Switched to much nicer jQuery modal dialogs
  
  Revision  Changes    Path
  1.9       +0 -31     jboss-seam/examples/wiki/view/includes/userControl.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: userControl.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/includes/userControl.xhtml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- userControl.xhtml	21 Apr 2007 08:13:49 -0000	1.8
  +++ userControl.xhtml	4 May 2007 12:35:29 -0000	1.9
  @@ -4,7 +4,6 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:wiki="http://jboss.com/products/seam/wiki"
  -     xmlns:rich="http://richfaces.ajax4jsf.org/rich"
        xmlns:s="http://jboss.com/products/seam/taglib">
   
       <s:div rendered="#{not identity.loggedIn}">
  @@ -33,36 +32,6 @@
   
       <s:div rendered="#{identity.loggedIn}">
   
  -        <s:span rendered="false">
  -            <!-- TODO: http://jira.jboss.com/jira/browse/JBSEAM-1205
  -                setTimeout( 'javascript:Richfaces.showModalPanel(\'timeoutNotice\', {width:280, height:120})', '#{wiki:getSessionTimeoutSeconds() * 1000}' );
  -            -->
  -        </s:span>
  -
  -        <script type="text/javascript">
  -            setTimeout( 'javascript:Richfaces.showModalPanel(\'timeoutNotice\', {width:280, height:120})', '55555555555555' );
  -        </script>
  -
  -        <ui:decorate template="confirmationModalDialog.xhtml">
  -            <ui:param name="confirmationModalDialogId" value="timeoutNotice"/>
  -            <ui:param name="confirmationHideCancel" value="true"/>
  -            <ui:define name="confirmationTitle">
  -                Notice
  -            </ui:define>
  -            <ui:define name="confirmationContent">
  -                <p>Your session has timed out, please login again.</p>
  -            </ui:define>
  -            <ui:define name="confirmationOption">
  -                <h:outputLink id="OKRedirect"
  -                              onclick="Richfaces.hideModalPanel('#{confirmationModalDialogId}')"
  -                              value="#{wiki:renderURL(wikiStart)}"
  -                              styleClass="buttonNonpersistent"><span class="buttonLabel">Take me to the start page</span></h:outputLink>
  -                <h:outputLink id="OK"
  -                              onclick="Richfaces.hideModalPanel('#{confirmationModalDialogId}')"
  -                              styleClass="buttonNonpersistent"><span class="buttonLabel">Close message</span></h:outputLink>
  -            </ui:define>
  -        </ui:decorate>
  -
           <h:form>
               <h:panelGroup>
                   <h:outputText styleClass="userControlLabel" value="(#{currentUser.fullname})"/>
  
  
  
  1.2       +23 -9     jboss-seam/examples/wiki/view/includes/directorySelector.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: directorySelector.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/includes/directorySelector.xhtml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- directorySelector.xhtml	21 Apr 2007 19:58:02 -0000	1.1
  +++ directorySelector.xhtml	4 May 2007 12:35:29 -0000	1.2
  @@ -1,31 +1,45 @@
  -<ui:decorate template="confirmationModalDialog.xhtml"
  +<ui:decorate template="popupDialog.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: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">
   
  -    <ui:param name="confirmationModalDialogId" value="directorySelection"/>
  -    <ui:define name="confirmationTitle">
  -        Select parent directory...
  +    <ui:param name="dialogId" value="dialogDirectorySelection"/>
  +    <ui:define name="dialogInit">
  +        <script type="text/javascript">$(function() {
  +            jsf('dialogDirectorySelectionPopup')
  +                .css({ minWidth: "250px", minHeight: "250px", width: "250px;", height: "250px;", top: "200px", left: "200px"})
  +                .jqm({trigger: jsf("openDialogDirectorySelection"), closeClass: "closeDialog", onShow: fadeIn, onHide: fadeOut});
  +        });</script>
       </ui:define>
  -    <ui:define name="confirmationContent">
  +    <ui:define name="dialogTitle">Select parent directory...</ui:define>
  +    <ui:define name="dialogContent">
  +
  +        The RichFaces tree component is currently broken (lots of JavaScript errors which bomb jQuery)...
  +
  +        <!-- /*
  +        <h:form rendered="false">
           <rich:tree id="directoryTree" switchType="ajax"
                      value="#{writableDirectoryTree}" var="d"
                      style="margin: 10px;"
                      icon="/themes/default/img/icon.dir.gif"
                      iconLeaf="/themes/default/img/icon.dir.gif"
  -                   selectedClass="activeTab"
  +                   selectedClass="activeTab closeDialog"
                      ajaxSubmitSelection="true"
  -                   onselected="Richfaces.hideModalPanel('directorySelection')"
  -                   nodeSelectListener="#{nodeHome.parentDirectorySelected}"
  -                   reRender="selectedDirectory, content">
  +                   
  +                   reRender="directoryNameDisplay, content">
               <rich:treeNode type="simpleNode">
                   <h:outputText value="#{d.id} - #{d.name}"/>
               </rich:treeNode>
           </rich:tree>
  +        </h:form>
  +        */ -->
  +
       </ui:define>
   
  +
   </ui:decorate>
  
  
  
  1.2       +6 -5      jboss-seam/examples/wiki/view/includes/accessLevelSelector.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: accessLevelSelector.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/includes/accessLevelSelector.xhtml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- accessLevelSelector.xhtml	18 Mar 2007 15:44:39 -0000	1.1
  +++ accessLevelSelector.xhtml	4 May 2007 12:35:29 -0000	1.2
  @@ -1,12 +1,13 @@
  -<div id="accessLevelSelector"
  +<s:div id="accessLevelSelector"
   	 xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:wiki="http://jboss.com/products/seam/wiki"
  -     xmlns:s="http://jboss.com/products/seam/taglib">
  +     xmlns:s="http://jboss.com/products/seam/taglib"
  +     rendered="#{currentUser != guestUser}">
   
  -    <s:div styleClass="entry" rendered="#{currentUser != guestUser}">
  +    <s:div styleClass="entry">
           <div class="label">Readable by:</div>
           <div class="input">
               <h:selectOneMenu value="#{nodePermissions.readAccessLevel}" tabindex="1">
  @@ -21,7 +22,7 @@
           </div>
       </s:div>
   
  -    <s:div styleClass="entry" rendered="#{currentUser != guestUser}">
  +    <s:div styleClass="entry">
           <div class="label">Writable by:</div>
           <div class="input">
               <h:selectOneMenu value="#{nodePermissions.writeAccessLevel}" tabindex="1">
  @@ -37,5 +38,5 @@
       </s:div>
       
   
  -</div>
  +</s:div>
   
  
  
  
  1.1      date: 2007/05/04 12:35:29;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/includes/deleteConfirmation.xhtml
  
  Index: deleteConfirmation.xhtml
  ===================================================================
  <ui:decorate template="popupDialog.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:a="https://ajax4jsf.dev.java.net/ajax"
           xmlns:wiki="http://jboss.com/products/seam/wiki"
           xmlns:j4j="http://javascript4jsf.dev.java.net/">
  
      <ui:param  name="dialogId" value="dialogDelete"/>
      <ui:define name="dialogInit">
          <script type="text/javascript">$(function() {
              jsf('dialogDeletePopup')
                  .css({ minWidth: "200px", minHeight: "150px", width: "300px;", height: "150px;", top: "300px", left: "300px"})
                  .jqm({trigger: jsf("openDialogDelete"), closeClass: "closeDialog", onShow: fadeIn, onHide: fadeOut});
  
          });</script>
      </ui:define>
      <ui:define name="dialogTitle">Delete confirmation</ui:define>
      <ui:define name="dialogContent"><p align="center">Are you sure you want to delete <br/>'#{home.instance}'?</p></ui:define>
      <ui:define name="dialogControls">
          <h:commandLink id="delete" action="#{home.remove}" accesskey="O" styleClass="button">
              <span class="buttonLabel"><u>O</u>k</span>
          </h:commandLink>
      </ui:define>
  
  
  </ui:decorate>
  
  
  
  1.1      date: 2007/05/04 12:35:29;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/includes/popupDialog.xhtml
  
  Index: popupDialog.xhtml
  ===================================================================
  <s:div styleClass="popupDialog"
      id="#{dialogId}"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:wiki="http://jboss.com/products/seam/wiki"
      xmlns:j4j="http://javascript4jsf.dev.java.net/"
      xmlns:s="http://jboss.com/products/seam/taglib">
      <j4j:idProxy id="#{dialogId}Popup"/>
  
      <ui:insert name="dialogInit"/>
  
      <script type="text/javascript">$(function() {
          jsf('#{dialogId}Popup').Resizable({
              minTop: 1,
              dragHandle: "##{dialogId}Head",
              handlers: { se: "##{dialogId}ResizeHandle" }
          });
      });</script>
  
      <div class="popupDialogHead" id="#{dialogId}Head"><ui:insert name="dialogTitle">Confirmation</ui:insert></div>
  
      <s:div styleClass="popupDialogContent" id="#{dialogId}Content">
          <ui:insert name="dialogContent"><p>Are you sure you want to execute this operation?</p></ui:insert>
      </s:div>
  
      <s:div styleClass="popupDialogControls" id="#{dialogId}Controls">
          <h:form>
              <h:panelGroup>
                  <ui:insert name="dialogControls"/>
                  <h:outputLink id="cancel" value="#" rendered="#{!hideCancelButton}"
                                accesskey="C" styleClass="buttonNonpersistent closeDialog"><span class="buttonLabel"><u>C</u>ancel</span></h:outputLink>
              </h:panelGroup>
          </h:form>
      </s:div>
  
      <div class="popupDialogResizeHandle" id="#{dialogId}ResizeHandle"/>
  </s:div>
  
  
  
  1.1      date: 2007/05/04 12:35:29;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/includes/ownerSelector.xhtml
  
  Index: ownerSelector.xhtml
  ===================================================================
  <ui:decorate template="popupDialog.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:a="https://ajax4jsf.dev.java.net/ajax"
           xmlns:wiki="http://jboss.com/products/seam/wiki"
           xmlns:j4j="http://javascript4jsf.dev.java.net/">
  
      <ui:param name="dialogId" value="dialogOwnerSelection"/>
      <ui:define name="dialogInit">
          <script type="text/javascript">$(function() {
              jsf('dialogOwnerSelectionPopup')
                  .css({ minWidth: "700px", minHeight: "420px", width: "725px;", height: "450px;", top: "100px", left: "100px"})
                  .jqm({trigger: jsf("openDialogOwnerSelection"), closeClass: "closeDialog", onShow: fadeIn, onHide: fadeOut});
          });</script>
      </ui:define>
      <ui:define name="dialogTitle">Select owner...</ui:define>
      <ui:define name="dialogContent">
  
          <h:form>
          <div class="form" id="userSearchControl" style="margin-bottom: 15px;">
              <h:panelGrid columns="6"
                           styleClass="datatable topLeftBottomBorder"
                           headerClass="regularHeader rightBorder"
                           columnClasses="tenPercentColumn formFields, tenPercentColumn formFields,
                                          tenPercentColumn formFields, tenPercentColumn formFields,
                                          defaultColumn alignRight rightBorder formFields"
                           cellpadding="0" cellspacing="0" border="0">
  
                  <h:panelGroup>
                      <h:outputText styleClass="label" value="Username:"/>&#160;
                      <h:inputText id="username" value="#{userSearch.exampleUser.username}" maxlength="35" size="10" tabindex="20"/>
                  </h:panelGroup>
  
                  <h:panelGroup>
                      <h:outputText styleClass="label" value="First name:"/>&#160;
                      <h:inputText id="firstname" value="#{userSearch.exampleUser.firstname}" maxlength="35" size="10" tabindex="20"/>
                  </h:panelGroup>
  
                  <h:panelGroup>
                      <h:outputText styleClass="label" value="Last name:"/>&#160;
                      <h:inputText id="lastname" value="#{userSearch.exampleUser.lastname}" maxlength="35" size="10" tabindex="20"/>
                  </h:panelGroup>
  
                  <h:panelGroup>
                      <h:outputText styleClass="label" value="E-mail:"/>&#160;
                      <h:inputText id="email" value="#{userSearch.exampleUser.email}" maxlength="35" size="10" tabindex="20"/>
                  </h:panelGroup>
  
                  <a:commandLink id="find" styleClass="button" reRender="dialogOwnerSelectionContent"
                                 oncomplete="$('#dialogOwnerSelection').jqmAddClose('.closeDialog')"
                                 action="#{userSearch.find()}"
                                 tabindex="20" accesskey="F"><span class="buttonLabel"><u>F</u>ind</span></a:commandLink>
  
              </h:panelGrid>
          </div>
  
          <s:div id="userPager">
              <h:panelGrid columns="5" styleClass="pager"
                           columnClasses="pagerIconColumn,pagerIconColumn,pagerTextColumn,pagerIconColumn,pagerIconColumn"
                           cellpadding="0" cellspacing="0" border="0"
                           rendered="#{userSearch.rowCount > 0}">
  
                  <a:commandLink action="#{userSearch.firstPage()}" rendered="#{userSearch.previousPageAvailable}" tabindex="20"
                                 oncomplete="$('#dialogOwnerSelection').jqmAddClose('.closeDialog')"
                                 reRender="dialogOwnerSelectionContent">
                      <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/page.first.gif" width="13" height="11"/>
                  </a:commandLink>
                  <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/blank.gif" width="13" height="11"
                                  rendered="#{!userSearch.previousPageAvailable}"/>
  
                  <a:commandLink action="#{userSearch.previousPage()}" rendered="#{userSearch.previousPageAvailable}" tabindex="20"
                                 oncomplete="$('#dialogOwnerSelection').jqmAddClose('.closeDialog')"
                                 reRender="dialogOwnerSelectionContent">
                      <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/page.previous.gif" width="13" height="11"/>
                  </a:commandLink>
                  <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/blank.gif" width="13" height="11"
                                  rendered="#{!userSearch.previousPageAvailable}"/>
  
                  <h:outputText value="Found: #{userSearch.rowCount} member(s)"/>
  
                  <a:commandLink action="#{userSearch.nextPage()}" rendered="#{userSearch.nextPageAvailable}" tabindex="20"
                                 oncomplete="$('#dialogOwnerSelection').jqmAddClose('.closeDialog')"
                                 reRender="dialogOwnerSelectionContent">
                      <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/page.next.gif" width="13" height="11"/>
                  </a:commandLink>
                  <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/blank.gif" width="13" height="11"
                                  rendered="#{!userSearch.nextPageAvailable}"/>
  
                  <a:commandLink action="#{userSearch.lastPage()}" rendered="#{userSearch.nextPageAvailable}" tabindex="20"
                                 oncomplete="$('#dialogOwnerSelection').jqmAddClose('.closeDialog')"
                                 reRender="dialogOwnerSelectionContent">
                      <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/page.last.gif" width="13" height="11"/>
                  </a:commandLink>
                  <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/blank.gif" width="13" height="11"
                                  rendered="#{!userSearch.nextPageAvailable}"/>
  
              </h:panelGrid>
          </s:div>
  
          <s:div id="userTableContainer" style="margin-bottom: 15px;">
              <h:dataTable id="userTable" var="u"
                           value="#{usersList}"
                           rendered="#{usersList.rowCount >0}"
                           styleClass="datatable topLeftBottomBorder"
                           headerClass="sortableHeader rightBorder"
                           columnClasses="defaultColumn rightBorder alignLeft,
                                          twentyPercentColumn rightBorder alignLeft,
                                          twentyPercentColumn rightBorder alignLeft,
                                          twentyPercentColumn rightBorder alignLeft,
                                          tenPercentColumn rightBorder alignCenter"
                           rowClasses="rowOdd,rowEven"
                           cellpadding="0" cellspacing="0" border="0">
  
                  <h:column>
                      <f:facet name="header">
                          <a:commandLink action="#{userSearch.sortBy('username')}" tabindex="20" reRender="dialogOwnerSelectionContent"
                                         oncomplete="$('#dialogOwnerSelection').jqmAddClose('.closeDialog')">
                              <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/sortindicator.up.gif" width="8" height="8"
                                              rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'username'}"/>
                              <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/sortindicator.down.gif" width="8" height="8"
                                              rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'username'}"/>
                              Username
                          </a:commandLink>
                      </f:facet>
                      #{u.username}
                      <h:outputText rendered="#{!empty u.activationCode}">&#160;(Not Activated)</h:outputText>
                  </h:column>
  
                  <h:column>
                      <f:facet name="header">
                          <a:commandLink action="#{userSearch.sortBy('firstname')}" tabindex="20" reRender="dialogOwnerSelectionContent"
                                         oncomplete="$('#dialogOwnerSelection').jqmAddClose('.closeDialog')">
                              <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/sortindicator.up.gif" width="8" height="8"
                                              rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'firstname'}"/>
                              <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/sortindicator.down.gif" width="8" height="8"
                                              rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'firstname'}"/>
                              First name
                          </a:commandLink>
                      </f:facet>
                      #{u.firstname}
                  </h:column>
  
                  <h:column>
                      <f:facet name="header">
                          <a:commandLink action="#{userSearch.sortBy('lastname')}" tabindex="20" reRender="dialogOwnerSelectionContent"
                                         oncomplete="$('#dialogOwnerSelection').jqmAddClose('.closeDialog')">
                              <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/sortindicator.up.gif" width="8" height="8"
                                              rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'lastname'}"/>
                              <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/sortindicator.down.gif" width="8" height="8"
                                              rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'lastname'}"/>
                              Last name
                          </a:commandLink>
                      </f:facet>
                      #{u.lastname}
                  </h:column>
  
                  <h:column>
                      <f:facet name="header">
                          <a:commandLink action="#{userSearch.sortBy('email')}" tabindex="20" reRender="dialogOwnerSelectionContent"
                                         oncomplete="$('#dialogOwnerSelection').jqmAddClose('.closeDialog')">
                              <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/sortindicator.up.gif" width="8" height="8"
                                              rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'email'}"/>
                              <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/sortindicator.down.gif" width="8" height="8"
                                              rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'email'}"/>
                              E-mail address
                          </a:commandLink>
                      </f:facet>
                      #{u.email}
                  </h:column>
  
                  <h:column>
                      <a:commandLink action="#{home.selectOwner(u.id)}"
                                     reRender="ownerDisplay" styleClass="buttonNonpersistent closeDialog"
                                     tabindex="20"><span class="buttonLabel">Select</span></a:commandLink>
                  </h:column>
  
              </h:dataTable>
          </s:div>
          </h:form>
  
      </ui:define>
  
  </ui:decorate>
  
  
  



More information about the jboss-cvs-commits mailing list