mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Working on the calendar
This commit is contained in:
parent
647c44ee57
commit
dda3cd2e9a
@ -210,6 +210,7 @@ class AccountRepository
|
||||
$features = array_merge($features, [
|
||||
['dashboard', '/dashboard'],
|
||||
['reports', '/reports'],
|
||||
['calendar', '/calendar'],
|
||||
['customize_design', '/settings/customize_design'],
|
||||
['new_tax_rate', '/tax_rates/create'],
|
||||
['new_product', '/products/create'],
|
||||
|
@ -50,8 +50,11 @@
|
||||
$(function() {
|
||||
|
||||
var lastFilter = false;
|
||||
var lastView = 'month';
|
||||
|
||||
if (isStorageSupported()) {
|
||||
lastFilter = JSON.parse(localStorage.getItem('last:calendar_filter'));
|
||||
lastView = localStorage.getItem('last:calendar_view');
|
||||
}
|
||||
|
||||
// Setup state/status filter
|
||||
@ -69,6 +72,12 @@
|
||||
$('#calendar').fullCalendar({
|
||||
locale: '{{ App::getLocale() }}',
|
||||
firstDay: {{ $account->start_of_week ?: '0' }},
|
||||
defaultView: lastView,
|
||||
viewRender: function(view, element) {
|
||||
if (isStorageSupported()) {
|
||||
localStorage.setItem('last:calendar_view', view.name);
|
||||
}
|
||||
},
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
|
@ -159,6 +159,10 @@
|
||||
location.href = "{{ url('/dashboard') }}";
|
||||
});
|
||||
|
||||
Mousetrap.bind('g c', function(e) {
|
||||
location.href = "{{ url('/calendar') }}";
|
||||
});
|
||||
|
||||
Mousetrap.bind('g r', function(e) {
|
||||
location.href = "{{ url('/reports') }}";
|
||||
});
|
||||
|
@ -274,14 +274,14 @@
|
||||
function setFiltersShown() {
|
||||
var val = $('#report_type').val();
|
||||
if (val == '{{ ENTITY_TAX_RATE }}') {
|
||||
$('#dateField').fadeIn();
|
||||
$('#dateField').show();
|
||||
} else {
|
||||
$('#dateField').fadeOut();
|
||||
$('#dateField').hide();
|
||||
}
|
||||
if (val == '{{ ENTITY_INVOICE }}' || val == '{{ ENTITY_PRODUCT }}') {
|
||||
$('#statusField').fadeIn();
|
||||
$('#statusField').show();
|
||||
} else {
|
||||
$('#statusField').fadeOut();
|
||||
$('#statusField').hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user