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

Last change on this file since 785 was 457, checked in by gav, 15 years ago

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

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