Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
manuquentin committed May 15, 2015
1 parent 1820df3 commit 68e0fbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/javascripts/ng-admin/Crud/list/Datagrid.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{ field.label() }}
</a>
</th>
<th ng-if="datagrid.shouldDisplayActions()" class="ng-admin-column-actions">
<th ng-if="datagrid.shouldDisplayActions" class="ng-admin-column-actions">
Actions
</th>
</tr>
Expand All @@ -25,7 +25,7 @@
<td ng-repeat="field in fields() track by $index" ng-class="field.getCssClasses(entry)">
<ma-column field="::field" entry="::entry" entity="::entity"></ma-column>
</td>
<td ng-if="datagrid.shouldDisplayActions()" class="ng-admin-column-actions">
<td ng-if="datagrid.shouldDisplayActions" class="ng-admin-column-actions">
<list-actions entry="::entry" entity="::entity" buttons="listActions()"></list-actions>
</td>
</tr>
Expand Down
6 changes: 1 addition & 5 deletions src/javascripts/ng-admin/Crud/list/DatagridController.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ define(function () {
this.$location = $location;
this.$anchorScroll = $anchorScroll;
this.filters = {};
this.shouldDisplayActions = this.$scope.listActions().length > 0;

$scope.toggleSelect = this.toggleSelect.bind(this);
$scope.toggleSelectAll = this.toggleSelectAll.bind(this);
Expand Down Expand Up @@ -119,11 +120,6 @@ define(function () {
this.$scope.selection = [];
};


DatagridController.prototype.shouldDisplayActions = function () {
return this.$scope.listActions().length > 0;
};

DatagridController.$inject = ['$scope', '$location', '$anchorScroll'];

return DatagridController;
Expand Down

0 comments on commit 68e0fbc

Please sign in to comment.