jQWidgets Forums

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts

  • gedmarc
    Blocked

    It is either terrible coding on your side, or it is a bug.


    gedmarc
    Blocked

    I’m very sure, that the error is on your side, with the removal of the classes, instead appending the classes.

    Please re-evaluate your response.


    gedmarc
    Blocked

    Please highlight which mistake was used.

    Invalid JQuery selection? $(‘.ClassName’) is most certainly valid?


    gedmarc
    Blocked

    Confirmed hack fixes the problem, javascript looks like this

    
    jqxWidgetPreCallClassFix('UpdateDiv');
    $('#UpdateDiv').jqxRibbon({
      theme : "metrodark",
      height : "100.0%"
    });
    jqxWidgetPostCallClassFix('UpdateDiv');
    

    The DOM Output after calling the post call class fix function now looks like this

    
    demoPanel JQXPanel jqx-widget-content jqx-widget-content-metrodark jqx-ribbon-content-section jqx-ribbon-content-section-metrodark jqx-ribbon-content-section-top jqx-ribbon-content-section-top-metrodark jqx-rc-b jqx-rc-b-metrodark jqx-panel jqx-panel-metrodark jqx-widget jqx-widget-metrodark jqx-rc-all jqx-rc-all-metrodark
    

    And the Invalid Selector problem is now solved with a terrible terrible hack.
    Looking forward to 3.9.2 where this is fixed properly


    gedmarc
    Blocked

    In order to get around this bug for the meantime, I have had to do the following

    
    var divClasses = [];
    function jqxWidgetPreCallClassFix(jqxWidgetID)
    {
        $('#' + jqxWidgetID + ' > div > div').each(function(i, val){
            
            divClasses[i] = $(this).attr('id') + '-' + $(this).attr('class');
            //alert('Index ' + i + '-' + divClasses[i]);
            //divClasses.push($(this).attr('id') + '-' + $(this).attr('class'));
        });
    }
    
    function jqxWidgetPostCallClassFix(jqxWidgetID)
    {
        for	(index = 0; index < divClasses.length; index++) 
        {
            var stringArr = divClasses[index].split('-');
            var compID = stringArr[0];
            var oldClasses = stringArr[1];
            //alert('Old Classes ' + index + '-' + divClasses[index]);
            $('#' + compID).attr('class',oldClasses + ' ' + $('#' + compID).attr('class'));
        } 
    }
    

    Before running any .jqxRibbon, .jqxTree, .jqxNavigationBar I am required to run the pre method before the call, and the post method after the call to get around this.
    Very intensive!

    Please can this be prioritized as it is an obvious bug.

Viewing 5 posts - 1 through 5 (of 5 total)