Skip to content

Commit be70e9c

Browse files
committed
Tweaks in settings/custom
1 parent 2d278c2 commit be70e9c

10 files changed

Lines changed: 12 additions & 157 deletions

File tree

BlogEngine/BlogEngine.NET/AppCode/App_Start/BlogEngineConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static void RegisterBundles(BundleCollection bundles)
156156
.Include("~/admin/controllers/commentfilters.js")
157157
.Include("~/admin/controllers/blogroll.js")
158158
.Include("~/admin/controllers/pings.js")
159-
.Include("~/admin/controllers/packages.js")
159+
.Include("~/admin/controllers/custom.js")
160160
.Include("~/admin/controllers/theme.js")
161161
.Include("~/admin/controllers/common.js")
162162
.Include("~/admin/services.js")

BlogEngine/BlogEngine.NET/BlogEngine.NET.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
<Content Include="admin\controllers\commentfilters.js" />
129129
<Content Include="admin\controllers\help.js" />
130130
<Content Include="admin\controllers\listpager.js" />
131+
<Content Include="admin\controllers\custom.js" />
131132
<Content Include="admin\controllers\theme.js" />
132133
<Content Include="admin\controllers\pings.js" />
133134
<Content Include="admin\controllers\blogroll.js" />
@@ -236,7 +237,6 @@
236237
<Content Include="admin\star-rating.css" />
237238
<Content Include="admin\views\content\blogs.html" />
238239
<Content Include="admin\views\content\files.html" />
239-
<Content Include="admin\views\custom\packages.html" />
240240
<Content Include="admin\views\about\index.html" />
241241
<Content Include="admin\views\gallery\index.html" />
242242
<Content Include="admin\views\settings\controls.html" />
@@ -267,7 +267,7 @@
267267
<Content Include="admin\editors\tinymce\skins\lightgray\fonts\tinymce.eot" />
268268
<Content Include="admin\editors\tinymce\skins\lightgray\fonts\tinymce.ttf" />
269269
<Content Include="admin\editors\tinymce\skins\lightgray\fonts\tinymce.woff" />
270-
<Content Include="admin\editor\_sidebar.cshtml" />
270+
<Content Include="admin\sidebar.cshtml" />
271271
<None Include="App_Data\PublishProfiles\be.pubxml" />
272272
<None Include="App_Data\PublishProfiles\bespa - FTP.pubxml" />
273273
<None Include="App_Data\PublishProfiles\bespa - Web Deploy.pubxml" />
@@ -1495,7 +1495,6 @@
14951495
<Content Include="admin\controllers\comments.js" />
14961496
<Content Include="admin\controllers\common.js" />
14971497
<Content Include="admin\controllers\dashboard.js" />
1498-
<Content Include="admin\controllers\packages.js" />
14991498
<Content Include="admin\controllers\pages.js" />
15001499
<Content Include="admin\controllers\posts.js" />
15011500
<Content Include="admin\controllers\profile.js" />

BlogEngine/BlogEngine.NET/admin/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
.when("/content/files", { templateUrl: "views/content/files.html" })
1515

1616
.when("/custom", { templateUrl: "views/custom/index.html" })
17+
.when("/custom/themes", { templateUrl: "views/custom/themes.html" })
1718
.when("/custom/widgets", { templateUrl: "views/custom/widgets.html" })
1819

1920
.when("/users", { templateUrl: "views/users/index.html" })

BlogEngine/BlogEngine.NET/admin/controllers/packages.js renamed to BlogEngine/BlogEngine.NET/admin/controllers/custom.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ angular.module('blogAdmin').controller('CustomController', ["$rootScope", "$scop
1313
$scope.theme = ($location.search()).id;
1414
$scope.lst = ($location.search()).lst;
1515

16-
$scope.activeTheme = ActiveTheme;
1716
$scope.showRating = false;
1817
$scope.selectedRating = 0;
1918
$scope.author = UserVars.Name;
@@ -24,6 +23,9 @@ angular.module('blogAdmin').controller('CustomController', ["$rootScope", "$scop
2423
if ($location.path().indexOf("/custom") == 0) {
2524
$scope.fltr = 'extensions';
2625
}
26+
if ($location.path().indexOf("/custom/themes") == 0) {
27+
$scope.fltr = 'themes';
28+
}
2729
if ($location.path().indexOf("/custom/widgets") == 0) {
2830
$scope.fltr = 'widgets';
2931
}

BlogEngine/BlogEngine.NET/admin/controllers/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,6 @@
206206

207207
$scope.loadTheme = function () {
208208
var theme = $("#selDesktopTheme option:selected").text();
209-
window.location.assign("#/settings/theme?id=" + theme + "&active=" + $scope.settings.DesktopTheme);
209+
window.location.assign("#/settings/theme?id=" + theme);
210210
}
211211
}]);

BlogEngine/BlogEngine.NET/admin/controllers/theme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ angular.module('blogAdmin').controller('ThemeController', ["$rootScope", "$scope
88
$scope.selectedRating = 0;
99
$scope.author = UserVars.Name;
1010
$scope.id = ($location.search()).id;
11-
$scope.activeTheme = ($location.search()).active;
11+
$scope.activeTheme = ActiveTheme;
1212

1313
$scope.load = function () {
1414
dataService.getItems('/api/packages/' + $scope.id)

BlogEngine/BlogEngine.NET/admin/index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@Styles.Render("~/Content/admincss")
2424
<script type="text/javascript">
2525
var UserVars = { Name: '@Security.CurrentUser.Identity.Name', IsAdmin: '@Security.IsAdministrator', Rights: ['@Html.Raw(userRights)'] };
26-
var ActiveTheme = { Theme: '@BlogSettings.Instance.Theme' }
26+
var ActiveTheme = '@BlogSettings.Instance.Theme'
2727
var ServerTime = '@DateTime.Now'
2828
var UtcTime = '@DateTime.UtcNow'
2929
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {

BlogEngine/BlogEngine.NET/admin/sidebar.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<a href="{{SiteVars.RelativeWebRoot}}admin/#/custom"><i class="fa fa-sliders"></i>@Resources.labels.custom</a>
2323
<ul>
2424
<li data-ng-class="{ active: isActive('/custom')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/custom">@Resources.labels.extensions</a></li>
25+
<li data-ng-class="{ active: isActive('/custom/themes')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/custom/themes">@Resources.labels.themes</a></li>
2526
<li data-ng-class="{ active: isActive('/custom/widgets')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/custom/widgets">@Resources.labels.widgets</a></li>
2627
</ul>
2728
</li>

BlogEngine/BlogEngine.NET/admin/views/custom/packages.html

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

BlogEngine/BlogEngine.NET/admin/views/settings/basic.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h2 class="page-title pull-left">
4444
<div class="col col-md-2">
4545
<div class="btn-group btn-group-justified">
4646
<a class="btn btn-default" title="Details" href="" data-ng-click="loadTheme()"><i class="fa fa-search"></i>&nbsp;</a>
47-
<a class="btn btn-default" title="Find more" href="#/gallery?lst=themelist"><i class="fa fa-download"></i>&nbsp;</a>
47+
<a class="btn btn-default" title="Find more" href="#/gallery"><i class="fa fa-download"></i>&nbsp;</a>
4848
</div>
4949
</div>
5050
</div>

0 commit comments

Comments
 (0)