mirror of
https://github.com/Esri/offline-editor-js.git
synced 2025-12-15 15:20:05 +00:00
added delete functionality
This commit is contained in:
parent
eb05e453bf
commit
0e83d60d5a
@ -53,6 +53,7 @@ define([
|
||||
layer._applyEdits = layer.applyEdits;
|
||||
layer._addAttachment = layer.addAttachment;
|
||||
layer._queryAttachmentInfos = layer.queryAttachmentInfos;
|
||||
layer._deleteAttachments = layer.deleteAttachments;
|
||||
|
||||
try{
|
||||
layer.offline = {
|
||||
@ -92,7 +93,7 @@ define([
|
||||
layer.addAttachment = function(objectId,formNode,callback,errback){
|
||||
if( self.getOnlineStatus() == self.ONLINE)
|
||||
{
|
||||
return this._sendAttachment("add",objectId,formNode,
|
||||
return this._addAttachment(objectId,formNode,
|
||||
function(evt){
|
||||
self.emit(self.events.ATTACHMENTS_SENT,arguments);
|
||||
callback
|
||||
@ -114,7 +115,7 @@ define([
|
||||
layer.deleteAttachments = function(objectId,attachmentsIds,callback,errback){
|
||||
if( self.getOnlineStatus() == self.ONLINE)
|
||||
{
|
||||
var def = this._addAttachment(objectId,attachmentsIds,
|
||||
var def = this._deleteAttachments(objectId,attachmentsIds,
|
||||
function()
|
||||
{
|
||||
self.emit(self.events.ATTACHMENTS_DELETED,arguments);
|
||||
|
||||
@ -55,6 +55,8 @@
|
||||
<script src="http://js.arcgis.com/3.8/"></script>
|
||||
<script src="../vendor/offline/offline.min.js"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
var map;
|
||||
|
||||
require([
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user