GRRR so close. It worked for a minute and I was all happy so I went in and finished removing all my direct calls to the tag and when I restarted the server it went back to decimal vs currency. I've removed the Delegate stuff and changed to using Currency vs :currency on the field but it's not working.
Bob On Monday, January 14, 2013 2:59:58 PM UTC-5, Bryan Larsen wrote: > > I think your two problems are related. > > It probably has something to do with the fact that you're inheriting > from DelegateClass(BigDecimal) rather than straight from BigDecimal. > You can try removing the DelegateClass bit. It used to be necessary > for other reasons, perhaps it isn't anymore. > > Another thing to try is that instead of doing > > price :currency, :precision => 12, :scale => 2 > > try > > price Currency, :precision => 12, :scale => 2 > > cheers, > Bryan > > > On Mon, Jan 14, 2013 at 1:33 PM, Bob Sleys <[email protected] <javascript:>> > wrote: > > Thanks much I got most of what I wanted working. > > > > However I'm still having a problem with the default tag for my rich data > > type not working by default. I can't figure it out. > > > > The only odd thing I see is even though I have the field setup as so: > > > > price :currency, :precision => 12, :scale => 2 > > > > The input box class is setup as so: > > > > <input class="price-tag decimal part-price" id="part_price" > > name="part[price]" type="text" value="4.99"> > > > > Notice the class list is still showing the class decimal and not > currency. > > I'm thinking something in Hobo in still seeing the field as type > :decimal > > and not my new type :currency but I have no idea what might be causing > the > > problem. > > > > Bob > > > > On Saturday, January 12, 2013 8:48:09 PM UTC-5, Bryan Larsen wrote: > >> > >> > > >> > I wish I could specify the precision and scale here but that doesn't > >> > work > >> > the last I checked > >> > >> That's correct, it would be nice, but hobo doesn't support that. > >> > >> > First the first tag isn't get used by default for currency fields. > >> > >> It does appear that you've done things correctly, I'd have to take a > >> look at a sample app to look into things further. > >> > >> > > >> > If I work around it by manually calling the second tag as per below > the > >> > input tag looks fine but the kendoNumericTextBox function is never > >> > called to > >> > convert the standard text box over. I don't see how that is done for > >> > the > >> > calendar control. > >> > >> Here's how it is done for the datepicker: > >> > >> > >> > https://github.com/Hobo/hobo/blob/master/hobo_jquery_ui/vendor/assets/javascripts/hobo-jquery-ui/hjq-datepicker.js > > >> > >> That's actually virtually all boilerplate, it could be just: > >> > >> jQuery.fn.hjq_datepicker = function(annotations) { > >> if(!this.attr('disabled')) { > >> this.datepicker(this.hjq('getOptions', annotations)); > >> } > >> }; > >> > >> > >> I hope you're using this manual chapter to assist you in your work > >> rather than trying to reverse engineer existing plugins: > >> > >> > >> > http://cookbook.hobocentral.net/manual/plugins#creating_a_hobo_plugin_from_a_jquery_plugin > > >> > >> cheers, > >> Bryan > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Hobo Users" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/hobousers/-/VRXAIgTXpcUJ. > > > > To post to this group, send email to [email protected]<javascript:>. > > > To unsubscribe from this group, send email to > > [email protected] <javascript:>. > > For more options, visit this group at > > http://groups.google.com/group/hobousers?hl=en. > -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/hobousers/-/CvOimKJuQVgJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
