Show More
@@ -646,6 +646,12 b' var get_group_name = function(node){' | |||
|
646 | 646 | var name = node.firstElementChild.children[1].innerHTML; |
|
647 | 647 | return name |
|
648 | 648 | } |
|
649 | var get_date = function(node){ | |
|
650 | console.log(node.firstElementChild) | |
|
651 | var date_ = node.firstElementChild.innerHTML; | |
|
652 | return date_ | |
|
653 | } | |
|
654 | ||
|
649 | 655 | var revisionSort = function(a, b, desc, field) { |
|
650 | 656 | |
|
651 | 657 | var a_ = fromHTML(a.getData(field)); |
@@ -692,4 +698,16 b' var groupNameSort = function(a, b, desc,' | |||
|
692 | 698 | var comp = YAHOO.util.Sort.compare; |
|
693 | 699 | var compState = comp(a_, b_, desc); |
|
694 | 700 | return compState; |
|
701 | }; | |
|
702 | var dateSort = function(a, b, desc, field) { | |
|
703 | var a_ = fromHTML(a.getData(field)); | |
|
704 | var b_ = fromHTML(b.getData(field)); | |
|
705 | ||
|
706 | // extract name from table | |
|
707 | a_ = get_date(a_) | |
|
708 | b_ = get_date(b_) | |
|
709 | ||
|
710 | var comp = YAHOO.util.Sort.compare; | |
|
711 | var compState = comp(a_, b_, desc); | |
|
712 | return compState; | |
|
695 | 713 | }; No newline at end of file |
@@ -30,11 +30,49 b'' | |||
|
30 | 30 | </div> |
|
31 | 31 | </div> |
|
32 | 32 | <script type="text/javascript"> |
|
33 | var nodes = YUQ('div.table tr td .logtags .tagtag a'); | |
|
34 | var target = 'q_filter_bookmarks'; | |
|
35 | var func = function(node){ | |
|
36 | return node.parentNode.parentNode.parentNode.parentNode; | |
|
37 | } | |
|
38 | q_filter(target,nodes,func); | |
|
33 | ||
|
34 | // main table sorting | |
|
35 | var myColumnDefs = [ | |
|
36 | {key:"name",label:"${_('Name')}",sortable:true}, | |
|
37 | {key:"date",label:"${_('Date')}",sortable:true, | |
|
38 | sortOptions: { sortFunction: dateSort }}, | |
|
39 | {key:"author",label:"${_('Author')}",sortable:true}, | |
|
40 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
|
41 | sortOptions: { sortFunction: revisionSort }}, | |
|
42 | ]; | |
|
43 | ||
|
44 | var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data")); | |
|
45 | ||
|
46 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
|
47 | ||
|
48 | myDataSource.responseSchema = { | |
|
49 | fields: [ | |
|
50 | {key:"name"}, | |
|
51 | {key:"date"}, | |
|
52 | {key:"author"}, | |
|
53 | {key:"revision"}, | |
|
54 | ] | |
|
55 | }; | |
|
56 | ||
|
57 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
|
58 | { | |
|
59 | sortedBy:{key:"name",dir:"asc"}, | |
|
60 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
|
61 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
|
62 | MSG_EMPTY:"${_('No records found.')}", | |
|
63 | MSG_ERROR:"${_('Data error.')}", | |
|
64 | MSG_LOADING:"${_('Loading...')}", | |
|
65 | } | |
|
66 | ); | |
|
67 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
|
68 | tooltip_activate(); | |
|
69 | var func = function(node){ | |
|
70 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
|
71 | } | |
|
72 | q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func); | |
|
73 | }); | |
|
74 | ||
|
39 | 75 | </script> |
|
76 | ||
|
77 | ||
|
40 | 78 | </%def> No newline at end of file |
@@ -1,11 +1,14 b'' | |||
|
1 |
%if c.repo_bookmarks: |
|
|
2 | <table class="table_disp"> | |
|
1 | %if c.repo_bookmarks: | |
|
2 | <div id="table_wrap" class="yui-skin-sam"> | |
|
3 | <table id="bookmarks_data"> | |
|
4 | <thead> | |
|
3 | 5 | <tr> |
|
4 |
<th class="left">${_(' |
|
|
5 |
<th class="left">${_(' |
|
|
6 |
<th class="left">${_(' |
|
|
7 |
<th class="left">${_(' |
|
|
6 | <th class="left">${_('Name')}</th> | |
|
7 | <th class="left">${_('Date')}</th> | |
|
8 | <th class="left">${_('Author')}</th> | |
|
9 | <th class="left">${_('Revision')}</th> | |
|
8 | 10 | </tr> |
|
11 | </thead> | |
|
9 | 12 | %for cnt,book in enumerate(c.repo_bookmarks.items()): |
|
10 | 13 | <tr class="parity${cnt%2}"> |
|
11 | 14 | <td> |
@@ -24,6 +27,7 b'' | |||
|
24 | 27 | </tr> |
|
25 | 28 | %endfor |
|
26 | 29 | </table> |
|
30 | </div> | |
|
27 | 31 | %else: |
|
28 | 32 | ${_('There are no bookmarks yet')} |
|
29 | 33 | %endif No newline at end of file |
@@ -30,11 +30,48 b'' | |||
|
30 | 30 | </div> |
|
31 | 31 | </div> |
|
32 | 32 | <script type="text/javascript"> |
|
33 | var nodes = YUQ('div.table tr td .logtags .branchtag a'); | |
|
34 | var target = 'q_filter_branches'; | |
|
35 | var func = function(node){ | |
|
36 | return node.parentNode.parentNode.parentNode.parentNode; | |
|
37 | } | |
|
38 | q_filter(target,nodes,func); | |
|
33 | ||
|
34 | // main table sorting | |
|
35 | var myColumnDefs = [ | |
|
36 | {key:"name",label:"${_('Name')}",sortable:true}, | |
|
37 | {key:"date",label:"${_('Date')}",sortable:true, | |
|
38 | sortOptions: { sortFunction: dateSort }}, | |
|
39 | {key:"author",label:"${_('Author')}",sortable:true}, | |
|
40 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
|
41 | sortOptions: { sortFunction: revisionSort }}, | |
|
42 | ]; | |
|
43 | ||
|
44 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); | |
|
45 | ||
|
46 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
|
47 | ||
|
48 | myDataSource.responseSchema = { | |
|
49 | fields: [ | |
|
50 | {key:"name"}, | |
|
51 | {key:"date"}, | |
|
52 | {key:"author"}, | |
|
53 | {key:"revision"}, | |
|
54 | ] | |
|
55 | }; | |
|
56 | ||
|
57 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
|
58 | { | |
|
59 | sortedBy:{key:"name",dir:"asc"}, | |
|
60 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
|
61 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
|
62 | MSG_EMPTY:"${_('No records found.')}", | |
|
63 | MSG_ERROR:"${_('Data error.')}", | |
|
64 | MSG_LOADING:"${_('Loading...')}", | |
|
65 | } | |
|
66 | ); | |
|
67 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
|
68 | tooltip_activate(); | |
|
69 | var func = function(node){ | |
|
70 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
|
71 | } | |
|
72 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); | |
|
73 | }); | |
|
74 | ||
|
39 | 75 | </script> |
|
76 | ||
|
40 | 77 | </%def> No newline at end of file |
@@ -1,11 +1,14 b'' | |||
|
1 | 1 | %if c.repo_branches: |
|
2 | <table class="table_disp"> | |
|
2 | <div id="table_wrap" class="yui-skin-sam"> | |
|
3 | <table id="branches_data"> | |
|
4 | <thead> | |
|
3 | 5 | <tr> |
|
4 | 6 | <th class="left">${_('name')}</th> |
|
5 | 7 | <th class="left">${_('date')}</th> |
|
6 | 8 | <th class="left">${_('author')}</th> |
|
7 | 9 | <th class="left">${_('revision')}</th> |
|
8 | 10 | </tr> |
|
11 | </thead> | |
|
9 | 12 | %for cnt,branch in enumerate(c.repo_branches.items()): |
|
10 | 13 | <tr class="parity${cnt%2}"> |
|
11 | 14 | <td> |
@@ -43,6 +46,7 b'' | |||
|
43 | 46 | %endfor |
|
44 | 47 | %endif |
|
45 | 48 | </table> |
|
49 | </div> | |
|
46 | 50 | %else: |
|
47 | 51 | ${_('There are no branches yet')} |
|
48 | 52 | %endif No newline at end of file |
@@ -30,11 +30,47 b'' | |||
|
30 | 30 | </div> |
|
31 | 31 | </div> |
|
32 | 32 | <script type="text/javascript"> |
|
33 | var nodes = YUQ('div.table tr td .logtags .tagtag a'); | |
|
34 | var target = 'q_filter_tags'; | |
|
35 | var func = function(node){ | |
|
36 | return node.parentNode.parentNode.parentNode.parentNode; | |
|
37 | } | |
|
38 | q_filter(target,nodes,func); | |
|
33 | ||
|
34 | // main table sorting | |
|
35 | var myColumnDefs = [ | |
|
36 | {key:"name",label:"${_('Name')}",sortable:true}, | |
|
37 | {key:"date",label:"${_('Date')}",sortable:true, | |
|
38 | sortOptions: { sortFunction: dateSort }}, | |
|
39 | {key:"author",label:"${_('Author')}",sortable:true}, | |
|
40 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
|
41 | sortOptions: { sortFunction: revisionSort }}, | |
|
42 | ]; | |
|
43 | ||
|
44 | var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data")); | |
|
45 | ||
|
46 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
|
47 | ||
|
48 | myDataSource.responseSchema = { | |
|
49 | fields: [ | |
|
50 | {key:"name"}, | |
|
51 | {key:"date"}, | |
|
52 | {key:"author"}, | |
|
53 | {key:"revision"}, | |
|
54 | ] | |
|
55 | }; | |
|
56 | ||
|
57 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
|
58 | { | |
|
59 | sortedBy:{key:"name",dir:"asc"}, | |
|
60 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
|
61 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
|
62 | MSG_EMPTY:"${_('No records found.')}", | |
|
63 | MSG_ERROR:"${_('Data error.')}", | |
|
64 | MSG_LOADING:"${_('Loading...')}", | |
|
65 | } | |
|
66 | ); | |
|
67 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
|
68 | tooltip_activate(); | |
|
69 | var func = function(node){ | |
|
70 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
|
71 | } | |
|
72 | q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func); | |
|
73 | }); | |
|
74 | ||
|
39 | 75 | </script> |
|
40 | 76 | </%def> No newline at end of file |
@@ -1,11 +1,14 b'' | |||
|
1 |
%if c.repo_tags: |
|
|
2 | <table class="table_disp"> | |
|
1 | %if c.repo_tags: | |
|
2 | <div id="table_wrap" class="yui-skin-sam"> | |
|
3 | <table id="tags_data"> | |
|
4 | <thead> | |
|
3 | 5 | <tr> |
|
4 |
<th class="left">${_(' |
|
|
5 |
<th class="left">${_(' |
|
|
6 |
<th class="left">${_(' |
|
|
7 |
<th class="left">${_(' |
|
|
6 | <th class="left">${_('Name')}</th> | |
|
7 | <th class="left">${_('Date')}</th> | |
|
8 | <th class="left">${_('Author')}</th> | |
|
9 | <th class="left">${_('Revision')}</th> | |
|
8 | 10 | </tr> |
|
11 | </thead> | |
|
9 | 12 | %for cnt,tag in enumerate(c.repo_tags.items()): |
|
10 | 13 | <tr class="parity${cnt%2}"> |
|
11 | 14 | <td> |
@@ -22,9 +25,10 b'' | |||
|
22 | 25 | <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id)}">r${tag[1].revision}:${h.short_id(tag[1].raw_id)}</a></pre> |
|
23 | 26 | </div> |
|
24 | 27 | </td> |
|
25 |
</tr> |
|
|
28 | </tr> | |
|
26 | 29 | %endfor |
|
27 | 30 | </table> |
|
31 | </div> | |
|
28 | 32 | %else: |
|
29 | 33 | ${_('There are no tags yet')} |
|
30 | 34 | %endif No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now