mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-21 02:00:54 -04:00
Improvements to keyboard shorcuts
This commit is contained in:
parent
50a84f9ffb
commit
a61a75b007
@ -218,6 +218,12 @@
|
|||||||
|
|
||||||
$('#statusWrapper_{{ $entityType }}').show();
|
$('#statusWrapper_{{ $entityType }}').show();
|
||||||
|
|
||||||
|
|
||||||
|
@for ($i = 1; $i <= 10; $i++)
|
||||||
|
Mousetrap.bind('g {{ $i }}', function(e) {
|
||||||
|
location.href = $('#DataTables_Table_0').find('tr:nth-child({{ $i }})').find('a').attr('href');
|
||||||
|
});
|
||||||
|
@endfor
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -192,7 +192,16 @@
|
|||||||
'r' => ENTITY_RECURRING_INVOICE,
|
'r' => ENTITY_RECURRING_INVOICE,
|
||||||
] as $key => $value)
|
] as $key => $value)
|
||||||
Mousetrap.bind('n {{ $key }}', function(e) {
|
Mousetrap.bind('n {{ $key }}', function(e) {
|
||||||
location.href = "{{ url($value . 's/create') }}";
|
var link = "{{ url($value . 's/create') }}";
|
||||||
|
@if (in_array($value, [ENTITY_INVOICE, ENTITY_PAYMENT, ENTITY_TASK, ENTITY_VENDOR, ENTITY_RECURRING_INVOICE]))
|
||||||
|
if (location.pathname.indexOf('/clients/') >= 0) {
|
||||||
|
var matches = location.pathname.match(/\d+/g);
|
||||||
|
if (matches.length) {
|
||||||
|
link += '/' + matches[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@endif
|
||||||
|
location.href = link;
|
||||||
});
|
});
|
||||||
Mousetrap.bind('l {{ $key }}', function(e) {
|
Mousetrap.bind('l {{ $key }}', function(e) {
|
||||||
location.href = "{{ url($value . 's') }}";
|
location.href = "{{ url($value . 's') }}";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user