OLD | NEW |
(Empty) | |
| 1 <script type="text/javascript" nonce="[nonce]"> |
| 2 runOnLoad(function() { |
| 3 [# Pass the list of column names from HTML to JS ] |
| 4 window._allColumnNames = [ |
| 5 [for column_values]'[column_values.column_name]'[if-index column_values last
][else], [end][end] |
| 6 ]; |
| 7 |
| 8 [# Update the issue link hrefs on-load and whenever the column-spec changes.] |
| 9 _ctxCan = [can]; |
| 10 _ctxQuery = "[format "js"][query][end]"; |
| 11 _ctxSortspec = "[format "js"][sortspec][end]"; |
| 12 _ctxGroupBy = "[format "js"][groupby][end]"; |
| 13 _ctxDefaultColspec = "[format "js"][default_colspec][end]"; |
| 14 _ctxStart = [start]; |
| 15 _ctxNum = [num]; |
| 16 _ctxResultsPerPage = [default_results_per_page]; |
| 17 _ctxArgs = _formatContextQueryArgs(); |
| 18 |
| 19 function _goIssue(issueIndex, newWindow) { |
| 20 var url = _makeIssueLink(issueRefs[[]issueIndex]); |
| 21 _go(url, newWindow); |
| 22 } |
| 23 |
| 24 window.issueRefs = [[] |
| 25 [for table_data] |
| 26 {project_name: "[format "js"][table_data.project_name][end]", |
| 27 id: [table_data.local_id]}[if-index table_data last][else],[end][end] |
| 28 ]; |
| 29 |
| 30 function _handleResultsClick(event) { |
| 31 var target = event.target; |
| 32 if (target.classList.contains("label")) |
| 33 return; |
| 34 if (target.classList.contains("rowwidgets") || target.parentNode.classList.c
ontains("rowwidgets")) |
| 35 return; |
| 36 while (target && target.tagName != "TR") target = target.parentNode; |
| 37 event.preventDefault(); |
| 38 _goIssue(target.attributes[[]"data-idx"].value, |
| 39 (event.metaKey || event.ctrlKey || event.button == 1)); |
| 40 }; |
| 41 $("resultstable").addEventListener("click", _handleResultsClick); |
| 42 |
| 43 function _handleHeaderClick(event) { |
| 44 var target = event.target; |
| 45 while (target && target.tagName != "TH") target = target.parentNode; |
| 46 var colIndex = target.getAttribute("data-col-index"); |
| 47 _showBelow("pop_" + colIndex, target); |
| 48 } |
| 49 $("resultstablehead").addEventListener("click", _handleHeaderClick); |
| 50 }); |
| 51 </script> |
| 52 |
| 53 <script type="text/javascript" defer src="/static/third_party/js/kibbles-1.3.3.c
omp.js" nonce="[nonce]"></script> |
| 54 <script type="text/javascript" nonce="[nonce]"> |
| 55 runOnLoad(function() { |
| 56 _setupKibblesOnListPage( |
| 57 '[project_home_url]/issues/list', |
| 58 '[project_home_url]/issues/entry', |
| 59 '[projectname]', 1, 0, '[set_star_token]'); |
| 60 }); |
| 61 </script> |
OLD | NEW |