<div dir="ltr">Hi,<br><br>With lots of work, we got to this approach, which also uses a decoration:<br><br>WAComponent >> jLightbox: aComponent<br>"Display aComponent within a lightbox of the receiver. Note, that this does a full refresh displaying the lightbox."<br>
<br>| dialog answer |<br>dialog := JQueryLightBoxDecoration new.<br>self addDecoration: dialog.<br>answer := dialog holder call: aComponent.<br>self removeDecoration: dialog.<br>^ answer<br><br><br>WADecoration subclass: #JQueryLightBoxDecoration<br>
instanceVariableNames: 'holder'<div><br></div><div><div>JQueryLightBoxDecoration >> renderContentOn: html</div><div><span class="" style="white-space:pre">        </span>self renderNextOn: html.</div><div><span class="" style="white-space:pre">        </span>html div</div>
<div><span class="" style="white-space:pre">                </span>id: 'lightbox';</div><div><span class="" style="white-space:pre">                </span>script:</div><div><span class="" style="white-space:pre">                                </span>(html jQuery this dialog</div>
<div><span class="" style="white-space:pre">                                                </span>resizable: false;</div><div><span class="" style="white-space:pre">                                                </span>autoOpen: true;</div><div><span class="" style="white-space:pre">                                                </span>modal: true;</div>
<div><span class="" style="white-space:pre">                                                </span>width: 'auto';</div><div><span class="" style="white-space:pre">                                                </span>yourself);</div><div><span class="" style="white-space:pre">                </span>with: [ html render: holder ]</div>
</div><div><br></div><div><div>JQueryLightBoxDecoration >> initialize</div><div><span class="" style="white-space:pre">        </span>super initialize.</div><div><span class="" style="white-space:pre">        </span>holder := WAComponent new</div>
</div><div><br></div><div><br></div><div>HTH</div><div>Otto</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 17, 2014 at 4:04 PM, Gastón Dall' Oglio <span dir="ltr"><<a href="mailto:gaston.dalloglio@gmail.com" target="_blank">gaston.dalloglio@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Mariano.<br><br></div>I guess that this info can help you:<br><a href="http://forum.world.st/Incorrect-position-en-JQDialog-td4399806.html" target="_blank">http://forum.world.st/Incorrect-position-en-JQDialog-td4399806.html</a><br>
<br></div>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 :)<br>
<br></div>Best.<br><div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-15 19:08 GMT-03:00 Mariano Martinez Peck <span dir="ltr"><<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi guys,<div><br></div><div>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</div>
<div><br></div><div>I tried many ways of dealing with that and I failed completly. The way I create the script is this:</div><div><br></div><div>scriptToOpenDialogOn: html value: value <br></div><div><br></div><div><div>
((html jQuery: '#popupContainer') dialog close),</div>
<div><span style="white-space:pre-wrap">                </span>((html jQuery: '#popupContainer') dialog</div><div><span style="white-space:pre-wrap">                                        </span>title: value second;</div><div><span style="white-space:pre-wrap">                                        </span>html: value first;</div>
<div><span style="white-space:pre-wrap">                                        </span>modal: false;</div><div><span style="white-space:pre-wrap">                                        </span>autoOpen: true;</div><div><span style="white-space:pre-wrap">                                        </span>draggable: true;</div>
<div><span style="white-space:pre-wrap">                                        </span>resizable: false;</div><div><span style="white-space:pre-wrap">                                        </span>position: 'top';</div><div><span style="white-space:pre-wrap">                                        </span>closeOnEscape: true;</div>
<div><span style="white-space:pre-wrap">                                        </span>width: 900;</div><div><span style="white-space:pre-wrap">                                        </span>addButton: 'Close' do: (html jQuery: '#popupContainer') dialog close)</div><div>
<span style="white-space:pre-wrap">                                        </span></div><div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">And that is appended to #script: of an ajax callback:</span></div>
<div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">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))
                                                                </span></div><div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">Any ideas how could i make those 900 pixels to be a % of say..the width of the root document?</span></div>
<div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">Thanks in advance,</span></div><span><font color="#888888"><div><span style="white-space:pre-wrap"><br></span></div>
<div><br></div>-- <br>Mariano<br>
<a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
</font></span></div></div>
<br></div></div>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div>