From: Coleman Watts Date: Sat, 13 Apr 2013 20:57:18 +0000 (-0700) Subject: Move CRM.url init out of template CRM-12339 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8053ab8a35f73e98b1e0edfa2d36a468719a742a;p=civicrm-core.git Move CRM.url init out of template CRM-12339 --- 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 @@ *}