[Nitro] Just a small thingy...

George Moschovitis george.moschovitis at gmail.com
Thu Oct 13 06:48:38 EDT 2005


Thanks for the patch! added it.

-g.

On 10/13/05, Emmanuel Piperakis <epiperak at softlab.ece.ntua.gr> wrote:
> Bug fix...
> In order for popup windows to be resizable and have scrollbars you have to
> add this line in
> mixin/xhtml.rb
> just after this line
> poptions = (o[:resizable] ? 'resizable=yes' : 'resizable=no')
>
> ====ADD====
>      poptions << ", "
> ===========
> it adds a comma , in order to seperate the 2 fields
>
> ===================================================
> the whole function....
>
> def js_popup(options = {})
>      o = {
>        :width => 320,
>        :height => 240,
>        :title => 'Popup',
>        :resizable => false,
>        :scrollbars => false,
>      }.merge(options)
>
>      poptions = (o[:resizable] ? 'resizable=yes' : 'resizable=no')
>      poptions << ", "
>      poptions << (o[:scrollbars] ? 'scrollbars=yes' : 'scrollbars=no')
>
>      url = o[:url] || o[:uri]
>
>      %[javascript: var pwl = (screen.width - #{o[:width]}) / 2; var pwt =
> (screen.height - #{o[:height]}) / 2; window.open('#{url}', '#{o[:title]}',
> 'width=#{o[:width]},height=#{o[:height]},top='+pwt+',left='+pwl+',
> #{poptions}'); return false;"]
>    end
> A
>
> Emmanouil Piperakis (epiperak at cs.ntua.gr)
> {To explore is Human, to Create is Devine,
>   To teach is Primal, to Rule is Sin}
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>


--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list