From ea3dc47eed385f41166aa211a78b1139af069885 Mon Sep 17 00:00:00 2001
From: miker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Fri, 5 Mar 2010 19:57:06 +0000
Subject: [PATCH] complete the transition from delete() to eliminate()

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15721 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/web/js/dojo/openils/PermaCrud.js                         | 8 +++++---
 Open-ILS/web/js/ui/default/acq/common/li_table.js                 | 2 +-
 Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js    | 4 ++--
 .../web/js/ui/default/conify/global/asset/copy_location_order.js  | 2 +-
 .../js/ui/default/conify/global/config/circ_matrix_matchpoint.js  | 4 ++--
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/Open-ILS/web/js/dojo/openils/PermaCrud.js b/Open-ILS/web/js/dojo/openils/PermaCrud.js
index 5dbc8137e9..85ea9e5bb4 100644
--- a/Open-ILS/web/js/dojo/openils/PermaCrud.js
+++ b/Open-ILS/web/js/dojo/openils/PermaCrud.js
@@ -323,13 +323,15 @@ if(!dojo._hasResource["openils.PermaCrud"]) {
             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 );
diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js
index ccbc75dbe9..ddb3fe7541 100644
--- a/Open-ILS/web/js/ui/default/acq/common/li_table.js
+++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js
@@ -786,7 +786,7 @@ function AcqLiTable() {
 
     this.deleteDfa = function(dfa) {
         if (dfa.id() > 0) { /* real */
-            this.pcrud.delete(
+            this.pcrud.eliminate(
                 dfa, {
                     "async": true,
                     "oncomplete": function() {
diff --git a/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js b/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js
index 132c3fcfdf..7f3dbc6bc5 100644
--- a/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js
+++ b/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js
@@ -152,7 +152,7 @@ function deleteQuestion(quesId, surveyBody) {
     delQuestion.id(quesId);
     delQuestion.isdeleted(true);
     surveyBody.parentNode.removeChild(surveyBody);
-    return pcrud.delete(delQuestion);
+    return pcrud.eliminate(delQuestion);
 
 }
 
@@ -193,7 +193,7 @@ function deleteAnswer(ansId) {
     var delAnswer = new asva();
     delAnswer.id(ansId);
     delAnswer.isdeleted(true);
-    return pcrud.delete(delAnswer);
+    return pcrud.eliminate(delAnswer);
   
 }
 function newAnswer(quesId, answerText, answerRow, surveyBody) {
diff --git a/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js b/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js
index 3bdd80203d..f444df7a0b 100644
--- a/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js
+++ b/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js
@@ -86,7 +86,7 @@ function applyChanges() {
 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,
diff --git a/Open-ILS/web/js/ui/default/conify/global/config/circ_matrix_matchpoint.js b/Open-ILS/web/js/ui/default/conify/global/config/circ_matrix_matchpoint.js
index 990bbafda8..4bf0c38aff 100644
--- a/Open-ILS/web/js/ui/default/conify/global/config/circ_matrix_matchpoint.js
+++ b/Open-ILS/web/js/ui/default/conify/global/config/circ_matrix_matchpoint.js
@@ -169,7 +169,7 @@ function applyCircModChanges() {
                         pcrud.create(newOnes, {
                             oncomplete : function() {
                                 if(delOnes.length) {
-                                    pcrud.delete(delOnes, {
+                                    pcrud.eliminate(delOnes, {
                                         oncomplete : function() {
                                             progressDialog.hide();
                                         }
@@ -180,7 +180,7 @@ function applyCircModChanges() {
                             }
                         });
                     } else {
-                        pcrud.delete(delOnes, {
+                        pcrud.eliminate(delOnes, {
                             oncomplete : function() {
                                 progressDialog.hide();
                             }
-- 
2.11.0