Metro-UI-CSS icon indicating copy to clipboard operation
Metro-UI-CSS copied to clipboard

Scrollbar area within a dialog

Open elk153 opened this issue 12 years ago • 0 comments

Hello,

I'm trying to have a scrollbar area (within a panel) in a dialog window (flat, overlay). Here is how I call it

$.Dialog({
    shadow: true,
    overlay: true,
    flat: true,
    title: mdrSubject,
    content: mdrContent,
    padding: 10,
    height: '60%',
    width: '85%',
    onShow: function(_dialog){
        var content = _dialog.children('.content');

        /*  Resize panel-content with scroll bar and reload js
            Bug: resize OK but scrollbar not working.
        */
        $('.scrollbox').scrollbar({
            height: '150',
            axis: 'y'
        });
        $.Metro.initInputs();

    }
} );

As I have multiple instances I want to have scrollable, I used a class. mdrContent provides the panel

...
<div class="panel-content">
    <div class="scrollbox" data-role="scrollbox" data-scroll="vertical">
        <xsl:call-template name="escapeQuotes">
            <xsl:with-param name="pString" select="@STAFF_ANALYSIS" />
        </xsl:call-template>
    </div>
</div>
...

To make sure I loaded what is needed, I copied/pasted the example from the metro-ui-css website onto my mainpage and it works.

The scrollbar does not show up and the page body keeps the scroll.

I don't know if I do something wrong or if it's not possible.

elk153 avatar Apr 29 '14 11:04 elk153