diff --git a/public/assets/js/backend/auth/rule.js b/public/assets/js/backend/auth/rule.js index d63c38e9..6020ab72 100755 --- a/public/assets/js/backend/auth/rule.js +++ b/public/assets/js/backend/auth/rule.js @@ -50,7 +50,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function search: false, commonSearch: false, rowAttributes: function (row, index) { - return row.pid == 0 ? {} : {style: "display:none"}; + var expanded = $(".btn-toggle-all i").hasClass("fa-minus"); + return row.pid == 0 || expanded ? {} : {style: "display:none"}; } }); diff --git a/public/assets/js/backend/user/rule.js b/public/assets/js/backend/user/rule.js index 0ba2e809..09f3eed0 100644 --- a/public/assets/js/backend/user/rule.js +++ b/public/assets/js/backend/user/rule.js @@ -42,7 +42,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin search: false, commonSearch: false, rowAttributes: function (row, index) { - return row.pid == 0 ? {} : {style: "display:none"}; + var expanded = $(".btn-toggle-all i").hasClass("fa-minus"); + return row.pid == 0 || expanded ? {} : {style: "display:none"}; } });