configurable print export (#2657)

This commit is contained in:
Kevin Papst
2021-07-13 10:11:20 +02:00
committed by GitHub
parent 7661d43327
commit 27cea996c0
21 changed files with 571 additions and 228 deletions

View File

@@ -93,6 +93,7 @@ require('./js/KimaiWebLoader.js');
global.KimaiPaginatedBoxWidget = require('./js/widgets/KimaiPaginatedBoxWidget').default;
global.KimaiReloadPageWidget = require('./js/widgets/KimaiReloadPageWidget').default;
global.KimaiCookies = require('./js/widgets/KimaiCookies').default;
global.KimaiStorage = require('./js/widgets/KimaiStorage').default;
// ------ Autocomplete for tags only ------
require('jquery-ui/ui/widgets/autocomplete');

View File

@@ -0,0 +1,30 @@
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*!
* [KIMAI] KimaiStorage: simple wrapper to handle localStorage access
*/
export default class KimaiStorage {
static set(name, values) {
window.localStorage.setItem(name, JSON.stringify(values));
}
static get(name) {
let value = window.localStorage.getItem(name);
if (value === undefined || value === null) {
return null;
}
return JSON.parse(value);
}
static remove(name) {
window.localStorage.removeItem(name);
}
}