[ckan-changes] [okfn/ckan] ba48fb: [xs][scripts] bug fix: prepend CKAN.SITE_URL to re...

GitHub noreply at github.com
Tue Apr 17 13:17:43 UTC 2012


  Branch: refs/heads/master
  Home:   https://github.com/okfn/ckan
  Commit: ba48fb51a868ffb5668df40b9c91e5307d32c071
      https://github.com/okfn/ckan/commit/ba48fb51a868ffb5668df40b9c91e5307d32c071
  Author: John Glover <j at johnglover.net>
  Date:   2012-04-17 (Tue, 17 Apr 2012)

  Changed paths:
    M ckan/public/scripts/application.js

  Log Message:
  -----------
  [xs][scripts] bug fix: prepend CKAN.SITE_URL to resource edit format icon call


diff --git a/ckan/public/scripts/application.js b/ckan/public/scripts/application.js
index 40513fd..995e703 100644
--- a/ckan/public/scripts/application.js
+++ b/ckan/public/scripts/application.js
@@ -537,7 +537,7 @@ CKAN.View.Resource = Backbone.View.extend({
     }
     self.updateIconTimer = setTimeout(function() {
         // AJAX to server API
-        $.getJSON('/api/2/util/resource/format_icon?format='+encodeURIComponent(self.formatBox.val()), function(data) {
+        $.getJSON(CKAN.SITE_URL + '/api/2/util/resource/format_icon?format='+encodeURIComponent(self.formatBox.val()), function(data) {
           if (data && data.icon && data.format==self.formatBox.val()) {
             self.li.find('.js-resource-icon').attr('src',data.icon);
             self.table.find('.js-resource-icon').attr('src',data.icon);


================================================================



More information about the ckan-changes mailing list