Skip to content
Snippets Groups Projects
Unverified Commit cdf6702d authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

naming method

parent b5e15a04
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
$(function () {
'use strict';
var cleanupTest = function ($field) {
var cleanEmptyAttachments = function ($field) {
$('action-text-attachment', $field).each(function (_, attachment) {
var hasImage = $('img', attachment).length > 0,
hasVideo = $('video', attachment).length > 0,
......@@ -65,13 +65,13 @@ $(function () {
attachmentUpload.start();
},
onMediaDelete: function (_, $editable) {
cleanupTest($editable);
cleanEmptyAttachments($editable);
},
onKeyup: function (e) {
// Delete
var $editable = $(e.currentTarget);
if (e.keyCode === 8) {
cleanupTest($editable);
cleanEmptyAttachments($editable);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment