Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8447 closed feature (wontfix)

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 });

Change History (6)

comment:1 Changed 7 years ago by Scott González

Resolution: wontfix
Status: newclosed

Use CSS and add a class.

comment:2 in reply to:  1 Changed 7 years ago by alexandernst

Replying to 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"?

comment:3 Changed 7 years ago by Scott González

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.

comment:4 Changed 7 years ago by alexandernst

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).

comment:5 Changed 7 years ago by Scott González

If by "without borders" you mean "don't render lots of elements" then that would break code written around the markup structure.

comment:6 Changed 7 years ago by alexandernst

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 :)

Note: See TracTickets for help on using tickets.