AHHH I knew I probably missed something.  I was looking on the make a 
plugin page.  Sorry my bad.

Bob

On Tuesday, January 15, 2013 8:22:04 AM UTC-5, Bryan Larsen wrote:
>
> There is a line explaining this in the hobo-jquery-ui main page: 
>
> Options that expect a type other than string can be provided by 
> passing a ruby object: 
>
>     <datepicker dayNamesMin="&['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa']" 
> /> 
>
> I emphasize this further in hobo-jquery-ui is through the use of 
> examples for the tags.   For instance: 
>
>     <combobox autoFill="&false" clearButton="&false"/> 
>
> Other than having the user use an ampersand, there's also a nice way 
> of passing in true: 
>
>     <combobox autoFill/> 
>
> is equivalent to 
>
>     <combobox autoFill="&true"/> 
>
> Bryan 
>
>
> On Mon, Jan 14, 2013 at 4:14 PM, Bob Sleys <[email protected] <javascript:>> 
> wrote: 
> > Oh and unless I'm missing something an update to the docs for this 
> should 
> > include something about passing boolean values or numbers to the jquery 
> > control. 
> > 
> > The controls I'm using expect some of the options to be true/false or 
> > numbers and not string data types. 
> > 
> > I added the following to my tag right after I filter out the possible 
> > options to do the conversions   I'm sure there is better way but this 
> worked 
> > for me. 
> > 
> >   options["spinners"]=false if options["spinners"] && 
> > options["spinners"].casecmp("false") == 0  #defaults to true 
> >   options["decimals"]=options["decimals"].to_i if options["decimals"] 
> >   options["max"]=options["max"].to_f if options["max"] 
> > 
> > Bob 
> > 
> > 
> > On Monday, January 14, 2013 3:32:07 PM UTC-5, Bob Sleys wrote: 
> >> 
> >> 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]> 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]. 
> >>> > 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. 
> > 
> > -- 
> > 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/-/FWZhgruStbAJ. 
> > 
> > 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/-/-bVWwS0auYYJ.
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.

Reply via email to