diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Default.cshtml b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Default.cshtml index 3ad8147..91ca480 100644 --- a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Default.cshtml +++ b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Default.cshtml @@ -5,7 +5,7 @@ @foreach (var group in Model.GroupBy(sd => sd.Group2)) { -
+

@L[group.Key]

diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/SettingManagement/SettingUi/Index.js b/src/EasyAbp.Abp.SettingUi.Web/Pages/SettingManagement/SettingUi/Index.js index 8efffa7..3a7baad 100644 --- a/src/EasyAbp.Abp.SettingUi.Web/Pages/SettingManagement/SettingUi/Index.js +++ b/src/EasyAbp.Abp.SettingUi.Web/Pages/SettingManagement/SettingUi/Index.js @@ -4,12 +4,8 @@ var l = abp.localization.getResource("EasyAbpAbpSettingUi"); var event_fn = function (id = '') { - $(id + "form").submit(function (e) { + $(id + " form.setting-ui").submit(function (e) { e.preventDefault(); - // Skip abp `EmailSettingsForm` - if (e.currentTarget.id == 'EmailSettingsForm') { - return; - } if (!$(e.currentTarget).valid()) { return; @@ -23,7 +19,7 @@ }); }); - $(id + ".reset").click(function (e) { + $(id + " form.setting-ui .reset").click(function (e) { var form = e.currentTarget.closest("form"); abp.message.confirm( l("ResetConfirm", $(form).find("h4").text()), @@ -48,15 +44,17 @@ var bind_nav_event_fn = function (element) { var btn_set = setInterval(function () { - var _id = '#' + element.data('id') + " "; - event_fn(_id); - if ($(_id + " form").length > 0) { + var _id = '#' + element.data('id').replace(/\./g, '-'); + if ($(_id + " form.setting-ui").length > 0) { + event_fn(_id); + clearInterval(btn_set); + return; + } + + // Rendering is done but not SettingUi. + var target = element.attr('data-bs-target'); + if (target !== undefined && $(target).length > 0) { clearInterval(btn_set); - } else { - var target = element.attr('data-bs-target'); - if (target !== undefined && $(target).length > 0) { - clearInterval(btn_set); - } } }, 200); } @@ -71,10 +69,10 @@ if (location.hash) { var index = location.hash.substring(1); - $("#SettingManagementWrapper li.nav-item > a.nav-link")[index].click(); + $("#tabs-nav .nav-item .nav-link")[index].click(); history.replaceState(null, null, ' '); // remove hash from the location url } // The first nav will automatically click and loading before on this script. - bind_nav_event_fn($("#SettingManagementWrapper li.nav-item > a.nav-link").first()); + bind_nav_event_fn($("#tabs-nav .nav-item .nav-link").first()); })(jQuery);