* updated installation docu #113 * rewritten login page #113 * added icheck plugin #113 * changed to YesNoType in edit forms #113 * updated CONTRIBUTING.md #113 * added start of developer docu #113 * added compile scripts and compiled assets #113
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
/*!
|
|
* Kimai Time-Tracking - toolbar.js
|
|
*
|
|
* This file is part of the Kimai package.
|
|
*
|
|
* (c) Kevin Papst <kevin@kevinpapst.de>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
$(document).ready(function () {
|
|
|
|
// DateRange - TODO improve me, so users can type without reloading in between
|
|
$('.toolbar form input').change(function (event) {
|
|
$('.toolbar form').submit();
|
|
});
|
|
|
|
$('.toolbar form select').change(function (event) {
|
|
switch (event.target.id) {
|
|
case 'customer':
|
|
if ($(this).val() === '') {
|
|
$('.toolbar form select#project').parent().remove();
|
|
} else {
|
|
$('.toolbar form select#project').val('');
|
|
}
|
|
$('.toolbar form select#activity').parent().remove();
|
|
break;
|
|
case 'project':
|
|
if ($(this).val() === '') {
|
|
$('.toolbar form select#activity').parent().remove();
|
|
} else {
|
|
$('.toolbar form select#activity').val('');
|
|
}
|
|
break;
|
|
}
|
|
$('.toolbar form').submit();
|
|
});
|
|
|
|
});
|