From: erickson Date: Mon, 27 Apr 2009 14:23:44 +0000 (+0000) Subject: on second thought, just rely on the existing record details page for editing records... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2c533d57571a498b7f4fcc3513378560fd80c26a;p=Evergreen.git on second thought, just rely on the existing record details page for editing records that are already in the ILS git-svn-id: svn://svn.open-ils.org/ILS/trunk@12996 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 0bbe520513..8bd2e83fb2 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 @@ -353,18 +353,15 @@ function AcqLiTable() { this._drawInfo = function(li) { acqLitEditOrderMarc.onClick = function() { self.editOrderMarc(li); } - acqLitEditILSMarc.onClick = function() { self.editILSMarc(li); } if(li.eg_bib_id()) { openils.Util.hide('acq-lit-marc-order-record-label'); openils.Util.hide(acqLitEditOrderMarc.domNode); openils.Util.show('acq-lit-marc-real-record-label'); - openils.Util.show(acqLitEditILSMarc.domNode); } else { openils.Util.show('acq-lit-marc-order-record-label'); openils.Util.show(acqLitEditOrderMarc.domNode); openils.Util.hide('acq-lit-marc-real-record-label'); - openils.Util.hide(acqLitEditILSMarc.domNode); } this.drawMarcHTML(li); @@ -437,29 +434,6 @@ function AcqLiTable() { } } ); - - if(li.eg_bib_id()) { - if(this.canEditILSMarc === true) { - acqLitEditILSMarc.attr('disabled', false); - } else { - if(this.canEditILSMarc === false) { - acqLitEditILSMarc.attr('disabled', true); - } else { - var self = this; - new openils.User().getPermOrgList('UPDATE_RECORD', - function(list) { - if(list.length > 0) { - self.canEditILSMarc = true; - acqLitEditILSMarc.attr('disabled', false); - } else { - self.canEditILSMarc = false; - acqLitEditILSMarc.attr('disabled', true); - } - } - ); - } - } - } } this.drawCopies = function(liId) { @@ -878,63 +852,34 @@ function AcqLiTable() { to true in about:config */ if(!openils.XUL.enableXPConnect()) return; - win = window.open('/xul/server/cat/marcedit.xul'); // XXX version? - - var self = this; - win.xulG = { - record : {marc : li.marc()}, - save : { - label: 'Save Record', // XXX I18N - func: function(xmlString) { - li.marc(xmlString); - fieldmapper.standardRequest( - ['open-ils.acq', 'open-ils.acq.lineitem.update'], - { async: true, - params: [openils.User.authtoken, li], - oncomplete: function(r) { - openils.Util.readResponse(r); - win.close(); - self.drawInfo(li.id()) - } - } - ); - }, - } - }; - } + if(openils.XUL.isXUL()) { + win = window.open('/xul/' + openils.XUL.buildId() + '/server/cat/marcedit.xul'); + } else { - this.editILSMarc = function(li) { - - /* To run in Firefox directly, must set signed.applets.codebase_principal_support - to true in about:config */ - - if(!openils.XUL.enableXPConnect()) return; - win = window.open('/xul/server/cat/marcedit.xul'); // XXX version? - - var bib = new openils.PermaCrud().retrieve('bre', li.eg_bib_id()); - - var self = this; - win.xulG = { - record : {marc : li.marc()}, - save : { - label: 'Save Record', // XXX I18N - func: function(xmlString) { - bib.marc(xmlString); - fieldmapper.standardRequest( - ['open-ils.cat', 'open-ils.cat.biblio.record_entry.update'], - { async: true, - params: [openils.User.authtoken, bib], - oncomplete: function(r) { - openils.Util.readResponse(r); - win.close(); - self.drawInfo(li.id()) + win = window.open('/xul/server/cat/marcedit.xul'); + var self = this; + win.xulG = { + record : {marc : li.marc()}, + save : { + label: 'Save Record', // XXX I18N + func: function(xmlString) { + li.marc(xmlString); + fieldmapper.standardRequest( + ['open-ils.acq', 'open-ils.acq.lineitem.update'], + { async: true, + params: [openils.User.authtoken, li], + oncomplete: function(r) { + openils.Util.readResponse(r); + win.close(); + self.drawInfo(li.id()) + } } - } - ); - }, - } - }; + ); + }, + } + }; + } } this._savePl = function(values) { diff --git a/Open-ILS/web/templates/default/acq/common/li_table.tt2 b/Open-ILS/web/templates/default/acq/common/li_table.tt2 index c40e1eb95f..c4268dfc6a 100644 --- a/Open-ILS/web/templates/default/acq/common/li_table.tt2 +++ b/Open-ILS/web/templates/default/acq/common/li_table.tt2 @@ -17,8 +17,8 @@ - + @@ -109,7 +109,6 @@

MARC ILS Record

-