wicket-jquery-ui
wicket-jquery-ui copied to clipboard
Feature Request / prepend scripts of DialogBehavior.open()
Hi Sebastien, possibly I have a quite similar issue like in #88.
You added a prependJavascript()
to the DialogBehavior.close(...)
.
Since some weeks I'm working on a JQuery SelectMenu, I would like to contribute to you, when some proof of concept is done. Since the last jquery-ui update I got some rendering problems. It collapses in dialogs, because the jquery-ui guys added some recalculation features for the element size.
To let that work correct, the dialog must be visible.
Due to the appendJavascript()
all jqueryui components I try to refresh onOpen()
determine a hidden dialog/html container which leads into a 0px calculation (it collapses).
When prepending the onOpen-js the dialog is already visible in DOM and the calculcation can be done correct.
Do you think it would be possibly also preprending the open-js without any api and behavior breaks for your dialogs?
kind regards Patrick
Patrick... it seems I have just forgot this issue! Will try to investigate asap...
Hi Patrick,
I am not sure to fully see the problem. Do you have a quickstart that could demonstrate to problem?
Thanks in advance, Sebastien
Hi Sebastien,
ok... I think the easiest way to show this is by creating a quickstart with my SelectMenu
/DropDownChoice
-Component.
As I said, I want to contribute it anyway, so maybe this could be a good moment. :smiley:
I will prepare a branch, add the component and create push request.
What I was asking myself since some weeks is, if I should name the component SelectMenu
, to be nearer to JQueryUI or DropDownChoice
to be nearer to Wicket? (By the way, I'm extendending DropDownChoice)
What do you think?
But I need some time to prepare it... just got back from my holidays. Today is my first.
kind regards Patrick
Hi Patrick,
if I should name the component SelectMenu, to be nearer to JQueryUI or DropDownChoice to be nearer to Wicket?
Good question. Usually, I try to be close to Wicket component names. I main idea is that the user can switch from one implementation to another just by changing the import(s)...
The rule is if the jQuery UI widget is the graphical representation of the same built-in component (furthermore if it extends it, having same ctors), then I try to keep the same name. Otherwise, I take the name of the widget..
But it is not 100% true. In Kendo UI for instance, the kendoDropDownList
widget is named DropDownList
but still extends DropDownChoice
, whereas the kendoGrid
widget is named DataTable
even it does not extends the built-in DataTable
(but it actually have almost same ctors) :)
Best regards, Sebastien
Hi Sebastien,
I prefer DropDownChoice
, because I like the idea of just changing imports.
Concerning my feature request again...
I think, I have a more common problem. Prepending the script is just a work-around for dialogs.
Today I had the same problem with Accordion
s.
Please read my bug report to JQueryUI which has been -unfortunately- closed as not-a-bug. https://bugs.jqueryui.com/ticket/14825 Then you will see why I opened this issue here.
Maybe, do you have an idea concerning this problem?
I don't like the solution scottgonzalez suggested. My first idea was, handling this in your project for dialogs, but it is also a problem for accordions and possibly other components, which are initialized hidden when rendering and containing a select-menu.
I'm not sure, what I should do, now. (hoping for a " sudden inspirations" by you)
kind regards Patrick
Hi Patrick,
Ok, noted. I am waiting for the quickstart so I can investigate...
Best regards, Sebastien.
Hi Sebastien, I created a further branch (SelectMenuCollapsingInDialogs) for investigating.
I prepared the SimpleDialog sample to show what happens.
Just follow my notes in SimpleDialog.onOpen(AjaxRequestTarget target)
.
best regards Patrick
Hi Sebastien, did you have time to have a look at my SelectMenuCollapsingInDialogs Branch?
kind regards Patrick
Hi Patrick,
Yes, I did had a look some time ago but I did not found a solution... I need to retry but it's rather complex! :)
Thanks for the reminder & sorry for the delay, Sebastien
Is it possible for you to create a copy of my Branch? I just upgrade to the your newest version and it seems there is a bug in the kendo scheduler, I would like to investigate. But I need the new code and going to delete my fork, and fork again to have the new kendo scheduler code.
Copied.
About the scheduler, I recently did a massive usage of it for "testing purpose"... I did some changes/enhancements, but I hope I did not broke something! :/ Please check out the latest commits / release notes, your kendo-ui version, and open an issue so we can discuss this...
Thanks & best regards, Sebastien.
It looks like the JQueryUI guys fixed this issue.
Have a look: 1.11.4 with collapsing selectmenu: http://jsfiddle.net/r3z2fn0g/1/
1.12.0 without collapsing selectmenu: http://jsfiddle.net/Patrick1701/vwkq3jpy/
So, It seems to me, I won't need this feature request anymore. I'll do some further tests and close this issue later on.
Patrick
That's a very good news Patrick, because I had no idea how to solve it on my side ! :)
Lol. I got cheated. Ok, my jsfiddle defined width of 50% for the selectmenu. They added a default width of 14em to any selectmenu by default. 14em are (coincidentally) the half width of the dialog.