[open-ils-commits] r12996 - in trunk/Open-ILS/web: js/ui/default/acq/common templates/default/acq/common (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 27 10:23:46 EDT 2009
Author: erickson
Date: 2009-04-27 10:23:44 -0400 (Mon, 27 Apr 2009)
New Revision: 12996
Modified:
trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
Log:
on second thought, just rely on the existing record details page for editing records that are already in the ILS
Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-04-26 18:26:10 UTC (rev 12995)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-04-27 14:23:44 UTC (rev 12996)
@@ -353,18 +353,15 @@
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 @@
}
}
);
-
- 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 @@
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) {
Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-04-26 18:26:10 UTC (rev 12995)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-04-27 14:23:44 UTC (rev 12996)
@@ -17,8 +17,8 @@
<option mask='pl' value='selector_ready'>Mark Ready for Selector</option>
<option mask='pl' value='order_ready'>Mark Ready for Order</option>
<option mask='*' value='delete_selected'>Delete Selected Items</option>
- <option mask='po' value='create_order'>Create Purchase Order</option>
<option mask='po' value='' disabled='disabled'>----PO----</option>
+ <option mask='sr|pl' value='create_order'>Create Purchase Order</option>
<option mask='po' value='create_assets'>Load Bibs and Items</option>
<option mask='po' value='receive_po'>Mark Purchase Order as Received</option>
<option mask='po' value='rollback_receive_po'>Un-Receive Purchase Order</option>
@@ -109,7 +109,6 @@
<h3 id='acq-lit-marc-real-record-label'>MARC ILS Record</h3>
<div>
<div dojoType='dijit.form.Button' jsId='acqLitEditOrderMarc' class='hidden'>Edit MARC Order Record</div>
- <div dojoType='dijit.form.Button' jsId='acqLitEditILSMarc' class='hidden' disabled='disabled'>Edit MARC ILS Record</div>
</div>
<div id='acq-lit-marc-div' style='margin-top:20px;'> </div>
</div>
More information about the open-ils-commits
mailing list