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)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:49 +0000 (19:40 +0200)
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>
(cherry picked from commit da0e974db5865daf6d634ae5f7649f5b5fc2ef31)

modules/luci-base/htdocs/luci-static/resources/form.js

index 3d9b18efa5dcb1ca8ebd1f4ea67750c9d13d47cd..2f0fe714a7f30c6caac82d8eb932ecbd1f681e16 100644 (file)
@@ -2401,7 +2401,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'
                                }));