Ignore:
Timestamp:
Jan 14, 2010, 3:00:05 PM (9 years ago)
Author:
duh
Message:
  • refactored the wizard code a bit
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy

    r87 r88  
    1818  static namespace = "wizard"
    1919
     20  // define the AJAX provider to use
     21  static ajaxProvider = "jquery"
     22 
    2023  /**
    2124   * ajaxButton tag, this is a modified version of the default
     
    6265
    6366  /**
    64    * render the wizard navigation button
    65    * @param map attrs (supports: previous="true/false" and next="true/false"
     67   * wizard navigation buttons render wrapper, in order to be able to add
     68   * functionality in the future
    6669   */
    6770  def previousNext = { attrs ->
    68     def buttons = new LinkedHashMap()
    69     buttons.previous  = (attrs.get('previous') == null || (attrs.get('previous') instanceof String && attrs.get('previous') == "true")) ? true : false
    70     buttons.next      = (attrs.get('next') == null || (attrs.get('next') instanceof String && attrs.get('next') == "true")) ? true : false
     71    // define AJAX provider
     72    setProvider([library:ajaxProvider])
    7173
    72     out << render(template:"/wizard/common/buttons", model:[button:buttons])
     74    // render navigation buttons
     75    out << render(template:"/wizard/common/buttons")
     76  }
     77
     78  def pageContent = { attrs, body ->
     79    // define AJAX provider
     80    setProvider([library:ajaxProvider])
     81
     82    // render new body content
     83    out << render(template:"/wizard/common/tabs")
     84    out << '<div class="content">'
     85    out << body()
     86    out << '</div>'
     87    out << render(template:"/wizard/common/navigation")
    7388  }
    7489}
Note: See TracChangeset for help on using the changeset viewer.