Commit 61f4ba4f authored by PJ Janse van Rensburg's avatar PJ Janse van Rensburg

Remove conditions around instantiating modelActions.

parent 108cbd75
...@@ -95,6 +95,7 @@ def index(): ...@@ -95,6 +95,7 @@ def index():
# Customized User model admin # Customized User model admin
class UserAdmin(sqla.ModelView): class UserAdmin(sqla.ModelView):
action_disallowed_list = ['delete', ]
column_list = [ column_list = [
'id', 'id',
'last_name', 'last_name',
......
var AdminModelActions = function(actionErrorMessage, actionConfirmations) { var AdminModelActions = function(actionErrorMessage, actionConfirmations) {
// Actions helpers. TODO: Move to separate file // batch actions helpers
this.execute = function(name) { this.execute = function(name) {
var selected = $('input.action-checkbox:checked').length; var selected = $('input.action-checkbox:checked').length;
...@@ -48,6 +48,4 @@ var AdminModelActions = function(actionErrorMessage, actionConfirmations) { ...@@ -48,6 +48,4 @@ var AdminModelActions = function(actionErrorMessage, actionConfirmations) {
}); });
}); });
}; };
if ($('#actions_confirmation').length == 1) { var modelActions = new AdminModelActions(JSON.parse($('#message-data').text()), JSON.parse($('#actions-confirmation-data').text()));
var modelActions = new AdminModelActions(JSON.parse($('#message-data').text()), JSON.parse($('#actions-confirmation-data').text()));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment