Commit 29e6e10b authored by jan.koester's avatar jan.koester
Browse files

test

parent 2e955cfc
Loading
Loading
Loading
Loading
+15 −7
Changes for src/webedit/table/table.cpp: 15 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -589,6 +589,9 @@ extern "C" {
                    el.appendChild(lightStyle);
                }

                // Build a flat list of child widgets for distribution into cells
                const EditPlugin *curChild = child;

                int startRow = 0;

                // Header row
@@ -604,7 +607,13 @@ extern "C" {
                        }
                        th.setAttribute("style", thStyle.c_str());
                        if (!mobileCellCSS.empty()) th.setAttribute("class", cellResponsiveClass.c_str());
                        // Render child widget into header cell if available
                        if (curChild) {
                            curChild->Render(th);
                            curChild = curChild->nextElement();
                        } else {
                            th.appendChild(libhtmlpp::TextElement(getCellVal(0, c).c_str()));
                        }
                        tr.appendChild(th);
                    }
                    thead.appendChild(tr);
@@ -625,7 +634,13 @@ extern "C" {
                        }
                        td.setAttribute("style", tdStyle.c_str());
                        if (!mobileCellCSS.empty()) td.setAttribute("class", cellResponsiveClass.c_str());
                        // Render child widget into cell if available
                        if (curChild) {
                            curChild->Render(td);
                            curChild = curChild->nextElement();
                        } else {
                            td.appendChild(libhtmlpp::TextElement(getCellVal(r, c).c_str()));
                        }
                        tr.appendChild(td);
                    }
                    tbody.appendChild(tr);
@@ -638,13 +653,6 @@ extern "C" {
                    el.appendChild(cssStyle);
                }

                // Recursively render children
                const EditPlugin *cur = child;
                while (cur) {
                    cur->Render(el);
                    cur = cur->nextElement();
                }

                el.appendChild(table);
            }