diff --git a/js/app/dataAccess.js b/js/app/dataAccess.js index db1d552..fa45357 100644 --- a/js/app/dataAccess.js +++ b/js/app/dataAccess.js @@ -123,8 +123,7 @@ define(['diag'], function (diag) { deferred = $.Deferred(); url = dataAccess.featureServiceUrl + "query?where=" + (condition || dataAccess.validCandidateCondition) - + "&objectIds=&returnIdsOnly=false&returnCountOnly=true&outFields=" + dataAccess.fixedQueryParams - + "&callback=?"; + + "&objectIds=&returnIdsOnly=false&returnCountOnly=true&outFields=" + dataAccess.fixedQueryParams; $.getJSON(url, function handleObjectCountClosure(results) { dataAccess.handleObjectCount(results, deferred, condition); }); @@ -166,8 +165,7 @@ define(['diag'], function (diag) { // Get the ids of available unsurveyed candidates url = dataAccess.featureServiceUrl + "query?where=" + dataAccess.validCandidateCondition - + "&objectIds=&returnIdsOnly=true&returnCountOnly=false&outFields=" + dataAccess.fixedQueryParams - + "&callback=?"; + + "&objectIds=&returnIdsOnly=true&returnCountOnly=false&outFields=" + dataAccess.fixedQueryParams; $.post(url, function handleCandidatesClosure(results) { dataAccess.handleCandidates(results, randomizeSelection, deferred); },'json'); @@ -210,15 +208,14 @@ define(['diag'], function (diag) { // Get the candidate's attributes attributesDeferred = $.Deferred(); objectAttrsUrl = dataAccess.featureServiceUrl + "query?objectIds=" + objectId - + "&returnIdsOnly=false&returnCountOnly=false&outFields=*" + dataAccess.fixedQueryParams - + "&callback=?"; + + "&returnIdsOnly=false&returnCountOnly=false&outFields=*" + dataAccess.fixedQueryParams; $.getJSON(objectAttrsUrl, function handleCandidateAttrsClosure(results) { dataAccess.handleCandidateAttrs(results, attributesDeferred); }); // Get the candidate's attachments attachmentsDeferred = $.Deferred(); - objectAttachmentsUrl = dataAccess.featureServiceUrl + objectId + "/attachments?f=json&callback=?"; + objectAttachmentsUrl = dataAccess.featureServiceUrl + objectId + "/attachments?f=json"; $.getJSON(objectAttachmentsUrl, function handleCandidateAttachmentsClosure(results) { dataAccess.handleCandidateAttachments(objectId, results, attributesDeferred, attachmentsDeferred); }); diff --git a/js/app/fetchConfigInfo.js b/js/app/fetchConfigInfo.js index a4812fa..cf625e1 100644 --- a/js/app/fetchConfigInfo.js +++ b/js/app/fetchConfigInfo.js @@ -72,7 +72,7 @@ define(['parseConfigInfo'], function (parseConfigInfo) { } if (parseConfigInfo.isUsableString(appId)) { - $.getJSON(arcgisUrl + appId + "/data?f=json&callback=?", function (data) { + $.getJSON(arcgisUrl + appId + "/data?f=json", function (data) { deferred.resolve((data && data.values) || {}); }); } else { @@ -103,7 +103,7 @@ define(['parseConfigInfo'], function (parseConfigInfo) { deferreds.origImageUrl = origImageUrlDeferred || $.Deferred(); if (parseConfigInfo.isUsableString(webmapId)) { - $.getJSON(arcgisUrl + webmapId + "?f=json&callback=?", function (data) { + $.getJSON(arcgisUrl + webmapId + "?f=json", function (data) { var normalizedData = {}, imageUrl, iExt; if (!data || data.error) { deferreds.params.reject(); @@ -161,7 +161,7 @@ define(['parseConfigInfo'], function (parseConfigInfo) { } if (parseConfigInfo.isUsableString(webmapId)) { - $.getJSON(arcgisUrl + webmapId + "/data?f=json&callback=?", function (data) { + $.getJSON(arcgisUrl + webmapId + "/data?f=json", function (data) { var featureSvcData = {}; if (data && data.operationalLayers && data.operationalLayers.length > 0 && data.tables && data.tables.length > 0) { @@ -207,7 +207,7 @@ define(['parseConfigInfo'], function (parseConfigInfo) { deferred = $.Deferred(); } if (parseConfigInfo.isUsableString(featureSvcUrl)) { - $.getJSON(featureSvcUrl + "?f=json&callback=?", function (data) { + $.getJSON(featureSvcUrl + "?f=json", function (data) { data.canBeUpdated = data.capabilities && data.capabilities.indexOf("Update") >= 0; deferred.resolve(data); });