return obj_list;
},
+ /*
+ * 'delete' is a reserved keyword in JavaScript and can't be used
+ * in browsers like IE or Chrome, so we define a safe synonym
+ * NOTE: delete() is now removed -- use eliminate instead
+
delete : function ( list, opts ) {
return this._CUD( 'delete', list, opts );
},
- /*
- * 'delete' is a reserved keyword in JavaScript and can't be used
- * in browsers like IE or Chrome, so we define a safe synonym
*/
eliminate: function ( list, opts ) {
return this._CUD( 'delete', list, opts );
this.deleteDfa = function(dfa) {
if (dfa.id() > 0) { /* real */
- this.pcrud.delete(
+ this.pcrud.eliminate(
dfa, {
"async": true,
"oncomplete": function() {
delQuestion.id(quesId);
delQuestion.isdeleted(true);
surveyBody.parentNode.removeChild(surveyBody);
- return pcrud.delete(delQuestion);
+ return pcrud.eliminate(delQuestion);
}
var delAnswer = new asva();
delAnswer.id(ansId);
delAnswer.isdeleted(true);
- return pcrud.delete(delAnswer);
+ return pcrud.eliminate(delAnswer);
}
function newAnswer(quesId, answerText, answerRow, surveyBody) {
function deleteOrders(onload) {
// delete the existing order entries in preparation for new ones
var pcrud = new openils.PermaCrud({authtoken : user.authtoken});
- pcrud.delete(
+ pcrud.eliminate(
orders,
{
async : true,
pcrud.create(newOnes, {
oncomplete : function() {
if(delOnes.length) {
- pcrud.delete(delOnes, {
+ pcrud.eliminate(delOnes, {
oncomplete : function() {
progressDialog.hide();
}
}
});
} else {
- pcrud.delete(delOnes, {
+ pcrud.eliminate(delOnes, {
oncomplete : function() {
progressDialog.hide();
}