From b52eb923bfdfef4d2e9d0cdf49583707f505b4a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Tue, 27 Sep 2011 09:39:29 +0000
Subject: [PATCH] Fix for JSONP handling.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2927 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/discojuice/www/discojuice/discojuice.control.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/discojuice/www/discojuice/discojuice.control.js b/modules/discojuice/www/discojuice/discojuice.control.js
index 2c7eeb449..88eb8d6f4 100644
--- a/modules/discojuice/www/discojuice/discojuice.control.js
+++ b/modules/discojuice/www/discojuice/discojuice.control.js
@@ -78,7 +78,7 @@ DiscoJuice.Control = {
 		// If SP EntityID is set in configuration make sure it is sent as a parameter
 		// to the feed endpoint.
 		var discosettings = this.parent.Utils.options.get('disco');
-		if (discosettings) {
+		if (this.parent.Utils.options.get('discoSetRequestor', false)) {
 			parameters.entityID = discosettings.spentityid;
 		}
 		
@@ -95,7 +95,7 @@ DiscoJuice.Control = {
 					var j = i+1;
 					$.ajax({
 						url: curmdurl,
-//						dataType: 'jsonp',
+						dataType: 'jsonp',
 						jsonpCallback: function() { return 'dj_md_' + j; },
 						cache: true,
 						data: parameters,
@@ -906,6 +906,7 @@ DiscoJuice.Control = {
 						$.ajax({
 							cache: true,
 							url: countryapi,
+							dataType: 'jsonp',
 							jsonpCallback: function() { return 'dj_country'; },
 							success: function(data) {
 								if (data && data.status == 'ok' && data.country) {
-- 
GitLab