Permalink
Browse files

Fixed a bug with deleting a model from changelist inside modal

  • Loading branch information...
vxsx committed Aug 31, 2018
1 parent 6eaa3b6 commit 872d588236c42bb03dfde657d8c4bc280a34fb78
Showing with 5 additions and 3 deletions.
  1. +1 −1 cms/static/cms/js/dist/3.5.2/bundle.toolbar.min.js
  2. +4 −2 cms/static/cms/js/modules/cms.modal.js

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -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];
}
}

0 comments on commit 872d588

Please sign in to comment.