Ignore:
Timestamp:
Jun 8, 2010, 4:28:09 PM (14 years ago)
Author:
gav
Message:

New defaultSort for Tasks, sort by status then priority then target start date.
Small improvement to custom:sortableColumnWithImg to allow imgTitle to be specified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/CustomTagLib.groovy

    r417 r582  
    173173
    174174        // Image.
    175         def imgSrc = attrs.remove("imgSrc")
    176         def imgAlt = attrs.remove("imgAlt")
    177         def img = "<img src=${imgSrc} alt=${imgAlt} />"
     175        def img = "<img "
     176        def imgAttrs = [:]
     177        imgAttrs.src = attrs.remove("imgSrc")
     178        imgAttrs.alt = attrs.remove("imgAlt")
     179        imgAttrs.title = attrs.remove("imgTitle")
     180        imgAttrs.each { k, v ->
     181            if(v)
     182                img += "${k}=\"${v.encodeAsHTML()}\" "
     183        }
     184        img += "/>"
    178185
    179186        writer << "<th "
     
    184191        }
    185192        writer << ">${link(action:action, params:linkParams) { img } }"
    186 //         writer << body()
    187193        writer << "</th>"
    188     }
     194
     195    } // sortableColumnWithImg
    189196
    190197} // end class
Note: See TracChangeset for help on using the changeset viewer.