Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
61f4ba4f
Commit
61f4ba4f
authored
Oct 16, 2018
by
PJ Janse van Rensburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove conditions around instantiating modelActions.
parent
108cbd75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
app.py
examples/sqla/app.py
+1
-0
actions.js
flask_admin/static/admin/js/actions.js
+2
-4
No files found.
examples/sqla/app.py
View file @
61f4ba4f
...
...
@@ -95,6 +95,7 @@ def index():
# Customized User model admin
class
UserAdmin
(
sqla
.
ModelView
):
action_disallowed_list
=
[
'delete'
,
]
column_list
=
[
'id'
,
'last_name'
,
...
...
flask_admin/static/admin/js/actions.js
View file @
61f4ba4f
var
AdminModelActions
=
function
(
actionErrorMessage
,
actionConfirmations
)
{
//
Actions helpers. TODO: Move to separate file
//
batch actions helpers
this
.
execute
=
function
(
name
)
{
var
selected
=
$
(
'input.action-checkbox:checked'
).
length
;
...
...
@@ -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
()));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment