[open-ils-commits] r19168 - branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget (gmc)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jan 12 15:52:47 EST 2011
Author: gmc
Date: 2011-01-12 15:52:42 -0500 (Wed, 12 Jan 2011)
New Revision: 19168
Modified:
branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
AutoFieldWidget no longer uses CurrencyTextBox dijit
NumberTextBox used instead to work around problem with
CurrencyTextBox's support for negative monetary amounts
in Dojo 1.3. See https://bugs.launchpad.net/evergreen/+bug/702117
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 20:51:27 UTC (rev 19167)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2011-01-12 20:52:42 UTC (rev 19168)
@@ -224,18 +224,13 @@
break;
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);
+ // dojo.require('dijit.form.CurrencyTextBox');
+ // the CurrencyTextBox dijit is broken in Dojo 1.3; upon upgrading
+ // to Dojo 1.5 or later, should re-evaluate work-around use of dijit.form.NumberTextBox.
+ // See https://bugs.launchpad.net/evergreen/+bug/702117
+ dojo.require('dijit.form.NumberTextBox');
+ this.dijitArgs = dojo.mixin({constraints:{places:'0,2'}}, this.dijitArgs || {});
+ this.widget = new dijit.form.NumberTextBox(this.dijitArgs, this.parentNode);
break;
case 'int':
More information about the open-ils-commits
mailing list