Only load tableHeader.js for authorized users
authorColeman Watts <coleman@civicrm.org>
Tue, 6 Dec 2016 23:22:38 +0000 (18:22 -0500)
committerColeman Watts <coleman@civicrm.org>
Tue, 6 Dec 2016 23:22:38 +0000 (18:22 -0500)
CRM/Core/Resources.php

index 847ae601d2291ad9b0a7478bd281c8f8fe1d7404..0e89d4c6766fb1ed1f37721ce91b617be9ffbd01 100644 (file)
@@ -712,7 +712,6 @@ class CRM_Core_Resources {
       "bower_components/select2/select2.min.js",
       "bower_components/select2/select2.min.css",
       "bower_components/font-awesome/css/font-awesome.min.css",
-      "packages/jquery/plugins/jquery.tableHeader.js",
       "packages/jquery/plugins/jquery.form.min.js",
       "packages/jquery/plugins/jquery.timeentry.min.js",
       "packages/jquery/plugins/jquery.blockUI.min.js",
@@ -738,6 +737,7 @@ class CRM_Core_Resources {
 
     // These scripts are only needed by back-office users
     if (CRM_Core_Permission::check('access CiviCRM')) {
+      $items[] = "packages/jquery/plugins/jquery.tableHeader.js";
       $items[] = "packages/jquery/plugins/jquery.menu.min.js";
       $items[] = "css/civicrmNavigation.css";
       $items[] = "packages/jquery/plugins/jquery.jeditable.min.js";