added keyboard shortcuts (#3536)
This commit is contained in:
16
SECURITY.md
16
SECURITY.md
@@ -4,21 +4,21 @@
|
|||||||
|
|
||||||
As announced in the [README](README.md) I only support the latest available release and master.
|
As announced in the [README](README.md) I only support the latest available release and master.
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
|---------|--------------------|
|
|----------------------|--------------------|
|
||||||
| master | :white_check_mark: |
|
| master | :white_check_mark: |
|
||||||
| 1.24 | :white_check_mark: |
|
| latest minor release | :white_check_mark: |
|
||||||
| < 1.24 | :x: |
|
| older releases | :x: |
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
Please read the [Bughunter](https://www.kimai.org/documentation/bughunter.html) documentation before posting,
|
Please read the [Bughunter](https://www.kimai.org/documentation/bughunter.html) documentation before posting.
|
||||||
and then you can report any security related vulnerability in the [advisories section at GitHub](https://github.com/kevinpapst/kimai2/security/advisories) or via email to kpapst@gmx.net.
|
Xou can report any security related vulnerability in the [advisories section at GitHub](https://github.com/kevinpapst/kimai2/security/advisories) or via email to kpapst@gmx.net.
|
||||||
|
|
||||||
I will work as fast as I can to fix the problem and publish a bugfix release / security update.
|
I will work as fast as I can to fix the problem and publish a bugfix release / security update.
|
||||||
Depending on the size of the required fixes, this might take a couple of hours or a couple of days.
|
Depending on the size of the required fixes, this might take a couple of hours or a couple of days.
|
||||||
|
|
||||||
You can expect that your message will be answered ASAP.
|
You can expect that your message will be answered ASAP.
|
||||||
|
|
||||||
You will be mentioned in the release notes if your issue is valid and after it was fixed.
|
You will be mentioned in the release notes if your issue is valid.
|
||||||
I am grateful for any (discrete) disclosure of vulnerabilities!
|
I am grateful for any (discrete) disclosure of vulnerabilities!
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ class PageActionsEvent extends ThemeEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->addAction('search', ['modal' => '#modal_search', 'label' => $label]);
|
$this->addAction('search', ['modal' => '#modal_search', 'label' => $label, 'accesskey' => 'q']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addQuickExport(string $url): void
|
public function addQuickExport(string $url): void
|
||||||
@@ -148,12 +148,12 @@ class PageActionsEvent extends ThemeEvent
|
|||||||
|
|
||||||
public function addCreate(string $url, bool $modal = true): void
|
public function addCreate(string $url, bool $modal = true): void
|
||||||
{
|
{
|
||||||
$this->addAction('create', ['url' => $url, 'class' => ($modal ? 'modal-ajax-form' : '')]);
|
$this->addAction('create', ['url' => $url, 'class' => ($modal ? 'modal-ajax-form' : ''), 'accesskey' => 'a']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addHelp(string $url): void
|
public function addHelp(string $url): void
|
||||||
{
|
{
|
||||||
$this->addAction('help', ['url' => $url, 'target' => '_blank']);
|
$this->addAction('help', ['url' => $url, 'target' => '_blank', 'accesskey' => 'h']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addBack(string $url): void
|
public function addBack(string $url): void
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
{% set entry = active_timesheets[0] %}
|
{% set entry = active_timesheets[0] %}
|
||||||
<div class="ddt-small ticktac-single ticktac-running">
|
<div class="ddt-small ticktac-single ticktac-running">
|
||||||
<div class="ticktac-stop">
|
<div class="ticktac-stop">
|
||||||
<a data-replacer="url" class="api-link" href="{{ path('stop_timesheet', {'id' : entry.id}) }}" data-event="kimai.timesheetStop kimai.timesheetUpdate" data-method="PATCH" data-msg-error="timesheet.stop.error" data-msg-success="timesheet.stop.success">
|
<a accesskey="s" data-replacer="url" class="api-link" href="{{ path('stop_timesheet', {'id' : entry.id}) }}" data-event="kimai.timesheetStop kimai.timesheetUpdate" data-method="PATCH" data-msg-error="timesheet.stop.error" data-msg-success="timesheet.stop.success">
|
||||||
<i class="{{ 'stop-small'|icon }} fa-2x"></i><span data-replacer="duration" data-title="true" data-since="{{ entry.begin is null ? '' : entry.begin|date_format(constant('DATE_ISO8601')) }}">{{ entry|duration }}</span>
|
<i class="{{ 'stop-small'|icon }} fa-2x"></i><span data-replacer="duration" data-title="true" data-since="{{ entry.begin is null ? '' : entry.begin|date_format(constant('DATE_ISO8601')) }}">{{ entry|duration }}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
<ul class="menu">
|
<ul class="menu">
|
||||||
{% for entry in active_timesheets %}
|
{% for entry in active_timesheets %}
|
||||||
<li data-template="active-record">
|
<li data-template="active-record">
|
||||||
<a data-replacer="url" href="{{ path('stop_timesheet', {'id' : entry.id}) }}" class="api-link" data-event="kimai.timesheetStop kimai.timesheetUpdate" data-method="PATCH" data-msg-error="timesheet.stop.error" data-msg-success="timesheet.stop.success">
|
<a accesskey="s" data-replacer="url" href="{{ path('stop_timesheet', {'id' : entry.id}) }}" class="api-link" data-event="kimai.timesheetStop kimai.timesheetUpdate" data-method="PATCH" data-msg-error="timesheet.stop.error" data-msg-success="timesheet.stop.success">
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<i class="{{ 'stop-small'|icon }} fa-2x"></i>
|
<i class="{{ 'stop-small'|icon }} fa-2x"></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -174,13 +174,13 @@
|
|||||||
<li class="messages-menu-empty" style="{% if hasActiveRecords %}display:none{% endif %}">
|
<li class="messages-menu-empty" style="{% if hasActiveRecords %}display:none{% endif %}">
|
||||||
{% if active_limit == 1 %}
|
{% if active_limit == 1 %}
|
||||||
<div class="ddt-small ticktac-single ticktac-stopped">
|
<div class="ddt-small ticktac-single ticktac-stopped">
|
||||||
<a href="{{ path('timesheet_create') }}" class="modal-ajax-form ticktac-start">
|
<a accesskey="n" href="{{ path('timesheet_create') }}" class="modal-ajax-form ticktac-start">
|
||||||
<i class="{{ 'start'|icon }} fa-2x"></i>
|
<i class="{{ 'start'|icon }} fa-2x"></i>
|
||||||
<span>{{ 0|duration }}</span>
|
<span>{{ 0|duration }}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ path('timesheet_create') }}" class="ddt-small ticktac-start modal-ajax-form">
|
<a accesskey="n" href="{{ path('timesheet_create') }}" class="ddt-small ticktac-start modal-ajax-form">
|
||||||
<i class="{{ 'start'|icon }} fa-2x"></i>
|
<i class="{{ 'start'|icon }} fa-2x"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -360,6 +360,7 @@
|
|||||||
{% set disabled = false %}
|
{% set disabled = false %}
|
||||||
{% set attr = {} %}
|
{% set attr = {} %}
|
||||||
{% set label = null %}
|
{% set label = null %}
|
||||||
|
{% set accesskey = null %}
|
||||||
{% set translation_domain = 'messages' %}
|
{% set translation_domain = 'messages' %}
|
||||||
{% if type is same as (false) %}
|
{% if type is same as (false) %}
|
||||||
{% set class = "" %}
|
{% set class = "" %}
|
||||||
@@ -397,6 +398,7 @@
|
|||||||
{% set attr = values.attr ?? {} %}
|
{% set attr = values.attr ?? {} %}
|
||||||
{% set label = values.label ?? null %}
|
{% set label = values.label ?? null %}
|
||||||
{% set translation_domain = values.translation_domain ?? translation_domain %}
|
{% set translation_domain = values.translation_domain ?? translation_domain %}
|
||||||
|
{% set accesskey = values.accesskey ?? null %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if disabled is same as (true) %}
|
{% if disabled is same as (true) %}
|
||||||
@@ -410,6 +412,7 @@
|
|||||||
{%- if modal is not empty %} data-toggle="modal" data-target="{{ modal }}"{% endif %}
|
{%- if modal is not empty %} data-toggle="modal" data-target="{{ modal }}"{% endif %}
|
||||||
{%- if onclick is not empty %} onclick="{{ onclick }}"{% endif %}
|
{%- if onclick is not empty %} onclick="{{ onclick }}"{% endif %}
|
||||||
{%- if target is not empty %} target="{{ target }}"{% endif %}
|
{%- if target is not empty %} target="{{ target }}"{% endif %}
|
||||||
|
{%- if accesskey is not empty %} accesskey="{{ accesskey }}"{% endif %}
|
||||||
{%- if attr is not empty %}
|
{%- if attr is not empty %}
|
||||||
{% for name, value in attr %}
|
{% for name, value in attr %}
|
||||||
{{ ' ' ~ name }}={% if '"' in value %}'{{ value|raw }}'{% else %}"{{ value|raw }}"{% endif %}
|
{{ ' ' ~ name }}={% if '"' in value %}'{{ value|raw }}'{% else %}"{{ value|raw }}"{% endif %}
|
||||||
|
|||||||
@@ -95,12 +95,12 @@ class PageActionsEventTest extends TestCase
|
|||||||
$this->assertEquals(8, $sut->countActions());
|
$this->assertEquals(8, $sut->countActions());
|
||||||
|
|
||||||
$expected = [
|
$expected = [
|
||||||
'search' => ['modal' => '#modal_search', 'label' => null],
|
'search' => ['modal' => '#modal_search', 'label' => null, 'accesskey' => 'q'],
|
||||||
'divider0' => null,
|
'divider0' => null,
|
||||||
'back' => ['url' => 'foo1', 'translation_domain' => 'actions'],
|
'back' => ['url' => 'foo1', 'translation_domain' => 'actions'],
|
||||||
'visibility' => ['modal' => '#foo2'],
|
'visibility' => ['modal' => '#foo2'],
|
||||||
'help' => ['url' => 'foo4', 'target' => '_blank'],
|
'help' => ['url' => 'foo4', 'target' => '_blank', 'accesskey' => 'h'],
|
||||||
'create' => ['url' => 'foo5', 'class' => 'modal-ajax-form'],
|
'create' => ['url' => 'foo5', 'class' => 'modal-ajax-form', 'accesskey' => 'a'],
|
||||||
'download' => ['url' => 'foo7', 'class' => 'toolbar-action'],
|
'download' => ['url' => 'foo7', 'class' => 'toolbar-action'],
|
||||||
'trash' => ['url' => 'foo3', 'class' => 'modal-ajax-form text-red'],
|
'trash' => ['url' => 'foo3', 'class' => 'modal-ajax-form text-red'],
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user