").addClass("sidebar-inject-" + options.position).css(icss);
71 |
72 | //body
73 | var b = $("
").addClass("sidebar-body").css(bcss).hide();
74 |
75 | //menu events
76 | var isEnter;
77 | $(this).addClass("sidebar-menu").find("li,li *").mouseenter(function(){
78 | if (!isEnter) return;
79 | $(this).animate(options.liMouseOver, 250);
80 | }).mouseleave(function(){
81 | $(this).animate(options.liMouseOut, 250);
82 | });
83 |
84 | //container events
85 | var isProcessing;
86 | c.bind(options.open,function(){
87 | if (isEnter) return;
88 | if (isProcessing) return;
89 | isEnter = true;
90 | isProcessing = true;
91 | c.animate(e, {
92 | duration: 200,
93 | complete: function(){
94 | i.fadeOut(200, function(){
95 | b.show("clip", 200,function(){
96 | isProcessing = false;
97 | });
98 | });
99 | }
100 | });
101 | }).bind(options.close,function(){
102 | if(!isEnter) return;
103 | if(isProcessing) return;
104 | isProcessing = true;
105 | c.animate(l, {
106 | duration: 200,
107 | complete: function(){
108 | b.hide("clip", 200, function(){
109 | i.fadeIn(200, function(){
110 | isEnter = false;
111 | isProcessing = false;
112 | });
113 | });
114 | }
115 | });
116 | });
117 |
118 | //append to body
119 | b.append(this);
120 | c.append(b);
121 | c.append(i);
122 | $(document.body).append(c);
123 | $(window).resize(function(){
124 | if(options.position == "left" || options.position == "right") {
125 | c.css({top:($(this).height()/2) - (options.height/2) + "px"});
126 | } else {
127 | c.css({left:($(this).width()/2) - (options.width/2) + "px"});
128 | }
129 | });
130 | });
131 | }
132 | })(jQuery);
--------------------------------------------------------------------------------
/templates/js/review.js:
--------------------------------------------------------------------------------
1 | function switchLine(lineId) {
2 | $('#' + lineId).effect("highlight", {color: ''}, 3000);
3 | }
4 |
5 | function initReview() {
6 | $('.hasIssues').cluetip({
7 | positionBy: 'mouse',
8 | splitTitle: '|',
9 | activation: 'hover',
10 | dropShadow: false,
11 | tracking: true,
12 | cluetipClass: 'default'
13 | });
14 |
15 | $("div#sidebar").sidebar({
16 | width:600,
17 | height: 400,
18 | open : "click",
19 | position: "right"
20 | });
21 |
22 | $("div#sidebar a").click(function(event) {
23 | event.preventDefault();
24 | $(document).scrollTop($(this.hash).offset().top);
25 | });
26 | }
27 |
--------------------------------------------------------------------------------
/templates/js/tree.js:
--------------------------------------------------------------------------------
1 | function linkClickedFunction(event) {
2 | event.preventDefault();
3 | target = $(this).attr('href');
4 | $.History.go(target);
5 | }
6 |
7 | // detect if the browser decodes hash values
8 | //
9 | // eg Firfox automaticly decodes hash values:
10 | // https://bugzilla.mozilla.org/show_bug.cgi?id=483304
11 | //
12 | // take solution to emulate the behaviour form here:
13 | // http://stackoverflow.com/questions/3213531/creating-a-new-location-object-in-javascript
14 | function browserDecodesHash() {
15 | var testHash = "#%20",
16 | url = document.createElement("a");
17 | url.href = testHash;
18 | return url.hash !== testHash;
19 | }
20 |
21 | $.History.bind(function (state) {
22 | $('.sidebar-container-right').remove();
23 | $('#cluetip').remove();
24 | $('#cluetip-waitimage').remove();
25 |
26 | if (state == '' || state.match('/index.html$') == '/index.html') {
27 | $('#contentBox').html('
Loading...
').load('index.html' + ' #fileList', function() {
28 | $('#fileList .fileLink').click(linkClickedFunction);
29 | });
30 | } else {
31 | // check if we have to reencode the url
32 | if (browserDecodesHash()) {
33 | state = encodeURI(state);
34 | }
35 | // Go to specific review
36 | $('#contentBox').empty().load(state + ' #review', initReview);
37 | }
38 | });
39 |
40 | $(function() {
41 | $("#treeToggle").click().toggle(function() {
42 | $("#tree").animate({width: "hide", opacity: "hide"}, "slow");
43 | $("#treeToggle").css('background-image', "url('img/treeToggle-collapsed.png')");
44 | }, function() {
45 | $("#tree").animate({width: "show", opacity: "show"}, "slow");
46 | $("#treeToggle").css('background-image', "url('img/treeToggle-extended.png')");
47 | });
48 |
49 | $("#tree").bind("loaded.jstree", function(event, data) {
50 | $("#tree").animate({width: "show", opacity: "show"}, "slow");
51 | }).jstree({
52 | "plugins" : ["html_data", "themes"]
53 | });
54 |
55 | $(".treeDir").click(function() {
56 | $("#tree").jstree("toggle_node", this);
57 | });
58 |
59 | // When the user clicks on a leaf item in the tree (representing a file)
60 | // or an item in the fileList, want to hide the filelist/the currently
61 | // shown review and display the correct review.
62 | $(".fileLink").click(linkClickedFunction);
63 | });
64 |
65 |
--------------------------------------------------------------------------------
/templates/noErrors.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
PHP CodeBrowser
6 |
7 |
8 |
PHP CodeBrowser Summary
9 |
No files could be found
10 | See the output of the script for more information.
11 |
12 |
13 |
--------------------------------------------------------------------------------
/templates/review.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Mayflower Code Browser - Source Code
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
84 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------