Ignore:
Timestamp:
Jan 14, 2010, 3:00:05 PM (13 years ago)
Author:
duh
Message:
  • refactored the wizard code a bit
Location:
trunk/grails-app/views/wizard/common
Files:
1 added
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/wizard/common/_navigation.gsp

    r87 r88  
    66 * @since   20100113
    77 * @package wizard
    8  * @see     dbnp.studycapturing.WizardTagLib::previousNext
    98 * @see     dbnp.studycapturing.WizardController
    109 *
     
    1514 */
    1615%>
    17     <div id="wizardNavigation">
    18       <g:if test="${button.previous}">&laquo; <wizard:ajaxButton name="previous" value="prev" url="[controller:'wizard',action:'pages']" update="[success:'wizardContent',failure:'wizardError']" /></g:if>
    19       <g:if test="${button.previous && button.next}">|</g:if>
    20       <g:if test="${button.next}"><wizard:ajaxButton name="next" value="next" url="[controller:'wizard',action:'pages']" update="[success:'wizardContent',failure:'wizardError']" /> &raquo;</g:if>
     16    <div class="navigation">
     17      <g:if test="${page>1}"><wizard:ajaxButton name="previous" value="&laquo; prev" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" class="prevnext" /></g:if>
     18      <g:if test="${page>1 && page<pages.size}"> | </g:if>
     19      <g:if test="${page<pages.size}"><wizard:ajaxButton name="next" value="next &raquo;" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" class="prevnext" /></g:if>
    2120    </div>
  • trunk/grails-app/views/wizard/common/_tabs.gsp

    r87 r88  
    1515 */
    1616%>
    17 <div class="wizardHeader">
    18   tabs go in here
     17<div class="tabs">
     18  <g:each status="i" var="item" in="${pages}"><div class="element<g:if test="${(i == (page-1))}"> active</g:if>">${i+1}. ${item.title}</div></g:each>
    1919</div>
  • trunk/grails-app/views/wizard/common/_wizard.gsp

    r87 r88  
    11<%
    22/**
    3  * Wizard template
     3 * Wizard template with first page rendered
    44 *
    55 * @author  Jeroen Wesbeek
     
    1515 */
    1616%>
    17   <g:setProvider library="jquery"/>
    18   <div id="wizard" style="border:1px solid black;">
     17  <div id="wizard" class="wizard">
    1918    <h1>Proof of concept AJAXified Grails Webflow Wizard</h1>
    2019    <g:form action="pages" name="_wizard" >
    21     <div id="wizardContent" style="border:1px solid blue;">
     20    <div id="wizardPage">
    2221      <g:render template="pages/one"/>
    2322    </div>
    24     <div id="wizardError" style="border:1px solid red;">errors go in here</div>
     23    <g:render template="common/error"/>
    2524    </g:form>
    2625  </div>
Note: See TracChangeset for help on using the changeset viewer.