From 8053ab8a35f73e98b1e0edfa2d36a468719a742a Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 13 Apr 2013 13:57:18 -0700 Subject: [PATCH] Move CRM.url init out of template CRM-12339 --- CRM/Core/Resources.php | 5 +++++ templates/CRM/common/scripts.tpl | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index c6a1096d69..e2f18b9a7f 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -445,6 +445,11 @@ class CRM_Core_Resources { } } + // Initialize CRM.url + $url = CRM_Utils_System::url('civicrm/example', 'placeholder', FALSE, NULL, FALSE); + $js = "CRM.url('init', '$url');"; + $this->addScript($js, $jsWeight++, $region); + // Give control of jQuery back to the CMS - this loads last $this->addScriptFile('civicrm', 'js/noconflict.js', 9999, $region, FALSE); diff --git a/templates/CRM/common/scripts.tpl b/templates/CRM/common/scripts.tpl index 26ba526b1d..1d9dfb154b 100644 --- a/templates/CRM/common/scripts.tpl +++ b/templates/CRM/common/scripts.tpl @@ -25,9 +25,6 @@ *}