Working on time tracker

This commit is contained in:
Hillel Coren 2017-09-26 09:54:36 +03:00
parent aa31a03d7b
commit 89063f4a9c
3 changed files with 16 additions and 6 deletions

View File

@ -2,6 +2,9 @@
return [ return [
// Marketing links
'time_tracker' => env('TIME_TRACKER_URL', 'https://www.invoiceninja.com'),
// Hosted plan coupons // Hosted plan coupons
'coupon_50_off' => env('COUPON_50_OFF', false), 'coupon_50_off' => env('COUPON_50_OFF', false),
'coupon_75_off' => env('COUPON_75_OFF', false), 'coupon_75_off' => env('COUPON_75_OFF', false),

View File

@ -2460,6 +2460,8 @@ $LANG = array(
'started_task' => 'Successfully started task', 'started_task' => 'Successfully started task',
'create_client' => 'Create Client', 'create_client' => 'Create Client',
'download_app' => 'Download the desktop app',
); );
return $LANG; return $LANG;

View File

@ -428,6 +428,17 @@
toastr.options.timeOut = 3000; toastr.options.timeOut = 3000;
toastr.options.positionClass = 'toast-bottom-right'; toastr.options.positionClass = 'toast-bottom-right';
if (navigator.userAgent != 'Time Tracker') {
var options = {
timeOut: 10000,
closeButton: true,
onclick: function() {
window.open('{{ config('ninja.time_tracker') }}', '_blank');
}
};
toastr.info("{{ trans('texts.download_app') }}", false, options);
}
$(window).on('beforeunload', function () { $(window).on('beforeunload', function () {
if (navigator.userAgent == 'Time Tracker') { if (navigator.userAgent == 'Time Tracker') {
return undefined; return undefined;
@ -440,12 +451,6 @@
} }
}); });
/*
$( window ).scroll(function() {
$('.footer').
});
*/
}); });
</script> </script>