Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed a bug with deleting a model from changelist inside modal
  • Loading branch information
vxsx committed Sep 29, 2018
1 parent 6eaa3b6 commit 872d588
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cms/static/cms/js/dist/3.5.2/bundle.toolbar.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions cms/static/cms/js/modules/cms.modal.js
Expand Up @@ -776,10 +776,12 @@ class Modal {

var action = item.closest('form').prop('action');

if (action.match(/delete-plugin/)) {
// in case action is an input (see https://github.com/jquery/jquery/issues/3691)
// it's definitely not a plugin/placeholder deletion
if (typeof action === 'string' && action.match(/delete-plugin/)) {
that.justDeletedPlugin = /delete-plugin\/(\d+)\//gi.exec(action)[1];
}
if (action.match(/clear-placeholder/)) {
if (typeof action === 'string' && action.match(/clear-placeholder/)) {
that.justDeletedPlaceholder = /clear-placeholder\/(\d+)\//gi.exec(action)[1];
}
}
Expand Down

0 comments on commit 872d588

Please sign in to comment.