[open-ils-commits] r12932 - 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 20 16:51:53 EDT 2009
Author: erickson
Date: 2009-04-20 16:51:48 -0400 (Mon, 20 Apr 2009)
New Revision: 12932
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:
wrap the ils-marc edit button in a perm
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-20 20:42:14 UTC (rev 12931)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-04-20 20:51:48 UTC (rev 12932)
@@ -421,6 +421,29 @@
}
}
);
+
+ 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) {
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-20 20:42:14 UTC (rev 12931)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-04-20 20:51:48 UTC (rev 12932)
@@ -109,8 +109,8 @@
<h3 id='acq-lit-marc-order-record-label'>MARC Order Record</h3>
<h3 id='acq-lit-marc-real-record-label'>MARC ILS Record</h3>
<div>
- <div dojoType='dijit.form.Button' jsId='acqLitEditOrderMarc'>Edit MARC Order Record</div>
- <div dojoType='dijit.form.Button' jsId='acqLitEditILSMarc'>Edit MARC ILS Record</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