diff --git a/Bootstrap.Admin/Views/Admin/FAIcon.cshtml b/Bootstrap.Admin/Views/Admin/FAIcon.cshtml index 962399a4..45defd3b 100644 --- a/Bootstrap.Admin/Views/Admin/FAIcon.cshtml +++ b/Bootstrap.Admin/Views/Admin/FAIcon.cshtml @@ -9,4 +9,4 @@ @section javascript { } -@await Html.PartialAsync("IconView") +
\ No newline at end of file diff --git a/Bootstrap.Admin/wwwroot/js/icon.js b/Bootstrap.Admin/wwwroot/js/icon.js index 8d1c80a9..568d5a17 100644 --- a/Bootstrap.Admin/wwwroot/js/icon.js +++ b/Bootstrap.Admin/wwwroot/js/icon.js @@ -1,11 +1,21 @@ $(function () { - var $iconList = $('div.fontawesome-icon-list').on('click', 'a', function () { - window.console.log($(this).children('i').attr('class')); - return false; + $.bc({ + url: Menu.iconView, + contentType: 'text/html', + dataType: 'html', + callback: function (result) { + if (result) { + $('#main-content').html(result); + var $iconList = $('div.fontawesome-icon-list').on('click', 'a', function () { + window.console.log($(this).children('i').attr('class')); + return false; + }); + + $iconList.find('ul li').addClass('col-xl-2 col-md-3 col-sm-4 col-6'); + $iconList.find('div').addClass('col-xl-2 col-6'); + + $('#main-content').scrollspy({ offset: 150, target: '.fa-nav' }); + } + } }); - - $iconList.find('ul li').addClass('col-xl-2 col-md-3 col-sm-4 col-6'); - $iconList.find('div').addClass('col-xl-2 col-6'); - - $('#main-content').scrollspy({ offset: 150, target: '.fa-nav' }); }); \ No newline at end of file