[open-ils-commits] r19164 - branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget (gmc)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jan 11 19:30:42 EST 2011
Author: gmc
Date: 2011-01-11 19:30:41 -0500 (Tue, 11 Jan 2011)
New Revision: 19164
Modified:
branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
allow data entry of negative currency amounts
Plug in fix for Dojo bug http://bugs.dojotoolkit.org/ticket/9438, which
was preventing the input of discounts and credits during invoice
creation.
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Modified: branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2011-01-12 00:30:07 UTC (rev 19163)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2011-01-12 00:30:41 UTC (rev 19164)
@@ -225,6 +225,16 @@
case 'money':
dojo.require('dijit.form.CurrencyTextBox');
+ // plug in fix for Dojo bug http://bugs.dojotoolkit.org/ticket/9438
+ // to allow entry of negative values; won't be needed after we upgrade
+ // to Dojo 1.5
+ dojo.extend(dijit.form.CurrencyTextBox, {
+ regExpGen: function(constraints){
+ return this._focused ?
+ dojo.number.regexp(dojo.mixin(dojo.mixin(this.editOptions, constraints), {type: 'decimal'})) :
+ dojo.currency.regexp(constraints);
+ }
+ });
this.widget = new dijit.form.CurrencyTextBox(this.dijitArgs, this.parentNode);
break;
More information about the open-ils-commits
mailing list