Load home dashboard faster
[civicrm-core.git] / templates / CRM / common / dashboard.tpl
index 7c922c7d5361d02763ccadc1939a1660491355bb..e009699bb326939e6f4ddf5dd4e0cb5fc2b1be1e 100644 (file)
@@ -38,22 +38,11 @@ CRM.$(function($) {
     // Required.
     emptyPlaceholderInner: '',
 
+    widgetsByColumn: {/literal}{$contactDashlets|@json_encode}{literal},
+
     // These define the urls and data objects used for all of the ajax requests to the server.
-    // data objects are extended with more properties, as defined below.
-    // All are required.  All should return JSON.
     ajaxCallbacks: {
 
-      // Server returns the configuration of widgets for this user;
-      // An array (keyed by zero-indexed column ID), of arrays (keyed by widget ID) of
-      // booleans; true if the widget is minimized.  False if not.
-      // E.g. [{ widgetID: isMinimized, ...}, ...]
-      getWidgetsByColumn: {
-        url:  {/literal}'{crmURL p='civicrm/ajax/dashboard' h=0 }'{literal},
-        data: {
-          op: 'get_widgets_by_column', key: {/literal}"{crmKey name='civicrm/ajax/dashboard'}"{literal}
-        }
-      },
-
       // Given the widget ID, the server returns the widget object as an associative array.
       // E.g. {content: '<p>Widget content</p>', title: 'Widget Title', }
       //