LP1823041 Remove unintentially merged code blocks
authorBill Erickson <berickxx@gmail.com>
Wed, 19 Jun 2019 20:14:39 +0000 (16:14 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 20 Jun 2019 14:17:31 +0000 (10:17 -0400)
A chunk of Angular code which was removed before merging this LP was
added back during the rebase/merge process.  This removes the errant
code.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>

Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts

index 0930d5c..a1dc1c6 100644 (file)
@@ -171,91 +171,6 @@ export class AdminPageComponent implements OnInit {
         this.grid.onRowActivate.subscribe(
             (idlThing: IdlObject) => this.showEditDialog(idlThing)
         );
-
-        this.editSelected = (idlThings: IdlObject[]) => {
-
-            // Edit each IDL thing one at a time
-            const editOneThing = (thing: IdlObject) => {
-                if (!thing) { return; }
-
-                this.showEditDialog(thing).then(
-                    () => editOneThing(idlThings.shift()));
-            };
-
-            editOneThing(idlThings.shift());
-        };
-
-        this.createNew = () => {
-            this.editDialog.mode = 'create';
-            // We reuse the same editor for all actions.  Be sure
-            // create action does not try to modify an existing record.
-            this.editDialog.recId = null;
-            this.editDialog.record = null;
-            this.editDialog.open({size: this.dialogSize}).subscribe(
-                result => {
-                    this.createString.current()
-                        .then(str => this.toast.success(str));
-                    this.grid.reload();
-                },
-                error => {
-                    this.createErrString.current()
-                        .then(str => this.toast.danger(str));
-                }
-            );
-        };
-
-        this.deleteSelected = (idlThings: IdlObject[]) => {
-            idlThings.forEach(idlThing => idlThing.isdeleted(true));
-            this.pcrud.autoApply(idlThings).subscribe(
-                val => console.debug('deleted: ' + val),
-                err => {},
-                ()  => this.grid.reload()
-            );
-        };
-
-        // Open the field translation dialog.
-        // Link the next/previous actions to cycle through each translatable
-        // field on each row.
-        this.translate = () => {
-            this.translateRowIdx = 0;
-            this.translateFieldIdx = 0;
-            this.translator.fieldName = this.translatableFields[this.translateFieldIdx];
-            this.translator.idlObject = this.dataSource.data[this.translateRowIdx];
-
-            this.translator.nextString = () => {
-
-                if (this.translateFieldIdx < this.translatableFields.length - 1) {
-                    this.translateFieldIdx++;
-
-                } else if (this.translateRowIdx < this.dataSource.data.length - 1) {
-                    this.translateRowIdx++;
-                    this.translateFieldIdx = 0;
-                }
-
-                this.translator.idlObject =
-                    this.dataSource.data[this.translateRowIdx];
-                this.translator.fieldName =
-                    this.translatableFields[this.translateFieldIdx];
-            };
-
-            this.translator.prevString = () => {
-
-                if (this.translateFieldIdx > 0) {
-                    this.translateFieldIdx--;
-
-                } else if (this.translateRowIdx > 0) {
-                    this.translateRowIdx--;
-                    this.translateFieldIdx = 0;
-                }
-
-                this.translator.idlObject =
-                    this.dataSource.data[this.translateRowIdx];
-                this.translator.fieldName =
-                    this.translatableFields[this.translateFieldIdx];
-            };
-
-            this.translator.open({size: 'lg'});
-        };
     }
 
     checkCreatePerms() {