Skip to content

Commit ed9f0f2

Browse files
committed
Remove demo.js
1 parent 1952b0b commit ed9f0f2

File tree

6 files changed

+83
-81
lines changed

6 files changed

+83
-81
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/_Layout.cshtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@
307307
<script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.spin.js" asp-append-version="true"></script>
308308
<script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.sweet-alert.js" asp-append-version="true"></script>
309309
<script src="~/js/admin.js"></script>
310-
<script src="~/js/demo.js"></script>
311310
<script src="~/js/main.js" asp-append-version="true"></script>
312311

313312
@if (SignalRFeature.IsAvailable)

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/bundleconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
"wwwroot/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.spin.js",
8484
"wwwroot/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.sweet-alert.js",
8585
"wwwroot/js/admin.js",
86-
"wwwroot/js/demo.js",
8786
"wwwroot/js/main.js"
8887
]
8988
},

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/js/demo.js

Lines changed: 0 additions & 74 deletions
This file was deleted.

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/js/main.js

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,69 @@
1-
(function ($) {
1+
//Skin changer
2+
function skinChanger() {
3+
$('.right-sidebar .demo-choose-skin li').on('click', function () {
4+
var currentTheme = $('.right-sidebar .demo-choose-skin li.active').data('theme');
5+
$('.right-sidebar .demo-choose-skin li').removeClass('active');
6+
7+
var $selected = $(this);
8+
$selected.addClass('active');
9+
10+
$('body')
11+
.removeClass('theme-' + currentTheme)
12+
.addClass('theme-' + $selected.data('theme'));
13+
});
14+
}
15+
16+
//Skin tab content set height and show scroll
17+
function setSkinListHeightAndScroll() {
18+
var height = $(window).height() - ($('.navbar').innerHeight() + $('.right-sidebar .nav-tabs').outerHeight());
19+
var $el = $('.demo-choose-skin');
20+
21+
$el.slimScroll({ destroy: true }).height('auto');
22+
$el.parent().find('.slimScrollBar, .slimScrollRail').remove();
23+
24+
$el.slimscroll({
25+
height: height + 'px',
26+
color: 'rgba(0,0,0,0.5)',
27+
size: '4px',
28+
alwaysVisible: false,
29+
borderRadius: '0',
30+
railBorderRadius: '0'
31+
});
32+
}
33+
34+
//Setting tab content set height and show scroll
35+
function setSettingListHeightAndScroll() {
36+
var height = $(window).height() - ($('.navbar').innerHeight() + $('.right-sidebar .nav-tabs').outerHeight());
37+
var $el = $('.right-sidebar .demo-settings');
38+
39+
$el.slimScroll({ destroy: true }).height('auto');
40+
$el.parent().find('.slimScrollBar, .slimScrollRail').remove();
41+
42+
$el.slimscroll({
43+
height: height + 'px',
44+
color: 'rgba(0,0,0,0.5)',
45+
size: '4px',
46+
alwaysVisible: false,
47+
borderRadius: '0',
48+
railBorderRadius: '0'
49+
});
50+
}
51+
52+
//Activate notification and task dropdown on top right menu
53+
function activateNotificationAndTasksScroll() {
54+
$('.navbar-right .dropdown-menu .body .menu').slimscroll({
55+
height: '254px',
56+
color: 'rgba(0,0,0,0.5)',
57+
size: '4px',
58+
alwaysVisible: false,
59+
borderRadius: '0',
60+
railBorderRadius: '0'
61+
});
62+
}
63+
64+
65+
(function ($) {
66+
267
//Notification handler
368
abp.event.on('abp.notifications.received', function (userNotification) {
469
abp.notifications.showUiNotifyForUserNotification(userNotification);
@@ -37,4 +102,17 @@
37102
$.blockUI.defaults.baseZ = 2000;
38103
}
39104

105+
//Initialize BSB admin features
106+
$(function () {
107+
skinChanger();
108+
activateNotificationAndTasksScroll();
109+
110+
setSkinListHeightAndScroll();
111+
setSettingListHeightAndScroll();
112+
$(window).resize(function () {
113+
setSkinListHeightAndScroll();
114+
setSettingListHeightAndScroll();
115+
});
116+
});
117+
40118
})(jQuery);

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/view-resources/Views/_Bundles/account-layout.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/view-resources/Views/_Bundles/shared-layout.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)