mirror of
https://github.com/Esri/offline-editor-js.git
synced 2025-12-15 15:20:05 +00:00
go Offline/Online automatically, using offline detection library
This commit is contained in:
parent
94e58f9575
commit
88042d1afd
@ -13,10 +13,10 @@
|
||||
- unit tests, OK
|
||||
- going online fails if all edits cancel themselves (for instance one add + one delete), OK
|
||||
- undo, OK
|
||||
- goOnline()/goOffline() automatically
|
||||
|
||||
- unit tests for failure cases
|
||||
- explicit feedback to user when QuotaError happens
|
||||
- goOnline()/goOffline() automatically
|
||||
- feedback graphics layer
|
||||
- add timestamp to edits
|
||||
- attachments
|
||||
|
||||
@ -76,6 +76,8 @@
|
||||
</script>
|
||||
|
||||
<script src="http://js.arcgis.com/3.8"></script>
|
||||
<script src="../vendor/offline/offline.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
// based on https://developers.arcgis.com/javascript/jssamples/ed_simpletoolbar.html
|
||||
@ -135,7 +137,8 @@
|
||||
updateConnectivityIndicator();
|
||||
updateStorageInfo();
|
||||
|
||||
//
|
||||
Offline.on('up', goOnline );
|
||||
Offline.on('down', goOffline );
|
||||
|
||||
esriConfig.defaults.io.proxyUrl = "../lib/proxy.php";
|
||||
|
||||
@ -174,11 +177,7 @@
|
||||
{
|
||||
var layer = result.layer;
|
||||
offlineFeaturesManager.extend(layer);
|
||||
//layer.on('edits-completed', logCurrentObjectIds);
|
||||
layer.on('update-end', logCurrentObjectIds);
|
||||
// layer.on('graphic-add', logCurrentObjectIds)
|
||||
// layer.on('graphic-remove', logCurrentObjectIds)
|
||||
// layer.on('graphics-clear', logCurrentObjectIds)
|
||||
});
|
||||
|
||||
updatePendingEditsList();
|
||||
@ -374,7 +373,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div data-dojo-type="dijit/layout/ContentPane" id="map" data-dojo-props="region:'center'"></div>
|
||||
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'right'" style="width:232px;padding:1px;">
|
||||
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'right'" style="width:242px;padding:1px;">
|
||||
<div id="editorDiv"></div>
|
||||
<div id="templateDiv"></div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user