mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Use last settings page with GS shortcut
This commit is contained in:
parent
3dee1692c2
commit
01834935ca
@ -1,11 +1,27 @@
|
||||
@if (!Utils::isPro() && isset($advanced) && $advanced)
|
||||
<div class="alert alert-warning" style="font-size:larger;">
|
||||
<center>
|
||||
{!! trans('texts.pro_plan_advanced_settings', ['link'=>'<a href="javascript:showUpgradeModal()">' . trans('texts.pro_plan_remove_logo_link') . '</a>']) !!}
|
||||
</center>
|
||||
</div>
|
||||
<div class="alert alert-warning" style="font-size:larger;">
|
||||
<center>
|
||||
{!! trans('texts.pro_plan_advanced_settings', ['link'=>'<a href="javascript:showUpgradeModal()">' . trans('texts.pro_plan_remove_logo_link') . '</a>']) !!}
|
||||
</center>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
if (isStorageSupported()) {
|
||||
localStorage.setItem('last:settings_page', location.href);
|
||||
}
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
var target = $(e.target).attr("href") // activated tab
|
||||
if (history.pushState) {
|
||||
history.pushState(null, null, target);
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
@ -337,6 +337,9 @@
|
||||
if (history.pushState) {
|
||||
history.pushState(null, null, target);
|
||||
}
|
||||
if (isStorageSupported() && /\/settings\//.test(location.href)) {
|
||||
localStorage.setItem('last:settings_page', location.href);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -103,7 +103,11 @@
|
||||
});
|
||||
|
||||
Mousetrap.bind('g s', function(e) {
|
||||
location.href = "{{ url('/settings/company_details') }}";
|
||||
var url = '{{ url('/settings/company_details') }}';
|
||||
if (isStorageSupported()) {
|
||||
url = localStorage.getItem('last:settings_page') || url;
|
||||
}
|
||||
location.href = url;
|
||||
});
|
||||
|
||||
Mousetrap.bind('h', function(e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user