mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 19:14:35 -04:00
Working on time tracker
This commit is contained in:
parent
6a94c45b43
commit
4714cd7595
@ -36,7 +36,8 @@
|
|||||||
"mousetrap": "^1.6.0",
|
"mousetrap": "^1.6.0",
|
||||||
"tablesorter": "jquery.tablesorter#^2.28.4",
|
"tablesorter": "jquery.tablesorter#^2.28.4",
|
||||||
"card": "^2.1.1",
|
"card": "^2.1.1",
|
||||||
"fullcalendar": "^3.5.1"
|
"fullcalendar": "^3.5.1",
|
||||||
|
"toastr": "^2.1.3"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"jquery": "~1.11"
|
"jquery": "~1.11"
|
||||||
|
@ -50,6 +50,7 @@ elixir(function(mix) {
|
|||||||
bowerDir + '/dropzone/dist/dropzone.css',
|
bowerDir + '/dropzone/dist/dropzone.css',
|
||||||
bowerDir + '/spectrum/spectrum.css',
|
bowerDir + '/spectrum/spectrum.css',
|
||||||
bowerDir + '/sweetalert2/dist/sweetalert2.css',
|
bowerDir + '/sweetalert2/dist/sweetalert2.css',
|
||||||
|
bowerDir + '/toastr/toastr.css',
|
||||||
'bootstrap-combobox.css',
|
'bootstrap-combobox.css',
|
||||||
'typeahead.js-bootstrap.css',
|
'typeahead.js-bootstrap.css',
|
||||||
'style.css',
|
'style.css',
|
||||||
@ -156,6 +157,7 @@ elixir(function(mix) {
|
|||||||
//bowerDir + '/sweetalert/dist/sweetalert-dev.js',
|
//bowerDir + '/sweetalert/dist/sweetalert-dev.js',
|
||||||
bowerDir + '/nouislider/distribute/nouislider.js',
|
bowerDir + '/nouislider/distribute/nouislider.js',
|
||||||
bowerDir + '/mousetrap/mousetrap.js',
|
bowerDir + '/mousetrap/mousetrap.js',
|
||||||
|
bowerDir + '/toastr/toastr.js',
|
||||||
bowerDir + '/fuse.js/src/fuse.js',
|
bowerDir + '/fuse.js/src/fuse.js',
|
||||||
'bootstrap-combobox.js',
|
'bootstrap-combobox.js',
|
||||||
'script.js',
|
'script.js',
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
public/css/built.css
vendored
4
public/css/built.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2457,6 +2457,7 @@ $LANG = array(
|
|||||||
'save_or_discard' => 'Save or discard your changes',
|
'save_or_discard' => 'Save or discard your changes',
|
||||||
'discard_changes' => 'Discard Changes',
|
'discard_changes' => 'Discard Changes',
|
||||||
'tasks_not_enabled' => 'Tasks are not enabled.',
|
'tasks_not_enabled' => 'Tasks are not enabled.',
|
||||||
|
'started_task' => 'Successfully started task',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -362,6 +362,9 @@
|
|||||||
model.onArchiveClick();
|
model.onArchiveClick();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
toastr.options.timeOut = 3000;
|
||||||
|
toastr.options.positionClass = 'toast-bottom-right';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$(window).on('beforeunload', function () {
|
$(window).on('beforeunload', function () {
|
||||||
console.log('beforeunload');
|
console.log('beforeunload');
|
||||||
@ -381,6 +384,7 @@
|
|||||||
$('.footer').
|
$('.footer').
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -51,9 +51,14 @@
|
|||||||
self.removeTask(task);
|
self.removeTask(task);
|
||||||
self.selectTask(false);
|
self.selectTask(false);
|
||||||
}
|
}
|
||||||
|
if (action == 'archive') {
|
||||||
|
toastr.success("{{ trans('texts.archived_task') }}");
|
||||||
|
} else if (action == 'delete') {
|
||||||
|
toastr.success("{{ trans('texts.deleted_task') }}");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(error) {
|
error: function(error) {
|
||||||
console.log(error);
|
toastr.error("{{ trans('texts.error_refresh_page') }}");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -384,13 +389,32 @@
|
|||||||
addProjectToMaps(project);
|
addProjectToMaps(project);
|
||||||
refreshProjectList();
|
refreshProjectList();
|
||||||
}
|
}
|
||||||
|
var isNew = !self.public_id();
|
||||||
self.update(response);
|
self.update(response);
|
||||||
model.formChanged(false);
|
model.formChanged(false);
|
||||||
|
if (isNew) {
|
||||||
|
toastr.success("{{ trans('texts.created_task') }}");
|
||||||
|
} else {
|
||||||
|
toastr.success("{{ trans('texts.updated_task') }}");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (self.isRunning()) {
|
||||||
|
if (self.time_log().length == 1) {
|
||||||
|
toastr.success("{{ trans('texts.started_task') }}");
|
||||||
|
} else {
|
||||||
|
toastr.success("{{ trans('texts.resumed_task') }}");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
toastr.success("{{ trans('texts.stopped_task') }}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
self.isStartEnabled(true);
|
self.isStartEnabled(true);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
},
|
},
|
||||||
|
error: function(error) {
|
||||||
|
toastr.error("{{ trans('texts.error_refresh_page') }}");
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user