mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Ensure ctrl+click opens button clicks in a new window
This commit is contained in:
parent
b34be02030
commit
0be04fa023
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1321,3 +1321,11 @@ function formatXml(xml) {
|
||||
|
||||
return formatted;
|
||||
}
|
||||
|
||||
function openUrlOnClick(url, event) {
|
||||
if (event.ctrlKey) {
|
||||
window.open(url, '_blank');
|
||||
} else {
|
||||
window.location = url;
|
||||
}
|
||||
}
|
||||
|
@ -309,11 +309,11 @@
|
||||
var loadedTabs = {};
|
||||
|
||||
$(function() {
|
||||
$('.normalDropDown:not(.dropdown-toggle)').click(function() {
|
||||
window.location = '{{ URL::to('clients/' . $client->public_id . '/edit') }}';
|
||||
$('.normalDropDown:not(.dropdown-toggle)').click(function(event) {
|
||||
openUrlOnClick('{{ URL::to('clients/' . $client->public_id . '/edit') }}', event);
|
||||
});
|
||||
$('.primaryDropDown:not(.dropdown-toggle)').click(function() {
|
||||
window.location = '{{ URL::to('clients/statement/' . $client->public_id ) }}';
|
||||
$('.primaryDropDown:not(.dropdown-toggle)').click(function(event) {
|
||||
openUrlOnClick('{{ URL::to('clients/statement/' . $client->public_id ) }}', event);
|
||||
});
|
||||
|
||||
// load datatable data when tab is shown and remember last tab selected
|
||||
|
@ -595,12 +595,4 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.normalDropDown:not(.dropdown-toggle)').click(function() {
|
||||
window.location = '{{ URL::to('invoices/create') }}';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
|
@ -58,8 +58,8 @@
|
||||
)->split() !!}
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.recurringDropdown:not(.dropdown-toggle)').click(function() {
|
||||
window.location = '{{ url('/recurring_invoices') }}';
|
||||
$('.recurringDropdown:not(.dropdown-toggle)').click(function(event) {
|
||||
openUrlOnClick('{{ url('/recurring_invoices') }}', event);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -78,11 +78,11 @@
|
||||
)->split() !!}
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.recurringDropdown:not(.dropdown-toggle)').click(function() {
|
||||
window.location = '{{ url('/recurring_expenses') }}';
|
||||
$('.recurringDropdown:not(.dropdown-toggle)').click(function(event) {
|
||||
openUrlOnClick('{{ url('/recurring_expenses') }}', event)
|
||||
});
|
||||
$('.categoriesDropdown:not(.dropdown-toggle)').click(function() {
|
||||
window.location = '{{ url('/expense_categories') }}';
|
||||
$('.categoriesDropdown:not(.dropdown-toggle)').click(function(event) {
|
||||
openUrlOnClick('{{ url('/expense_categories') }}', event);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -96,8 +96,8 @@
|
||||
)->split() !!}
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.projectsDropdown:not(.dropdown-toggle)').click(function() {
|
||||
window.location = '{{ url('projects') }}';
|
||||
$('.projectsDropdown:not(.dropdown-toggle)').click(function(event) {
|
||||
openUrlOnClick('{{ url('/projects') }}', event);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
9
resources/views/vendors/show.blade.php
vendored
9
resources/views/vendors/show.blade.php
vendored
@ -191,15 +191,14 @@
|
||||
var loadedTabs = {};
|
||||
|
||||
$(function() {
|
||||
$('.normalDropDown:not(.dropdown-toggle)').click(function() {
|
||||
window.location = '{{ URL::to('vendors/' . $vendor->public_id . '/edit') }}';
|
||||
$('.normalDropDown:not(.dropdown-toggle)').click(function(event) {
|
||||
openUrlOnClick('{{ URL::to('vendors/' . $vendor->public_id . '/edit') }}', event)
|
||||
});
|
||||
$('.primaryDropDown:not(.dropdown-toggle)').click(function() {
|
||||
window.location = '{{ URL::to('expenses/create/' . $vendor->public_id ) }}';
|
||||
$('.primaryDropDown:not(.dropdown-toggle)').click(function(event) {
|
||||
openUrlOnClick('{{ URL::to('expenses/create/' . $vendor->public_id ) }}', event);
|
||||
});
|
||||
|
||||
$('.nav-tabs a[href="#expenses"]').tab('show');
|
||||
//load_expenses();
|
||||
});
|
||||
|
||||
function onArchiveClick() {
|
||||
|
Loading…
Reference in New Issue
Block a user