This is a migrated thread and some comments may be shown as answers.

Disable cascading functionnality

2 Answers 71 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Benoit
Top achievements
Rank 1
Benoit asked on 09 Mar 2012, 10:45 AM
Hello,

I'm using the PanelBar and my problem is that when i have UL elements imbricated in others UL elements, the UL children have the PanelBar functionnality activated althought i don't want it so.

Code example (i don't want the UL with the "NOT-EXPANDABLE" class to be used as a PanelBar) :

<ul class="expandable">
    <li>
        Projects
        <ul>
            <li>
                Sales Forecasts
                <ul class="NOT-EXPANDABLE">
                    <li>Q1 Forecast</li>
                    <li>Q2 Forecast</li>
                    <li>Q3 Forecast</li>
                    <li>Q4 Forecast</li>
                </ul>
            </li>
            <li>Sales Reports</li>
        </ul>
    </li>
</ul>


Thanks a lot for your help !

2 Answers, 1 is accepted

Sort by
0
Benoit
Top achievements
Rank 1
answered on 09 Mar 2012, 01:37 PM
I solved my problem but i don't know if it's the best solution ... Anyway, if it could help, here is the modified "kendo.all.js" file.
Modified lines :

L 16322 : I added an option to the defaults (true : will work like the default library, false : will only activate the PanelBar on the main parent and no its children)

expandAllSubItems: false

L 16687 - 16696 :

if(that.options.expandAllSubItems == false)
{
    updateItemClasses(items[0], that.element);
}
else
{
    items.each(function () {
        updateItemClasses(this, that.element);
    });
}

And here we are !

If you've got something better, i'd enjoying to hear it :)

Bye
0
Pauline
Top achievements
Rank 1
answered on 19 Sep 2013, 11:45 PM
I worked around this by using a dl-dt (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl) structure instead of ul for the lists I didn't want to collapse in the PanelBar.
Tags
PanelBar
Asked by
Benoit
Top achievements
Rank 1
Answers by
Benoit
Top achievements
Rank 1
Pauline
Top achievements
Rank 1
Share this question
or