luci-base: form.js: fix TableSection descriptions row rendering
authorAnton Kikin <a.kikin@tano-systems.com>
Sun, 19 Apr 2020 02:55:03 +0000 (05:55 +0300)
committerAnton Kikin <a.kikin@tano-systems.com>
Sun, 19 Apr 2020 10:56:24 +0000 (13:56 +0300)
In some cases, a table cell at actions column of a descriptions row
may not be rendered. For example, this happens for GridSection when
sorting is disabled:

    s = m.section(form.GridSection, 'section_type');
    s.sortable = false;

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
modules/luci-base/htdocs/luci-static/resources/form.js

index c65cb04b13833dfb452ee096610fd522d8d76bd3..400ca036a2acb860e3260042a195986ca49e1e00 100644 (file)
@@ -2421,7 +2421,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
                                                (typeof(opt.width) == 'number') ? opt.width+'px' : opt.width;
                        }
 
-                       if (this.sortable || this.extedit || this.addremove || has_more)
+                       if (this.sortable || this.extedit || this.addremove || has_more || has_action)
                                trEl.appendChild(E('div', {
                                        'class': 'th cbi-section-table-cell cbi-section-actions'
                                }));