no need for "internal models"

This commit is contained in:
Javier Abadia 2014-01-18 22:51:15 +01:00
parent b558111bcf
commit 2cd8850ae4

View File

@ -618,7 +618,7 @@ console.log("ITEM!!! " + item)
this._deleteItemArrayTempLocalStore = function(/* Array */ array){
//Delete items from temp local store that have been successfully
//saved to the server or cloud.
var success = new this._success();
var success = { error:null, update:null };
var newStr = [];
var length = array.length;
for(var i = 0; i < length; i++){
@ -794,10 +794,11 @@ console.log("ITEM!!! " + item)
* @private
*/
this._serializeGraphic = function(/* Graphic */ graphic, layer, enumValue){
var json = new this._jsonGraphicsObject();
var json = {};
json.layer = layer.layerId;
json.enumValue = enumValue;
json.geometry = JSON.stringify(graphic.geometry)
json.geometry = JSON.stringify(graphic.geometry);
json.attributes = null;
if(graphic.hasOwnProperty("attributes")){
if(graphic.attributes != null){
try{
@ -818,29 +819,6 @@ console.log("ITEM!!! " + item)
///
//////////////////////////
/**
* Model for storing serialized graphics
* @private
*/
this._jsonGraphicsObject = function(){
this.layer = null;
this.enumValue = null;
this.geometry = null;
this.attributes = null;
this.date = null;
}
/**
* Model for strong multiple success/failure properties
* @param error
* @param update
* @private
*/
this._success = function(){
this.error = null;
this.update = null;
}
/**
* Model for transporting information related
* to a pending delete from temp local store.