<elia>
seems a caching problem, it's either on the server or on the client
<elia>
be sure to clear the browser cache too
<elia>
dimaursu16, let me know what fixes the problem so that I can fix opal-rails if needed…
<dimaursu16>
it doesn't occur anymore
<dimaursu16>
also, I remove all opal configs form application.rb
<dimaursu16>
I didn't knew what they do anyway...
<elia>
dimaursu16, lol, defaults should be good
<dimaursu16>
I will let you know if it happens again...
<dimaursu16>
yeah, I think so :)
<dimaursu16>
I just saw that on github, and I was like: why not, let's configure the damn thing :)
<elia>
eh, good point, we should probably mark them as "advanced config" or something
<dimaursu16>
I will get my hands dirty with opal next week, probably :) then I will have more questions and suggestions
<elia>
dimaursu16, any time! :)
kludge` is now known as kludge`_
kludge`_ is now known as kludge`
meh` has joined #opal
joshka has joined #opal
joshka has left #opal ["Saliendo"]
joshka has joined #opal
gravityblast has joined #opal
<joshka>
hi! I want to use a jquery.plugin, can I use with opal?
<joshka>
in jquery I use: $('<selector>').<jquery_plugin_function>
<joshka>
but how can I use it in opal?
<joshka>
in opal I use Element.find('<selector>') but I can't use: Element.find('<selector>').<jquery_plugin_function> because the functions doesn't exist
<joshka>
*the function
<meh`>
joshka, you have to expose the plugin method
<joshka>
meh` opening Element class and add expose?
<meh`>
joshka, I don't use nor work with opal-jquery, so I don't know if it does any implicit conversion
<meh`>
for the time being you can do {}.to_n
<joshka>
with to_n works well
<joshka>
meh`, thanks again ;)
<meh`>
:)
gravityblast has quit [Quit: gravityblast]
<adambeynon_>
hi meh`
<elia>
joshka, if you want to avoid using #to_n you need to implement the method manually
<meh`>
that's lame
<joshka>
elia, thanks ;)
<adambeynon_>
meh`: Im finding it tough to get time to fix bugs atm, any complaints to releasing 0.6.0, and the bugs become patch releases in a couple of weeks?
<elia>
meh`, lame indeed, but I don't think method_missing is a viable option there
<elia>
adambeynon_, amirite?
<adambeynon_>
elia: yeah. the alternatives cause more problems (wrapping jquery, etc)
<adambeynon_>
we could always add the stubs to jquery as well
<adambeynon_>
but the stubs tend to get upto about 500 method names
<adambeynon_>
seems a lot to be adding to jquery prototypes
<elia>
or keep a list of bridged classes and keep all those in the loop
<joshka>
Are there jquery ui opal or I have to extend the methods I want too?
<adambeynon_>
yeah, that could be done
<adambeynon_>
joshka: you need to extend those as well
<meh`>
adambeynon_, fine by me
<joshka>
adambeynon_, thanks ;)
gravityblast has joined #opal
e_dub has quit [Ping timeout: 244 seconds]
<joshka>
I'm trying to use jquery-ui-dialog with opal, I extended dialog method in Element class but dialog method accepts attribute 'buttons' with js functions, ¿how can I implement this with opal?
<joshka>
i.e. $('').dialog({button: {Destroy: function(){...}})
<adambeynon_>
my_element.dialog({ button: { Destroy: proc; end } })
<adambeynon_>
sorry
<adambeynon_>
my_element.dialog({ button: { Destroy: proc; end } }.to_n)
<adambeynon_>
er
<adambeynon_>
my_element.dialog({ button: { Destroy: proc do; end } }.to_n)
<joshka>
I'm goint to try it ;) thanks
<joshka>
adambeynon_, works perfectly thanks :)
<adambeynon_>
joshka: I have found a lot of the jquery plugins to have very awkward syntax when written in ruby. they try to force very ugly configs into object literals
<adambeynon_>
I have found it more useful to write a wrapper class
<adambeynon_>
dialog = JQueryDialog.new(element)
<adambeynon_>
dialog.on(:Destroy) do ... end
<adambeynon_>
but it does depend on how frequently you use them I guess
<joshka>
I understand adambeynon_ sorry but I'm new in opal and I want to learn it, if I write a wrapper class, do I have with opal core classes or maybe with opal-jquery too?
<joshka>
adambeynon_, can you give me an example of one wrapper built with opal for a jquery plugin? link or something like that