undid local proxy references so the repo can be shared

This commit is contained in:
andygup 2014-02-23 15:27:58 -07:00
parent 06aff6d2e1
commit 5dae3aae9d
2 changed files with 15 additions and 25 deletions

View File

@ -58,8 +58,8 @@ define([
layer.offline = {
online: true,
store: new DbAttachmentStore(),
// proxyPath: "../../lib/proxy.php"
proxyPath: "http://localhost/proxy/proxy.php"
proxyPath: "../../lib/proxy.php"
//proxyPath: "http://localhost/proxy/proxy.php"
};
if( /*false &&*/ layer.offline.store.isSupported() )
@ -111,18 +111,6 @@ define([
}
}
layer.test = function (a,c,b,d,e){
var f=this;
return C({url:this._url.path+"/"+c+"/"+("add"===a?"addAttachment":"updateAttachment"),
form:b,content:q.mixin(this._url.query,{
f:"json",token:this._getToken()||void 0}),
callbackParamName:"callback.html",handleAs:"json"}).addCallback(function(b){
var e="add"===a?"onAddAttachmentComplete":"onUpdateAttachmentComplete";
b=new D(b["add"===a?"addAttachmentResult":"updateAttachmentResult"]);
b.attachmentId=b.objectId;b.objectId=c;
f._resolve([b],e,d);return b}).addErrback(
function(a){f._resolve([a],null,e,null,!0)})}
layer.deleteAttachments = function(objectId,attachmentsIds,callback,errback){
if( self.getOnlineStatus() == self.ONLINE)
{

View File

@ -49,8 +49,7 @@
vendor: locationPath + "/../vendor"
}
}
//window.proxyPath = "../../lib/proxy.php";
window.proxyPath = "http://localhost/proxy/proxy.php";
window.proxyPath = "../../lib/proxy.php";
</script>
<script src="http://js.arcgis.com/3.8/"></script>
@ -82,8 +81,8 @@
// a proxy page is required to upload attachments
// refer to "Using the Proxy Page" for more information: https://developers.arcgis.com/en/javascript/jshelp/ags_proxy.html
//esriConfig.defaults.io.proxyUrl = "../lib/proxy.php";
esriConfig.defaults.io.proxyUrl = "http://localhost/proxy/proxy.php";
esriConfig.defaults.io.proxyUrl = "../lib/proxy.php";
//esriConfig.defaults.io.proxyUrl = "http://localhost/proxy/proxy.php";
var offlineFeaturesManager = new OfflineFeaturesManager();
offlineFeaturesManager.on(offlineFeaturesManager.events.EDITS_ENQUEUED, updateStatus);
@ -126,13 +125,16 @@
// console.log("Problem querying attachments: " + err.toString())
// })
featureLayer.addAttachment(objectId,dom.byId("upload-test"),function(evt){
console.log("TEST ADD callback: " + evt);
attachmentEditor.showAttachments(event.graphic,featureLayer);
map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
},function(err){
console.log("TEST ADD error: " + err)
})
// featureLayer.addAttachment(objectId,dom.byId("upload-test"),function(evt){
// console.log("TEST ADD callback: " + evt);
// attachmentEditor.showAttachments(event.graphic,featureLayer);
// map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
// },function(err){
// console.log("TEST ADD error: " + err)
// })
attachmentEditor.showAttachments(event.graphic,featureLayer);
map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
});