Highlight the deletable block in red

This commit is contained in:
Amine Ben hammou
2017-12-20 11:17:04 +00:00
committed by Vlad
parent 77e60d708a
commit 56e55c072a

View File

@@ -217,9 +217,19 @@ define([
(new ViewType(_.extend({ model: this.model }, options || {}))).render(); (new ViewType(_.extend({ model: this.model }, options || {}))).render();
}, },
showDeletionConfirmation: function () { showDeletionConfirmation: function () {
this.$('.mailpoet_delete_block')
.closest('.mailpoet_block')
.find('> .mailpoet_block_highlight')
.css({ background: '#E64047', opacity: 0.5 });
this.$('.mailpoet_delete_block').addClass('mailpoet_delete_block_activated'); this.$('.mailpoet_delete_block').addClass('mailpoet_delete_block_activated');
}, },
hideDeletionConfirmation: function () { hideDeletionConfirmation: function () {
this.$('.mailpoet_delete_block')
.closest('.mailpoet_block')
.find('> .mailpoet_block_highlight')
.css({ background: 'transparent', opacity: 1 });
this.$('.mailpoet_delete_block').removeClass('mailpoet_delete_block_activated'); this.$('.mailpoet_delete_block').removeClass('mailpoet_delete_block_activated');
}, },
deleteBlock: function (event) { deleteBlock: function (event) {