Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#8324 closed bug (wontfix)

"CSS Scope" definistion not work with dialogClass

Reported by: mostowfim Owned by: mostowfim
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.20
Keywords: Cc:
Blocked by: Blocking:

Description

When defining a CSS Scope in "Advanced Theme Settings", the "dialogClass" option for Jquery dialog not work properly.

The workaround is to edit the css and remove ".ui-dialog" from the file. it is because the .ui-dialog and dialogClass is in the same level in the generated markup for dialog.

Change History (10)

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

Component: ui.coreui.dialog
Owner: set to mostowfim
Status: newpending

This doesn't make any sense. The dialogClass is the scope.

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

Resolution: wontfix
Status: newclosed

ThemeRoller's scoping option and dialog's dialogClass option solve the same problem, but in different ways. There's not really a good way for us to handle this.

comment:4 Changed 8 years ago by mostowfim

it is impossible to define "css scope" in ThemeRoller for applying to "dialog" because the dialog code is generate at the end of the page and there is no surrounding DIV for assigning the class.

the ugly workaround is to use below code: $('.ui-dialog').wrap('<div class="cssscope" />');

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

That's a fairly bad workaround, unless you're writing code to dynamically create and destroy the element on open and close. It also doesn't address scoping the overlay.

comment:6 Changed 8 years ago by Scott González

#8366 is a duplicate of this ticket.

comment:7 Changed 8 years ago by frediani.adrien

Why can't we fix this? A simple solution would be to add a 'scope' option to the widget. Then we can just wrap the dialog dom node with '<div class="${option.scope}">' after it has been appended to the end of document.body. I tested locally and works fine.

line 127 of jquery.ui.dialog.js:

++ .wrap('<div class="custom_scope">'),

comment:8 Changed 8 years ago by Scott González

Adding yet another wrapper is a potentially breaking change.

comment:9 in reply to:  8 Changed 8 years ago by frediani.adrien

Replying to scott.gonzalez:

Adding yet another wrapper is a potentially breaking change.

Ok,any idea on what this could possibly break? Just for my information...

Only thing I can see now would be cleaning this wrapper div on destroy.

Last edited 8 years ago by frediani.adrien (previous) (diff)

comment:10 Changed 8 years ago by Scott González

It would break any script that expects specific elements to be children of .dialog( "widget" ).

Note: See TracTickets for help on using tickets.