mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01:00
Working on time tracker
This commit is contained in:
parent
70a4aae352
commit
4e28fe02d1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -9,6 +9,8 @@ var isChromium = isChrome && navigator.userAgent.indexOf('Chromium') >= 0;
|
||||
var isChrome48 = isChrome && navigator.userAgent.indexOf('Chrome/48') >= 0;
|
||||
var isIE = /*@cc_on!@*/false || !!document.documentMode; // At least IE6
|
||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
var isAndroid = /Android/i.test(navigator.userAgent);
|
||||
var isIPhone = /iPhone|iPad|iPod/i.test(navigator.userAgent);
|
||||
|
||||
var refreshTimer;
|
||||
function generatePDF(invoice, javascript, force, cb) {
|
||||
|
@ -2460,7 +2460,9 @@ $LANG = array(
|
||||
'started_task' => 'Successfully started task',
|
||||
'create_client' => 'Create Client',
|
||||
|
||||
'download_desktop_app' => 'Download the desktop app',
|
||||
'download_desktop_app' => 'Download desktop app',
|
||||
'download_iphone_app' => 'Download iPhone app',
|
||||
'download_android_app' => 'Download Android app',
|
||||
|
||||
);
|
||||
|
||||
|
@ -460,14 +460,25 @@
|
||||
toastr.options.positionClass = 'toast-bottom-right';
|
||||
|
||||
if (navigator.userAgent != 'Time Tracker') {
|
||||
var link = '{{ config('ninja.time_tracker') }}';
|
||||
var message = "{{ trans('texts.download_desktop_app') }}";
|
||||
if (isMobile) {
|
||||
if (isIPhone) {
|
||||
link = '{{ NINJA_IOS_APP_URL }}';
|
||||
message = "{{ trans('texts.download_iphone_app') }}";
|
||||
} else if (isAndroid) {
|
||||
link = '{{ NINJA_ANDROID_APP_URL }}';
|
||||
message = "{{ trans('texts.download_android_app') }}";
|
||||
}
|
||||
}
|
||||
var options = {
|
||||
timeOut: 10000,
|
||||
closeButton: true,
|
||||
onclick: function() {
|
||||
window.open('{{ config('ninja.time_tracker') }}', '_blank');
|
||||
window.open(link, '_blank');
|
||||
}
|
||||
};
|
||||
toastr.info("{{ trans('texts.download_desktop_app') }}", false, options);
|
||||
toastr.info(message, false, options);
|
||||
}
|
||||
|
||||
sendKeepAlive();
|
||||
|
Loading…
Reference in New Issue
Block a user