Skip to content

Commit

Permalink
[#1401,templates][xs]: set js global CKAN.SITE_URL with h.url('/') ra…
Browse files Browse the repository at this point in the history
…ther than g.site_url.
  • Loading branch information
rufuspollock committed Jan 31, 2012
1 parent 42e8efc commit 5f120a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ckan/templates/layout_base.html
Expand Up @@ -243,7 +243,9 @@ <h3 class="widget-title">Meta</h3>
// Declare js array from Python string
${['\'%s\', '%s for s in config.get('ckan.plugins','').split(' ')]}
];
CKAN.SITE_URL = '${g.site_url}';
CKAN.SITE_URL = '${h.url('/')}';
// later use will add offsets with leading '/' so ensure no trailing slash
CKAN.SITE_URL = CKAN.SITE_URL.replace(/\/$/, '');
$(document).ready(function() {
var ckan_user = $.cookie("ckan_display_name");
if (ckan_user) {
Expand Down

0 comments on commit 5f120a8

Please sign in to comment.