chg: [UI] Replace 'Populate using a template' button with 'Add object' button

pull/8613/head
Jakub Onderka 2022-09-25 11:15:22 +02:00
parent 004116958a
commit b2e8918dac
2 changed files with 11 additions and 4 deletions

View File

@ -148,11 +148,11 @@
array(
'children' => array(
array(
'id' => 'template-button',
'title' => __('Populate using a template'),
'id' => 'object-button',
'title' => __('Add Object'),
'fa-icon' => 'list',
'onClick' => 'getPopup',
'onClickParams' => array($eventId, 'templates', 'templateChoices'),
'onClick' => 'popoverPopupNew',
'onClickParams' => ['this', "$baseurl/objectTemplates/objectMetaChoice/$eventId"],
'requirement' => $mayModify
),
array(

View File

@ -45,6 +45,13 @@ function getShortcutsDefinition(controller, action) {
$('#create-button').click();
}
});
shortcuts.push({
"key": "o",
"description": "Add an object",
"action": function () {
$('#object-button').click();
}
});
shortcuts.push({
"key": "s",
"description": "Focus the filter attribute bar",