Search and Top Navigation
#8447 closed feature (wontfix)
Opened July 18, 2012 09:53AM UTC
Closed July 18, 2012 12:16PM UTC
Last modified July 18, 2012 01:13PM UTC
Borderless dialog
Reported by: | alexandernst | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.dialog | Version: | 1.8.21 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I'm tired of having
$('selector').dialog({});
$('selector').parents(".ui-dialog").find(".ui-dialog-titlebar").remove();
$('selector').parent(".ui-widget-content").css("padding", "0");
$('selector').parents(".ui-dialog").css("border", "0 none");
every time I want to create a borderless dialog. Can this be added in the dialog({}) options?
Something like .dialog({ borderless: True });
Attachments (0)
Change History (6)
Changed July 18, 2012 12:16PM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
Changed July 18, 2012 12:46PM UTC by comment:2
Replying to [comment:1 scott.gonzalez]:
Use CSS and add a class.
That's not a proper solution. All major toolkits (not only web-based, but desktop too) have that option.
Can't see why implementing such a trivial thing can't be done and instead forcing the developer to "Use CSS and add a class".
Wouldn't be an option like { borderless: true } be "code-less-do-more"?
Changed July 18, 2012 12:54PM UTC by comment:3
Well, an option should not do things like setting borders and padding, so what you're asking for is not something we would implement. The only place to do this is in CSS. If we were to implement this, we would do is add CSS rules and the option would do nothing but toggle a class.
Changed July 18, 2012 01:03PM UTC by comment:4
While I'm pro "separate the UI stuff from the core stuff", there are some exceptions where playing around with CSS is adding easiness. Best examples are zIndex, position and size from dialog widget (and probable others).
Also, I haven't read widget's code, but toggling classes shouldn't be necessary if the dialog is built without borders (aka, speed improvement as there are less things to move in the DOM).
Changed July 18, 2012 01:05PM UTC by comment:5
If by "without borders" you mean "don't render lots of elements" then that would break code written around the markup structure.
Changed July 18, 2012 01:13PM UTC by comment:6
Yes, I'm sorry, I just checked and a patch like "if(borderless){ skip widget-base widget-ui .... }" would indeed break a lot of code.
Thank you for your attention :)
Use CSS and add a class.