diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-01-11 14:24:57 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-01-11 14:24:57 -0800 |
commit | bbe0dee77504ac10ccbe47303771d8e7a7834f5f (patch) | |
tree | 474afed7ab82c999cd0dc167375dcc678c64b4aa /management | |
parent | 390dd606548cb74d99febfb32b7bc3a37fd85f3b (diff) |
test new way of selective hiding hidden item parents
Diffstat (limited to 'management')
-rw-r--r-- | management/editor/editor.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/management/editor/editor.go b/management/editor/editor.go index f71bdaf..2001c39 100644 --- a/management/editor/editor.go +++ b/management/editor/editor.go @@ -157,9 +157,7 @@ func Form(post Editable, fields ...Field) ([]byte, error) { if (id.val() === '-1' || form.attr('action') !== '/admin/edit') { del.hide(); external.hide(); - if (hiddenInput.parent().hasClass('input-field')) { - hiddenInput.parent().hide(); - } + hiddenInput.parent().filter('.input-field').hide() } // hide approval if not on a pending content item @@ -170,10 +168,8 @@ func Form(post Editable, fields ...Field) ([]byte, error) { // no timestamp, slug or hidden input parents visible on addons if (form.attr('action') === '/admin/addon') { timestamp.hide(); - slug.hide(); - if (hiddenInput.parent().hasClass('input-field')) { - hiddenInput.parent().hide(); - } + slug.parent().hide(); + hiddenInput.parent().filter('.input-field').hide() } save.on('click', function(e) { |