|
|
|
|
@ -79,8 +79,10 @@
|
|
|
|
|
me.items = response.data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
callback(callbackFn, [response, status, headers, config, me.items]);
|
|
|
|
|
|
|
|
|
|
if(callbackFn)
|
|
|
|
|
{
|
|
|
|
|
callback(callbackFn, [response, status, headers, config, me.items]);
|
|
|
|
|
}
|
|
|
|
|
}).
|
|
|
|
|
error(function(response, status, headers, config) {
|
|
|
|
|
|
|
|
|
|
@ -127,24 +129,11 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(response.success)
|
|
|
|
|
{
|
|
|
|
|
// var idPropertyValue = editing[modelInstance.idProperty],
|
|
|
|
|
// isNewRecord = (idPropertyValue == 0 || idPropertyValue == null || idPropertyValue == undefined);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
if(response.data != null)
|
|
|
|
|
{
|
|
|
|
|
//if(angular.isArray(response.data))
|
|
|
|
|
//{
|
|
|
|
|
// response.data = modelService.toModel(me.model, response.data[0], null);
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// response.data = modelService.toModel(me.model, response.data, null);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//TODO: should we remove this or create config option???
|
|
|
|
|
//angular.copy(response.data, editing);
|
|
|
|
|
//angular.copy(response.data, selected);
|
|
|
|
|
angular.copy(response.data, editing);
|
|
|
|
|
angular.copy(response.data, selected);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -210,6 +199,10 @@
|
|
|
|
|
this.items.push(data[n]);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.refresh = function(){
|
|
|
|
|
me.get();
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//pass specified values to specified function arguments
|
|
|
|
|
|