Disable cascading functionnality

3 posts, 0 answers
  1. Benoit
    Benoit avatar
    2 posts
    Member since:
    Mar 2012

    Posted 09 Mar 2012 Link to this post

    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. Benoit
    Benoit avatar
    2 posts
    Member since:
    Mar 2012

    Posted 09 Mar 2012 Link to this post

    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
  3. Kendo UI is VS 2017 Ready
  4. Pauline
    Pauline avatar
    7 posts
    Member since:
    Sep 2013

    Posted 19 Sep 2013 Link to this post

    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.
Back to Top