Merge pull request #5687 from relldoesphp/ckeditor_fix
[civicrm-core.git] / templates / CRM / Case / Page / DashboardSelector.tpl
index 3dddbdd597210c732d06fa82310834b66ed4e0ae..1e7d99e82ab4f1109e40311e2ecd1c23216ab841 100644 (file)
@@ -2,7 +2,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 <script type="text/javascript">
 function {/literal}{$context}{$list}{literal}CaseDetails( caseId, contactId, type, context )
 {
-    var dataUrl = {/literal}"{crmURL p='civicrm/case/details' h=0 q='snippet=4&caseId='}{literal}" + caseId +'&cid=' + contactId + '&type=' + type;
-    cj.ajax({
-            url     : dataUrl,
-            dataType: "html",
-            timeout : 5000, //Time in milliseconds
-            success : function( data ){
-                  cj( '#'+ context + '-' + type +'-casedetails-' + caseId ).html( data );
-                      },
-            error   : function( XMLHttpRequest, textStatus, errorThrown ) {
-                        CRM.console('error', 'Error: ', textStatus);
-                      }
-         });
+    var dataUrl = CRM.url('civicrm/case/details', {caseId: caseId, cid: contactId, type: type});
+    CRM.loadPage(dataUrl, {target: '#'+ context + '-' + type +'-casedetails-' + caseId});
 }
 
 function showCaseActivities( caseId, type, context ) {
@@ -146,5 +136,3 @@ function hideCaseActivities( caseId , type, context ) {
 
 </script>
 {/literal}
-
-{include file="CRM/Case/Form/ActivityChangeStatusJs.tpl"}