mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on time tracker
This commit is contained in:
parent
89063f4a9c
commit
50fdf31121
@ -126,6 +126,14 @@ class HomeController extends BaseController
|
||||
return RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function loggedIn()
|
||||
{
|
||||
return RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
@ -121,6 +121,7 @@ if (Utils::isTravis()) {
|
||||
}
|
||||
|
||||
Route::group(['middleware' => ['lookup:user', 'auth:user']], function () {
|
||||
Route::get('logged_in', 'HomeController@loggedIn');
|
||||
Route::get('dashboard', 'DashboardController@index');
|
||||
Route::get('dashboard_chart_data/{group_by}/{start_date}/{end_date}/{currency_id}/{include_expenses}', 'DashboardController@chartData');
|
||||
Route::get('set_entity_filter/{entity_type}/{filter?}', 'AccountController@setEntityFilter');
|
||||
|
@ -2460,7 +2460,7 @@ $LANG = array(
|
||||
'started_task' => 'Successfully started task',
|
||||
'create_client' => 'Create Client',
|
||||
|
||||
'download_app' => 'Download the desktop app',
|
||||
'download_desktop_app' => 'Download the desktop app',
|
||||
|
||||
);
|
||||
|
||||
|
@ -318,6 +318,20 @@
|
||||
projectsForClientMap[client.public_id].push(project);
|
||||
}
|
||||
|
||||
function sendKeepAlive() {
|
||||
setTimeout(function() {
|
||||
$.get('{{ URL::to('/keep_alive') }}', function (response) {
|
||||
if (response == '{{ RESULT_SUCCESS }}') {
|
||||
sendKeepAlive()
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
}).fail(function() {
|
||||
location.reload();
|
||||
});
|
||||
}, 1000 * 60 * 15);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
// setup clients and project comboboxes
|
||||
@ -436,14 +450,15 @@
|
||||
window.open('{{ config('ninja.time_tracker') }}', '_blank');
|
||||
}
|
||||
};
|
||||
toastr.info("{{ trans('texts.download_app') }}", false, options);
|
||||
toastr.info("{{ trans('texts.download_desktop_app') }}", false, options);
|
||||
}
|
||||
|
||||
sendKeepAlive();
|
||||
|
||||
$(window).on('beforeunload', function () {
|
||||
if (navigator.userAgent == 'Time Tracker') {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (model.selectedTask() && model.formChanged()) {
|
||||
return "{{ trans('texts.save_or_discard') }}";
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user