Lines 16-31
Link Here
|
16 |
</title> |
16 |
</title> |
17 |
[% INCLUDE 'doc-head-close.inc' %] |
17 |
[% INCLUDE 'doc-head-close.inc' %] |
18 |
[% INCLUDE 'calendar.inc' %] |
18 |
[% INCLUDE 'calendar.inc' %] |
19 |
[% IF ( op_else ) %] <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> |
19 |
[% IF ( op_else ) %] |
|
|
20 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
21 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> |
22 |
[% INCLUDE 'datatables-strings.inc' %] |
23 |
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> |
20 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
24 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
21 |
<script type="text/javascript"> |
25 |
<script type="text/javascript"> |
22 |
// <![CDATA[ |
26 |
// <![CDATA[ |
23 |
$.tablesorter.addParser({ |
|
|
24 |
id: 'articles', |
25 |
is: function(s) {return false; }, |
26 |
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, |
27 |
type: 'text' |
28 |
}); |
29 |
/** |
27 |
/** |
30 |
* displayOther. |
28 |
* displayOther. |
31 |
* This function display the select or an textaera to write a reason. |
29 |
* This function display the select or an textaera to write a reason. |
Lines 36-61
function displayOther(id,show,hide){
Link Here
|
36 |
} |
34 |
} |
37 |
$(document).ready(function() { |
35 |
$(document).ready(function() { |
38 |
$('#suggestiontabs').tabs({ |
36 |
$('#suggestiontabs').tabs({ |
39 |
select: function(ui) { |
37 |
// Correct table sizing for tables hidden in tabs |
40 |
$("#loadingtab").show(); |
38 |
// http://www.datatables.net/examples/api/tabs_and_scrolling.html |
41 |
}, |
39 |
"show": function(event, ui) { |
42 |
show: function(ui) { |
40 |
var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable(); |
43 |
$("#loadingtab").hide(); |
41 |
if ( oTable.length > 0 ) { |
|
|
42 |
oTable.fnAdjustColumnSizing(); |
43 |
} |
44 |
} |
44 |
} |
45 |
}); |
45 |
}); |
46 |
$.tablesorter.defaults.widgets = ['zebra']; |
46 |
$(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, { |
47 |
|
47 |
"aoColumnDefs": [ |
|
|
48 |
{ "aTargets": [ 0, -1, -2 ], "bSortable": false, "bSearchable": false }, |
49 |
], |
50 |
"aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], |
51 |
"iDisplayLength": 20, |
52 |
"sPaginationType": "four_button" |
53 |
})); |
48 |
[% FOREACH suggestion IN suggestions %] |
54 |
[% FOREACH suggestion IN suggestions %] |
49 |
// functions for [% suggestion.suggestiontype %] interactions |
55 |
// functions for [% suggestion.suggestiontype %] interactions |
50 |
$("#[% suggestion.suggestiontype %]t").tablesorter({[% IF ( dateformat == 'metric' ) %] |
56 |
$("#CheckAll[% suggestion.suggestiontype %]").click(function(e){ |
51 |
dateFormat: 'uk',[% END %] |
|
|
52 |
headers: {0:{sorter: false}, 1: { sorter: 'articles' },5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false},9:{sorter: false},10:{sorter: false}} |
53 |
}); |
54 |
$("#CheckAll[% suggestion.suggestiontype %]").click(function(){ |
55 |
$("#[% suggestion.suggestiontype %]t").checkCheckboxes(); |
57 |
$("#[% suggestion.suggestiontype %]t").checkCheckboxes(); |
|
|
58 |
e.preventDefault(); |
56 |
}); |
59 |
}); |
57 |
$("#UncheckAll[% suggestion.suggestiontype %]").click(function(){ |
60 |
$("#UncheckAll[% suggestion.suggestiontype %]").click(function(e){ |
58 |
$("#[% suggestion.suggestiontype %]t").unCheckCheckboxes(); |
61 |
$("#[% suggestion.suggestiontype %]t").unCheckCheckboxes(); |
|
|
62 |
e.preventDefault(); |
59 |
}); |
63 |
}); |
60 |
$("#other_reason[% suggestion.suggestiontype %]").hide(); |
64 |
$("#other_reason[% suggestion.suggestiontype %]").hide(); |
61 |
$("input[name*=other_reason[% suggestion.suggestiontype %]]").focus(function(){ $(this).val(""); }); |
65 |
$("input[name*=other_reason[% suggestion.suggestiontype %]]").focus(function(){ $(this).val(""); }); |
Lines 359-366
$(document).ready(function() { calcNewsuggTotal(); });
Link Here
|
359 |
<h1>Suggestions management</h1> |
363 |
<h1>Suggestions management</h1> |
360 |
|
364 |
|
361 |
[% UNLESS ( notabs ) %] |
365 |
[% UNLESS ( notabs ) %] |
362 |
<div id="sorting" class="overlay">Sorting...</div> |
|
|
363 |
<div id="loadingtab" class="overlay">Loading tab...</div> |
364 |
<div id="suggestiontabs" class="toptabs"> |
366 |
<div id="suggestiontabs" class="toptabs"> |
365 |
<ul class="ui-tabs-nav"> |
367 |
<ul class="ui-tabs-nav"> |
366 |
[% FOREACH suggestion IN suggestions %] |
368 |
[% FOREACH suggestion IN suggestions %] |
Lines 383-389
$(document).ready(function() { calcNewsuggTotal(); });
Link Here
|
383 |
|
385 |
|
384 |
[% IF ( suggestion.suggestions_loop ) %] |
386 |
[% IF ( suggestion.suggestions_loop ) %] |
385 |
<p><a id="CheckAll[% suggestion.suggestiontype %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype %]" href="#">Uncheck all</a></p> |
387 |
<p><a id="CheckAll[% suggestion.suggestiontype %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype %]" href="#">Uncheck all</a></p> |
386 |
<table id="[% suggestion.suggestiontype %]t"> |
388 |
<table id="[% suggestion.suggestiontype %]t" class="sorted"> |
387 |
<thead> |
389 |
<thead> |
388 |
<tr><th> </th> |
390 |
<tr><th> </th> |
389 |
<th>Suggestion</th> |
391 |
<th>Suggestion</th> |
390 |
- |
|
|