~work-items-tracker-hackers/launchpad-work-items-tracker/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<%namespace name="util" file="util.html"/>
<!DOCTYPE HTML> 
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>${self.title()}</title>
  <link rel="shortcut icon" href="${util.url('favicon.ico')}" type="image/ico" />
  <link rel="icon" href="${util.url('favicon.ico')}" type="image/ico" />
  <link rel="stylesheet" type="text/css" href="${util.url('status.css')}" />
  <link rel="stylesheet" type="text/css" href="${util.url('theme.css')}" />


  <script type="text/javascript" src="${util.url('jquery.min.js')}"></script>
  <script type="text/javascript" src="${util.url('jquery.tablesorter.min.js')}"></script>
  <script type="text/javascript" src="${util.url('jquery.flot.js')}"></script>
  <script type="text/javascript" src="${util.url('jquery.flot.pie.js')}"></script>
  <script type="text/javascript" src="${util.url('jquery.tooltip.pack.js')}"></script>
  <script type="text/javascript" src="${util.url('script.js')}"></script>

  <script type="text/javascript">
    // documentation at: http://tablesorter.com/

    $(document).ready( function() {
        // add parser through the tablesorter addParser method
        $.tablesorter.addParser({
            // set a unique id
            id: 'priority',
            is: function(s) {
                // return false so this parser is not auto detected
                return false;
            },
            format: function(s) {
                // format your data for normalization
                return s.toLowerCase()
                    .replace(/essential/,5)
                    .replace(/high/,4)
                    .replace(/medium/,3)
                    .replace(/low/,2)
                    .replace(/undefined/,1)
                    .replace(/not/,0);

            },
            // set type, either numeric or text
            type: 'numeric'
        });

        $.tablesorter.addParser({
            // set a unique id
            id: 'completion',
            is: function(s) {
                // return false so this parser is not auto detected
                return false;
            },
            format: function(s) {
                // format your data for normalization
                return s.replace(/^(\d+).*/,'\1');

            },
            // set type, either numeric or text
            type: 'numeric'
        });

        // order they appear on the page
        $("#byspecification.with_complexity").tablesorter({
            // sort on priority, spec ascending
            sortList: [[8,1],[0,0]],
            headers: {
                7: { sorter:'completion' },
                8: { sorter:'priority' }
            }
        });

        $("#byspecification.without_complexity").tablesorter({
            // sort on priority, spec ascending
            sortList: [[7,1],[0,0]],
            headers: {
                6: { sorter:'completion' },
                7: { sorter:'priority' }
            }
        });

        // order they appear on the page
        $("table.spec_group").tablesorter({
            // sort on priority, spec ascending
            sortList: [[2,1],[0,0]],
            headers: {
                1: { sorter:'completion' },
                2: { sorter:'priority' }
            }
        });

	$("#contributing_bps").tablesorter({
	    sortList: [[2,1],[0,0]],
            headers: {
                1: { sorter:'completion' },
                2: { sorter:'priority' }
            }
	});

        $("#byassignee.with_complexity").tablesorter({
            // sort on name, ascending
            sortList: [[0,0]],
            headers: {
                7: { sorter:'completion' },
            }
        });

        $("#byassignee.without_complexity").tablesorter({
            // sort on name, ascending
            sortList: [[0,0]],
            headers: {
                6: { sorter:'completion' },
            }
        });

        $(".workitems_in_status").tablesorter({
            // sort on priority, then blueprint, then assignee
            sortList: [[1,1],[0,0],[2,0]],
                headers: {
                    1: { sorter:'priority' }
                }
        });

        // with the 'todo/done' and assignee not appearing on every
        // row, this does not lend itself well to sorting
        //$("#byworkitem").tablesorter();

    });
  </script>
</head>

${next.body()}
</html>