Hi,
Its is implemented in http://localhost:4502/libs/cq/gui/components/common/wcm/clientlibs/wcm.js
$(window).adaptTo("foundation-registry").register("foundation.collection.action.action", {
name: "cq.wcm.delete",
handler: function(name, el, config, collection, selections) {
var message = createEl("div");
var intro = createEl("p").appendTo(message);
if (selections.length === 1) {
intro.text(Granite.I18n.get("You are going to delete the following item:"));
} else {
intro.text(Granite.I18n.get("You are going to delete the following {0} items:", selections.length));
}
var list = [];
var maxCount = Math.min(selections.length, 12);
for (var i = 0, ln = maxCount; i < ln; i++) {
var title = $(selections[i]).find(".foundation-collection-item-title").text();
list.push(createEl("b").text(title).prop("outerHTML"));
}
if (selections.length > maxCount) {
list.push("…"); // … is ellipsis
}
createEl("p").html(list.join("<br>")).appendTo(message);
var ui = $(window).adaptTo("foundation-ui");
ui.prompt(getDeleteText(), message.html(), "notice", [{
text: getCancelText()
}, {
text: getDeleteText(),
warning: true,
handler: function() {
var paths = selections.map(function(v) {
return $(v).data("foundationCollectionItemId");
});
deletePages($(collection), paths, false, true);
}
}]);
}
});