Skip to content

Commit fb5b4e1

Browse files
committed
Fixed ng-disabled with anchore tags (3.3.0.2)
1 parent f99196a commit fb5b4e1

18 files changed

Lines changed: 75 additions & 55 deletions

File tree

BlogEngine/BlogEngine.Core/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
[assembly: CLSCompliant(false)]
2020
[assembly: ComVisible(false)]
2121
[assembly: AllowPartiallyTrustedCallers]
22-
[assembly: AssemblyVersion("3.3.0.1")]
22+
[assembly: AssemblyVersion("3.3.0.2")]
2323
[assembly: SecurityRules(SecurityRuleSet.Level1)]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static void Initialize(HttpContext context)
3434

3535
RegisterWebApi(GlobalConfiguration.Configuration);
3636

37-
RegisterDiCintainer();
37+
RegisterDiContainer();
3838

3939
ScriptManager.ScriptResourceMapping.AddDefinition("jquery",
4040
new ScriptResourceDefinition
@@ -210,7 +210,7 @@ static void RegisterWebApi(HttpConfiguration config)
210210
config.Services.Add(typeof(IExceptionLogger), new UnhandledExceptionLogger());
211211
}
212212

213-
static void RegisterDiCintainer()
213+
static void RegisterDiContainer()
214214
{
215215
var container = new Container();
216216

BlogEngine/BlogEngine.NET/admin/app/content/blogs/blogController.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ angular.module('blogAdmin').controller('BlogListController', ["$rootScope", "$sc
8080
});
8181
}
8282

83-
$scope.processChecked = function (action) {
84-
processChecked("/api/blogs/processchecked/", action, $scope, dataService);
83+
$scope.processChecked = function (action, itemsChecked) {
84+
if (itemsChecked) {
85+
processChecked("/api/blogs/processchecked/", action, $scope, dataService);
86+
}
8587
}
8688

8789
$scope.load();

BlogEngine/BlogEngine.NET/admin/app/content/blogs/blogView.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ <h2 class="page-title pull-left">
111111
</h2>
112112
<div>
113113
<button ng-click="modalNew()" class="btn btn-success btn-sm btn-hasicon pull-left"><i class="fa fa-plus"></i>{{lbl.theNew}}</button>
114-
<button ng-click="processChecked('delete')" ng-disabled="itemsChecked() === false" class="btn btn-danger btn-sm btn-hasicon pull-left"><i class="fa fa-trash"></i>{{lbl.doDelete}}</button>
114+
<button ng-click="processChecked('delete', itemsChecked())" ng-disabled="itemsChecked() === false" class="btn btn-danger btn-sm btn-hasicon pull-left"><i class="fa fa-trash"></i>{{lbl.doDelete}}</button>
115115
</div>
116116
<div class="search pull-right">
117117
<i class="fa fa-search"></i>

BlogEngine/BlogEngine.NET/admin/app/content/categories/categoryController.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@
6565
$scope.focusInput = false;
6666
}
6767

68-
$scope.processChecked = function (action) {
69-
processChecked("/api/categories/processchecked/", action, $scope, dataService);
68+
$scope.processChecked = function (action, itemsChecked) {
69+
if (itemsChecked) {
70+
processChecked("/api/categories/processchecked/", action, $scope, dataService);
71+
}
7072
}
7173

7274
$scope.clear = function () {

BlogEngine/BlogEngine.NET/admin/app/content/categories/categoryView.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h4 class="modal-title">{{lbl.addNewCategory}}</h4>
3535
<h2 class="page-title pull-left">{{lbl.categories}}</h2>
3636
<a data-ng-click="addNew()" class="btn btn-success btn-hasicon btn-sm pull-left"><i class="fa fa-plus"></i>{{lbl.theNew}}</a>
3737
<div class="btn-group befdv pull-left">
38-
<a ng-click="processChecked('delete')" ng-disabled="itemsChecked() === false" angular-tooltip tooltip="lbl.doDelete" class="btn btn-sm btn-danger"><i class="fa fa-trash"></i></a>
38+
<a ng-click="processChecked('delete', itemsChecked())" ng-disabled="itemsChecked() === false" angular-tooltip tooltip="lbl.doDelete" class="btn btn-sm btn-danger"><i class="fa fa-trash"></i></a>
3939
</div>
4040
<button class="right-side-toggle pull-right"><span></span><span></span><span></span></button>
4141
<div class="right-side pull-right">

BlogEngine/BlogEngine.NET/admin/app/content/comments/commentController.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@
6363
});
6464
}
6565

66-
$scope.processChecked = function (action) {
67-
processChecked("/api/comments/processchecked/", action, $scope, dataService);
66+
$scope.processChecked = function (action, itemsChecked) {
67+
if (itemsChecked) {
68+
processChecked("/api/comments/processchecked/", action, $scope, dataService);
69+
}
6870
}
6971

7072
$scope.deleteAll = function () {

BlogEngine/BlogEngine.NET/admin/app/content/comments/commentFilters.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ <h2 class="page-title pull-left">{{lbl.filters}}</h2>
4949
<button type="button" class="btn btn-default btn-sm btn-hasicon pull-left" onclick="window.history.back()"><i class="fa fa-angle-left"></i>{{lbl.back}}</button>
5050
<button data-toggle="modal" data-target="#AddFilter" class="btn btn-hasicon btn-sm btn-success pull-left"><i class="fa fa-plus"></i>{{lbl.add}}</button>
5151
<div class="btn-group pull-left">
52-
<a ng-click="processChecked('delete')" ng-disabled="itemsChecked() === false" class="btn btn-sm btn-danger" angular-tooltip tooltip="lbl.doDelete"><i class="fa fa-trash"></i></a>
53-
<a data-ng-click="deleteAll()" ng-disabled="itemsChecked() === false" class="btn btn-sm btn-danger" angular-tooltip tooltip="lbl.deleteAll"><i class="fa fa-times"></i></a>
52+
<a ng-click="processChecked('delete', itemsChecked())" ng-disabled="itemsChecked() === false" class="btn btn-sm btn-danger" angular-tooltip tooltip="lbl.doDelete"><i class="fa fa-trash"></i></a>
53+
<a data-ng-click="deleteAll(itemsChecked())" ng-disabled="itemsChecked() === false" class="btn btn-sm btn-danger" angular-tooltip tooltip="lbl.deleteAll"><i class="fa fa-times"></i></a>
5454
</div>
5555
<div class="search pull-right">
5656
<i class="fa fa-search"></i>

BlogEngine/BlogEngine.NET/admin/app/content/comments/commentFilters.js

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,26 @@ angular.module('blogAdmin').controller('CommentFilterController', ["$rootScope",
4343
});
4444
}
4545

46-
$scope.deleteAll = function () {
47-
spinOn();
48-
dataService.updateItem("/api/commentfilter/deleteall/foo", $scope.editItem)
49-
.success(function (data) {
50-
toastr.success($rootScope.lbl.completed);
51-
$scope.load();
52-
spinOff();
53-
})
54-
.error(function () {
55-
toastr.error($rootScope.lbl.failed);
56-
spinOff();
57-
});
46+
$scope.deleteAll = function (itemsChecked) {
47+
if (itemsChecked) {
48+
spinOn();
49+
dataService.updateItem("/api/commentfilter/deleteall/foo", $scope.editItem)
50+
.success(function (data) {
51+
toastr.success($rootScope.lbl.completed);
52+
$scope.load();
53+
spinOff();
54+
})
55+
.error(function () {
56+
toastr.error($rootScope.lbl.failed);
57+
spinOff();
58+
});
59+
}
5860
}
5961

60-
$scope.processChecked = function (action) {
61-
processChecked("/api/commentfilter/processchecked/", action, $scope, dataService);
62+
$scope.processChecked = function (action, itemsChecked) {
63+
if (itemsChecked) {
64+
processChecked("/api/commentfilter/processchecked/", action, $scope, dataService);
65+
}
6266
}
6367

6468
$scope.load();

BlogEngine/BlogEngine.NET/admin/app/content/comments/commentView.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ <h4 class="modal-title">{{vm.Detail.Title}}</h4>
2929
<div class="main-header clearfix">
3030
<h2 class="page-title pull-left">{{lbl.comments}}</h2>
3131
<div class="btn-group pull-left">
32-
<a ng-click="processChecked('delete')" ng-disabled="itemsChecked() === false" class="btn btn-sm btn-danger" angular-tooltip tooltip="lbl.doDelete"><i class="fa fa-trash"></i></a>
32+
<a ng-click="processChecked('delete', itemsChecked())" ng-disabled="itemsChecked() === false" class="btn btn-sm btn-danger" angular-tooltip tooltip="lbl.doDelete"><i class="fa fa-trash"></i></a>
3333
<a ng-show="filter === 'pnd' || filter === 'spm'" ng-click="deleteAll()" class="btn btn-danger btn-sm" angular-tooltip tooltip="lbl.deleteAll"><i class="fa fa-times"></i></a>
34-
<a ng-show="filter != 'spm' && filter != 'png'" ng-click="processChecked('unapprove')" ng-disabled="itemsChecked() === false" class="btn btn-warning btn-sm" angular-tooltip tooltip="lbl.unapprove"><i class="fa fa-archive"></i></a>
35-
<a ng-show="filter != 'apr' && filter != 'png'" ng-click="processChecked('approve')" ng-disabled="itemsChecked() === false" class="btn btn-success btn-sm" angular-tooltip tooltip="lbl.approve"><i class="fa fa-check"></i></a>
34+
<a ng-show="filter != 'spm' && filter != 'png'" ng-click="processChecked('unapprove', itemsChecked())" ng-disabled="itemsChecked() === false" class="btn btn-warning btn-sm" angular-tooltip tooltip="lbl.unapprove"><i class="fa fa-archive"></i></a>
35+
<a ng-show="filter != 'apr' && filter != 'png'" ng-click="processChecked('approve', itemsChecked())" ng-disabled="itemsChecked() === false" class="btn btn-success btn-sm" angular-tooltip tooltip="lbl.approve"><i class="fa fa-check"></i></a>
3636
</div>
3737
<button class="right-side-toggle pull-right"><span></span><span></span><span></span></button>
3838
<div class="right-side pull-right">

0 commit comments

Comments
 (0)