• Colspan attributes are not always correct

    By Peter LaComb 2 decades ago

    Response columns are (correctly) not rendered as separate columns, but that is not taken into account when setting the colspan attribute.



    Fix is as follows:



    change the block at line 1241 from:



    if (!twistieSwitch) {

                            idex = this.findSpanLength(entry,x);<br/>
                            if(idex &gt; 0) td.colSpan = idex + 1<br/>
                            else if(idex == -1) td.colSpan = this.columns.length - x;<br/>
                        }<br/>
                        <br/>
    

    to:



    if (!twistieSwitch) {

    idex = this.findSpanLength(entry,x);<br/>
    if(idex &gt; 0) {<br/>
        td.colSpan = idex + 1;<br/>
    } else if(idex == -1) {<br/>
        td.colSpan = this.columns.length - (x + ((this.responseColumn &gt; -1) ? 1 : 0));<br/>
    }<br/>
    

    }



    and remove line 1331: (since not having a width causes the cell to expand to fill the available space).

            td.style.width = '50%';