Tidy up title attributes
[civicrm-core.git] / templates / CRM / Mailing / Form / Count.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 <div class="messages status float-right no-popup">
11 {ts}Total Recipients:{/ts} <strong>{$count|crmNumberFormat}</strong>
12 </div>
13 {if $action eq 256 & $ssid eq null}
14 <div class="status float-right">
15 <div id="popupContainer">
16 <table id="selectedRecords" class="display crm-copy-fields">
17 <thead>
18 <tr class="columnheader">
19 <th class="contact_details">Name</th>
20 </tr>
21 </thead>
22
23 <tbody>
24 {foreach from=$value item='row'}
25 <tr class="{cycle values="odd-row,even-row"}">
26 <td class="name">{$row}</td>
27 {/foreach}
28 </tr>
29 </tbody>
30 </table>
31 </div>
32 <a href="#" id="button" title="{ts}Contacts selected in the Find Contacts page{/ts}"> {ts}View Selected Contacts{/ts}</a>
33 </div>
34 {literal}
35 <script type="text/javascript">
36
37 CRM.$(function($) {
38 $("#popupContainer").hide();
39 $("#button").click(function() {
40 $("#popupContainer").dialog({
41 title: {/literal}"{ts escape='js'}Selected Contacts{/ts}"{literal},
42 width:700,
43 height:500,
44 modal: true
45 });
46 });
47 var count = 0; var columns=''; var sortColumn = '';
48
49 $('#selectedRecords th').each( function( ) {
50 if ( $(this).attr('class') == 'contact_details' ) {
51 sortColumn += '[' + count + ', "asc" ],';
52 columns += '{"sClass": "contact_details"},';
53 } else {
54 columns += '{ "bSortable": false },';
55 }
56 count++;
57 });
58
59 columns = columns.substring(0, columns.length - 1 );
60 sortColumn = sortColumn.substring(0, sortColumn.length - 1 );
61 eval('sortColumn =[' + sortColumn + ']');
62 eval('columns =[' + columns + ']');
63
64 //load jQuery data table.
65 $('#selectedRecords').dataTable( {
66 "sPaginationType": "full_numbers",
67 "bJQueryUI" : true,
68 "aaSorting" : sortColumn,
69 "aoColumns" : columns,
70 "bFilter" : false
71 });
72
73 });
74
75 </script>
76 {/literal}
77 {/if}