Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
2c4c49ca | 3 | | CiviCRM version 4.7 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
e7112fa7 | 5 | | Copyright CiviCRM LLC (c) 2004-2015 | |
6a488035 TO |
6 | +--------------------------------------------------------------------+ |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
9 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
10 | | under the terms of the GNU Affero General Public License | | |
11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
12 | | | | |
13 | | CiviCRM is distributed in the hope that it will be useful, but | | |
14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
16 | | See the GNU Affero General Public License for more details. | | |
17 | | | | |
18 | | You should have received a copy of the GNU Affero General Public | | |
19 | | License and the CiviCRM Licensing Exception along | | |
20 | | with this program; if not, contact CiviCRM LLC | | |
21 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
22 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
24 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | <div class="messages status float-right no-popup"> | |
27 | {ts}Total Recipients:{/ts} <strong>{$count|crmNumberFormat}</strong> | |
28 | </div> | |
29 | {if $action eq 256 & $ssid eq null} | |
30 | <div class="status float-right"> | |
31 | <div id="popupContainer"> | |
32 | <table id="selectedRecords" class="display crm-copy-fields"> | |
33 | <thead> | |
34 | <tr class="columnheader"> | |
35 | <th class="contact_details">Name</th> | |
36 | </tr> | |
37 | </thead> | |
38 | ||
39 | <tbody> | |
40 | {foreach from=$value item='row'} | |
41 | <tr class="{cycle values="odd-row,even-row"}"> | |
42 | <td class="name">{$row}</td> | |
43 | {/foreach} | |
44 | </tr> | |
45 | </tbody> | |
46 | </table> | |
47 | </div> | |
48 | <a href="#" id="button"title="Contacts selected in the Find Contacts page"> {ts}View Selected Contacts{/ts}</a> | |
49 | </div> | |
50 | {literal} | |
51 | <script type="text/javascript"> | |
6a488035 | 52 | |
ae8f569f CW |
53 | CRM.$(function($) { |
54 | $("#popupContainer").hide(); | |
55 | $("#button").click(function() { | |
56 | $("#popupContainer").dialog({ | |
f3b62cc1 | 57 | title: {/literal}"{ts escape='js'}Selected Contacts{/ts}"{literal}, |
ae8f569f CW |
58 | width:700, |
59 | height:500, | |
60 | modal: true | |
61 | }); | |
62 | }); | |
63 | var count = 0; var columns=''; var sortColumn = ''; | |
6a488035 | 64 | |
ae8f569f CW |
65 | $('#selectedRecords th').each( function( ) { |
66 | if ( $(this).attr('class') == 'contact_details' ) { | |
67 | sortColumn += '[' + count + ', "asc" ],'; | |
68 | columns += '{"sClass": "contact_details"},'; | |
69 | } else { | |
70 | columns += '{ "bSortable": false },'; | |
71 | } | |
72 | count++; | |
73 | }); | |
6a488035 | 74 | |
ae8f569f CW |
75 | columns = columns.substring(0, columns.length - 1 ); |
76 | sortColumn = sortColumn.substring(0, sortColumn.length - 1 ); | |
77 | eval('sortColumn =[' + sortColumn + ']'); | |
78 | eval('columns =[' + columns + ']'); | |
6a488035 | 79 | |
ae8f569f CW |
80 | //load jQuery data table. |
81 | $('#selectedRecords').dataTable( { | |
82 | "sPaginationType": "full_numbers", | |
83 | "bJQueryUI" : true, | |
84 | "aaSorting" : sortColumn, | |
85 | "aoColumns" : columns, | |
86 | "bFilter" : false | |
6a488035 TO |
87 | }); |
88 | ||
ae8f569f CW |
89 | }); |
90 | ||
6a488035 TO |
91 | </script> |
92 | {/literal} | |
93 | {/if} |