Re: [Wikitech-l] Dynamically setting the content of a LayoutPanel in OOUI

2019-04-01 Thread Huji Lee
I watched your talk, [1] which happened 3 days after this exchange, and I found it very informative! Posting here so more people can see it along with the same thread. [1] https://www.youtube.com/watch?v=T_CUN2o4faw On Sun, Mar 24, 2019 at 10:11 PM Huji Lee wrote: > Thanks a lot! The gist

Re: [Wikitech-l] Dynamically setting the content of a LayoutPanel in OOUI

2019-03-24 Thread Huji Lee
Thanks a lot! The gist certainly helped a lot. I think the key line in your code, and what Alex was referring to, was this one: this.$content.empty().append( $content ); But I like the idea of formalizing the process into an object. I will likely take a slightly different approach, in which

Re: [Wikitech-l] Dynamically setting the content of a LayoutPanel in OOUI

2019-03-24 Thread Moriel Schottlender
You absolutely can attach a jQuery element into your $content parameter. That will work, and probably give you what you want. However, one of the more powerful things about OOUI is its ability to encapsulate this type of work. In this case, what I would recommend, is creating your own custom

[Wikitech-l] Dynamically setting the content of a LayoutPanel in OOUI

2019-03-24 Thread Huji Lee
In the script I am working on,[1] I have a PanelLayout that is defined like this: this.previewResult = new OO.ui.PanelLayout({ expanded: true, padded: true, framed: true, $content: '' }); Later on, I would like to modify the content of

Re: [Wikitech-l] Dynamically setting the content of a LayoutPanel in OOUI

2019-03-24 Thread Alex Monk
I haven't dealt with OOUI for a couple of years but maybe you could pass a jQuery object to the $content parameter, store it yourself, then modify that later? On Sun, 24 Mar 2019 at 14:14, Huji Lee wrote: > In the script I am working on,[1] I have a PanelLayout that is defined like > this: > >