X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=templates%2FCRM%2FCase%2FForm%2FCaseView.tpl;h=783d68342cac2d967410e2bd3513e67e26974dd2;hb=66cae70584f43f4d98a9a08b686487f9a0353d00;hp=af815849889c218de0d8602a8471e636aee87fd9;hpb=4c95b949e863281d990ffa2a3104415079e6352d;p=civicrm-core.git
diff --git a/templates/CRM/Case/Form/CaseView.tpl b/templates/CRM/Case/Form/CaseView.tpl
index af81584988..783d68342c 100644
--- a/templates/CRM/Case/Form/CaseView.tpl
+++ b/templates/CRM/Case/Form/CaseView.tpl
@@ -147,7 +147,7 @@
{if $hasAccessToAllCases}
{$form.role_type.label}
@@ -162,7 +162,7 @@
-
+
{ts}Case Role{/ts} |
{ts}Name{/ts} |
@@ -184,63 +184,61 @@
CRM.$(function($) {
buildCaseRoles(false);
- });
-
- function buildCaseRoles(filterSearch) {
- if(filterSearch) {
- oTable.fnDestroy();
- }
- var count = 0;
- var columns = '';
- var sourceUrl = {/literal}"{crmURL p='civicrm/ajax/caseroles' h=0 q='snippet=4&caseID='}{$caseID}"{literal};
- sourceUrl = sourceUrl + '&cid={/literal}{$contactID}{literal}';
- sourceUrl = sourceUrl + '&userID={/literal}{$userID}{literal}';
-
- cj('#caseRoles-selector th').each( function( ) {
- if ( cj(this).attr('id') != 'nosort' ) {
- columns += '{"sClass": "' + cj(this).attr('class') +'"},';
- }
- else {
- columns += '{ "bSortable": false },';
+ function buildCaseRoles(filterSearch) {
+ if(filterSearch) {
+ oTable.fnDestroy();
}
- count++;
- });
-
- columns = columns.substring(0, columns.length - 1 );
- eval('columns =[' + columns + ']');
-
- oTable = cj('#caseRoles-selector').dataTable({
- "bFilter" : false,
- "bAutoWidth" : false,
- "aaSorting" : [],
- "aoColumns" : columns,
- "bProcessing": true,
- "bJQueryUI": true,
- "asStripClasses" : [ "odd-row", "even-row" ],
- "sPaginationType": "full_numbers",
- "sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>',
- "bServerSide": true,
- "sAjaxSource": sourceUrl,
- "iDisplayLength": 10,
- "fnDrawCallback": function() { setCaseRolesSelectorClass(); },
- "fnServerData": function ( sSource, aoData, fnCallback ) {
- cj.ajax({
- "dataType": 'json',
- "type": "POST",
- "url": sSource,
- "data": aoData,
- "success": fnCallback
- });
- }
- });
- }
-
- function setCaseRolesSelectorClass( ) {
- cj("#caseRoles-selector td:last-child").each( function( ) {
- cj(this).parent().addClass(cj(this).text() );
- });
- }
+ var count = 0;
+ var columns = '';
+ var sourceUrl = {/literal}"{crmURL p='civicrm/ajax/caseroles' h=0 q='snippet=4&caseID='}{$caseID}"{literal};
+ sourceUrl = sourceUrl + '&cid={/literal}{$contactID}{literal}';
+ sourceUrl = sourceUrl + '&userID={/literal}{$userID}{literal}';
+
+ $('#caseRoles-selector-{/literal}{$caseID}{literal} th').each( function( ) {
+ if ( $(this).attr('id') != 'nosort' ) {
+ columns += '{"sClass": "' + $(this).attr('class') +'"},';
+ }
+ else {
+ columns += '{ "bSortable": false },';
+ }
+ count++;
+ });
+
+ columns = columns.substring(0, columns.length - 1 );
+ eval('columns =[' + columns + ']');
+
+ oTable = $('#caseRoles-selector-{/literal}{$caseID}{literal}').dataTable({
+ "bFilter" : false,
+ "bAutoWidth" : false,
+ "aaSorting" : [],
+ "aoColumns" : columns,
+ "bProcessing": true,
+ "bJQueryUI": true,
+ "asStripClasses" : [ "odd-row", "even-row" ],
+ "sPaginationType": "full_numbers",
+ "sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>',
+ "bServerSide": true,
+ "sAjaxSource": sourceUrl,
+ "iDisplayLength": 10,
+ "fnDrawCallback": function() { setCaseRolesSelectorClass(); },
+ "fnServerData": function ( sSource, aoData, fnCallback ) {
+ $.ajax({
+ "dataType": 'json',
+ "type": "POST",
+ "url": sSource,
+ "data": aoData,
+ "success": fnCallback
+ });
+ }
+ });
+ }
+ function setCaseRolesSelectorClass( ) {
+ $("#caseRoles-selector-{/literal}{$caseID}{literal} td:last-child").each( function( ) {
+ $(this).parent().addClass($(this).text() );
+ });
+ }
+ });
{/literal}
@@ -258,7 +256,7 @@
{ts}Add client relationship{/ts}
-