View Issue Details

IDProjectCategoryView StatusLast Update
0005751OXID eShop (all versions)3.2. HTML, CSS, JavaScriptpublic2023-11-27 16:29
ReporterFibreFoX Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.8.6 / 5.1.6 
Summary0005751: jQuery UI titlebar is removed on all items (oxmodalpopup.js)
DescriptionThere is a flaw in the jquery-selector:
$('div.ui-dialog-titlebar').remove();

This removes all titlebars, not just the one from the dialog. Its located in line 71 in this file: /out/azure/src/js/widgets/oxmodalpopup.js

Removing ALL titlebars will break some wanted/needed ones from other instanciated dialoges, so this is affecting other themes.
Additional InformationPlease fix thix callback:
open: function(event, ui) {
    $('div.ui-dialog-titlebar').remove();
}


Maybe something like this (havent tested that code):

openDialog: function (target, options) {
    var modalDialog = $(target).dialog({
        width : options.width,
        height : options.height,
        modal : options.modal,
        resizable : options.resizable,
        zIndex : options.zIndex,
        position : options.position,
        draggable : options.draggable,

        open: function(event, ui) {
            $('div.ui-dialog-titlebar', modalDialog).remove();
        }
    });
}
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Activities

FibreFoX

2014-05-07 12:29

reporter   ~0009892

Last edited: 2014-05-07 13:55

another option would be to remove them via CSS so there is no JS needed for it.

EDIT:
my current workaround is this by making a modified copy in my own theme:
open: function(event, ui) {
    $('div.ui-dialog-titlebar', $(this).parent()).hide();
}

svetlana

2014-05-13 14:40

reporter   ~0009906

Reminder sent to: FibreFoX

Hi,

Thanks for the issue, could you provide us more information about it? Could you please send us an example of the HTML code of the theme, where do you get this problem?
Thanks in advance.

FibreFoX

2014-05-13 16:00

reporter   ~0009907

just add another DIV with the class "ui-dialog-titlebar" to the page-template (it doesnt matter where it comes from), after opening the "more pictures"-dialog that div is gone, because the selector is just wrong (because it doesn't have the right scope).

i know its hard to create a test-case, but please dont put this away, it is a bug.

svetlana

2014-05-15 14:58

reporter   ~0009912

Reminder sent to: FibreFoX

Hi,

Thanks for the information, it really helped us to understand the problem better and we continue to investigate this issue.
It would be nice to have a little bit more background about your particular case. Where and how do you use this class? Could you please provide more information about your use case?

FibreFoX

2014-05-15 15:46

reporter   ~0009915

i am using jQueryUI myself in my project using .dialog(), which itself produces that titlebar, i need that titlebar so im confronted with that selector just removing all titlebars instead of just its own one.

the fix is in one of my previous comments https://bugs.oxid-esales.com/view.php?id=5751#c9892

oh, to reproduce it:
1. open own dialog (which has titlebar)
2. close own dialog
3. open oxid-dialog (which removes ALL titlebars)
4. close oxid-dialog
5. re-open own dialog (here it happens, my titlebar is gone)

note that i dont call dialog("destroy")

i hope this helped a little, because i am using the framework if its already in the theme (i made azure the parent-theme)

SvenBrunk

2023-11-27 16:29

administrator   ~0015975

Azure was replaced by Apex. Apex uses Bootstrap 5 including its modal dialogues. Thus this kind of script does not longer exist within the theme.