Commit 43fffb91 authored by Jörg Richter's avatar Jörg Richter

Adjust multi-command labels

See dmx-platform/dmx-platform#291
parent a918d9cc
Pipeline #7961 passed with stage
in 2 seconds
......@@ -366,7 +366,7 @@ function contextMenus (contextCommands) {
if (cmd.multi) {
const _size = size(arg)
if (_size > 1) {
command.content += ' all ' + _size
command.content += ` ${_size} items`
}
}
// a command can also be disabled by a user-defined "disabled" callback;
......@@ -432,6 +432,8 @@ function idLists () {
}
}
// copy in webclient.js (module dmx-webclient)
// TODO: unify selection models (see selection.js in dmx-topicmaps module)
function size (idLists) {
return idLists.topicIds.length + idLists.assocIds.length
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment