[Seaside] How to built a JQDialog with a width that comes from a variable?

Gastón Dall' Oglio gaston.dalloglio at gmail.com
Thu Jul 17 14:04:23 UTC 2014


Hi Mariano.

I guess that this info can help you:
http://forum.world.st/Incorrect-position-en-JQDialog-td4399806.html

I have a webapp in that I made an WADecoration subclass to render a
JQDialog around the decorated WAComponent, and I hold in this all JQDialog
information, like position and size. I share in as soon I have time to find
this image :)

Best.




2014-07-15 19:08 GMT-03:00 Mariano Martinez Peck <marianopeck at gmail.com>:

> Hi guys,
>
> I am currently creating a JQDialog. Such an object allows one to define a
> 'width'. But it can only be passed a number (pixels). In my case I want a
> special default..say $(window).width() * 0.9
>
> I tried many ways of dealing with that and I failed completly. The way I
> create the script is this:
>
> scriptToOpenDialogOn: html value: value
>
> ((html jQuery: '#popupContainer') dialog close),
>  ((html jQuery: '#popupContainer') dialog
> title: value second;
> html: value first;
>  modal: false;
> autoOpen: true;
> draggable: true;
>  resizable: false;
> position: 'top';
> closeOnEscape: true;
>  width: 900;
> addButton: 'Close' do: (html jQuery: '#popupContainer') dialog close)
>
> And that is appended to #script: of an ajax callback:
>
> scriptForPopupClickHandlerOn: html | val | val := ValueHolder new. ^ html
> jQuery this on: 'click' selector: '.clickablePopup' do: ((html jQuery ajax
> callback: [:pass | val contents: pass first ] passengers: (html jQuery
> this); script: [ :s | s << (self scriptToOpenDialogOn: s value: val
> contents) ]) asFunction: #(event))
>
> Any ideas how could i make those 900 pixels to be a % of say..the width of
> the root document?
>
> Thanks in advance,
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20140717/b9169022/attachment.htm


More information about the seaside mailing list