source: trunk/grails-app/taglib/AssetTreeTagLib.groovy @ 967

Last change on this file since 967 was 457, checked in by gav, 14 years ago

Refactor asset tree generation to improve speed by around 4 fold.

File size: 777 bytes
RevLine 
[286]1/**
2* Asset Tree tags.
[308]3* Specific to gnuMims hence the namespace.
[286]4*/
[278]5class AssetTreeTagLib {
[306]6    static namespace = 'gnuMims'
[278]7
[322]8    def js = new JsUtilService()
[457]9    def assetTreeService
[312]10
11    /**
12    * Include required javascript and do setup here.
13    */
[278]14    def resources = { attrs ->
[312]15        out << g.javascript(src: "assetTree.js")
[278]16    }
17
[312]18    /**
19    * Button that opens the asset tree pane and calls the javascript to populate it.
20    */
21    def assetTreeButton = { attrs ->
[457]22        out << assetTreeService.buildAssetTreeButton(attrs)
[312]23    } // assetTreeButton
[306]24
[312]25    /**
26    * The asset tree pane, ready for populating by an ajax call to AssetTreeSevice.
27    */
28    def assetTreePane = { attrs ->
[457]29        out << assetTreeService.buildAssetTreePane(attrs)
30    }
[278]31
32} // end class
Note: See TracBrowser for help on using the repository browser.