Skip to content

Commit

Permalink
Merge pull request #464 from andygup/proxy
Browse files Browse the repository at this point in the history
v3.2.0
  • Loading branch information
andygup committed May 12, 2016
2 parents 6f2a71a + d5d2252 commit d062c26
Show file tree
Hide file tree
Showing 18 changed files with 422 additions and 173 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# offline-editor-js - Changelog

## Version 3.2.0 - May 11, 2016

No breaking changes.

**Enhancements**
* Added CleanFeatureService.js util for deleting all features in a demo feature service

**Bug Fixes**
* Closes #461 - proxyPath not respected in OfflineEditAdvanced. Also fixed proxyPath in OfflineEditBasic
* Closes #462 - getNextLowestTempId does not exist in editStorePOLS.
* Closes #463 - sample feature service no longer allows editing. Complete rewrite.

## Version 3.1.0 - April 21, 2016

No breaking changes.
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ This project is also available on npm: **[https://www.npmjs.com/package/esri-off

This repo contains the following libraries in the `/dist` directory. The use of `basic` in the name indicates intermittent offline-only, and `advanced` indicates the library can be used for both intermittent and full offline.

Reference URLs are provided for developement only. It's recommended to use a CDN or host your own.

Use_Case | Name, Description and gh-pages URL
--- | ---
Basic editing | **`offline-edit-basic-min.js`** Simple, lightweight *(14k minimized)* offline editing library that automatically caches adds, updates and deletes when the internet is temporarily interrupted.<br><br>[`http://esri.github.io/offline-editor-js/dist/offline-edit-basic-min.js`](http://esri.github.io/offline-editor-js/dist/offline-edit-basic-min.js)
Basic editing | **`offline-edit-basic-min.js`** Simple, lightweight *(15k minimized)* offline editing library that automatically caches adds, updates and deletes when the internet is temporarily interrupted.<br><br>[`http://esri.github.io/offline-editor-js/dist/offline-edit-basic-min.js`](http://esri.github.io/offline-editor-js/dist/offline-edit-basic-min.js)
Advanced editing | **`offline-edit-advanced-min.js`** Used for intermittent and full offline editing workflows. Also includes limited support for attachments. <br><br>[`http://esri.github.io/offline-editor-js/dist/offline-edit-advanced-min.js`](http://esri.github.io/offline-editor-js/dist/offline-edit-advanced-min.js)
Basic map tiles | **`offline-tiles-basic-min.js`** Caches map tiles for simple, intermittent-only offline workflows. Use this library with ArcGIS Online Web maps as well as with tiled map services.<br><br> [`http://esri.github.io/offline-editor-js/dist/offline-tiles-basic-min.js`](http://esri.github.io/offline-editor-js/dist/offline-tiles-basic-min.js)
Advanced map tiles | **`offline-tiles-advanced-min.js`** Used for intermittent and full offline tile caching. Extends any ArcGIS Tiled Map Service. This library should be used in conjunction with an HTML5 Application Cache Manifest coding pattern.<br><br>[`http://esri.github.io/offline-editor-js/dist/offline-tiles-advanced-min.js`](http://esri.github.io/offline-editor-js/dist/offline-tiles-advanced-min.js)
Expand Down Expand Up @@ -83,7 +85,7 @@ Go __[here](https://github.com/Esri/offline-editor-js/wiki/FAQ)__ for answers to

##Dependencies

* [ArcGIS API for JavaScript (v3.12+)](https://developers.arcgis.com/javascript/)
* [ArcGIS API for JavaScript (v3.14+)](https://developers.arcgis.com/javascript/)
* [Offline.js](http://github.hubspot.com/offline/docs/welcome/) - it allows detection of the online/offline condition and provides events to hook callbacks on when this condition changes
* Node.js required for building the source
* [IndexedDBShim](https://github.com/axemclion/IndexedDBShim) - polyfill to simulate indexedDB functionality in browsers/platforms where it is not supported notably older versions desktop Safari and iOS Safari.
Expand Down
6 changes: 3 additions & 3 deletions dist/offline-edit-advanced-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions dist/offline-edit-advanced-src.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! esri-offline-maps - v3.1.0 - 2016-04-21
/*! esri-offline-maps - v3.2.0 - 2016-05-12
* Copyright (c) 2016 Environmental Systems Research Institute, Inc.
* Apache License*/
// Configure offline/online detection
Expand Down Expand Up @@ -2056,8 +2056,11 @@ define([
}
}

// Respect the proxyPath if one has been set (Added at v3.2.0)
var url = this.proxyPath ? this.proxyPath + "?" + layer.url : layer.url;

var req = new XMLHttpRequest();
req.open("POST", layer.url + "/applyEdits", true);
req.open("POST", url + "/applyEdits", true);
req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
req.onload = function()
{
Expand All @@ -2068,7 +2071,7 @@ define([
callback(obj.addResults, obj.updateResults, obj.deleteResults);
}
catch(err) {
console.error("EDIT REQUEST REPONSE WAS NOT SUCCESSFUL:", req);
console.error("EDIT REQUEST RESPONSE WAS NOT SUCCESSFUL:", req);
errback("Unable to parse xhr response", req);
}
}
Expand Down Expand Up @@ -2735,7 +2738,7 @@ O.esri.Edit.EditStore = function () {
else {
callback(null, "no db");
}
},
};

/**
* Returns all the edits as a single Array via the callback
Expand Down
16 changes: 11 additions & 5 deletions dist/offline-edit-basic-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d062c26

Please sign in to comment.