This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val MustBeAdmin = If(() => User.superUser_?, "") | |
| val entries = List(Menu("Home") / "index" >> LocGroup("main"), | |
| Menu("Page 3") / "page3" >> LocGroup("main") >> PlaceHolder submenus ( | |
| Menu("Page 3a") / "page3a" , | |
| Menu("Page 3b") / "page3b" , | |
| Menu("Page 3c") / "page3c", | |
| Menu("Admin 4") / "admin4" >> MustBeAdmin ), | |
| Menu("Admin") / "dummyAdmin" >> MustBeAdmin >> LocGroup("main") >> PlaceHolder submenus ( | |
| Menu("Admin 1") / "admin1" , |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // a utility class for building up the bits that encodes a char as we trawl down the CodeTree | |
| case class Coding(char: Char, bits: List[Bit]) { | |
| def addBit(b: Bit): Coding = this.copy(bits = b :: bits) | |
| } | |
| // this method builds up a list of codings for each character in the tree. E.g | |
| // for a input of Fork(Fork(Leaf('a', 2), Leaf('b', 3), List('a', 'b'), 5), Leaf('d', 4), List('a', 'b', 'd'), 9) | |
| // it returns List(Coding(a,List(0, 0)), Coding(b,List(0, 1)), Coding(d,List(1))) | |
| // | |
| // recurse down the tree, at each fork, add '0' to each bit pattern from the codings formed from the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready( function() { | |
| $('#container_id').fileTree({ | |
| root: '/some/folder/', | |
| script: 'jqueryFileTree.asp', | |
| expandSpeed: 1000, | |
| collapseSpeed: 1000, | |
| multiFolder: false | |
| }, function(file) { | |
| alert(file); | |
| }); |
OlderNewer