Only load datetimepicker when neccesary

This commit is contained in:
Katharina Bogad 2021-06-21 19:11:08 +02:00
parent 1515f45e31
commit e030fda01a
2 changed files with 21 additions and 4 deletions

View File

@ -303,5 +303,20 @@ function bundle(cb)
.pipe(dest('.release'))
}
export { build, js, vendor, viewjs, css, live, clean, resourceFileCopy, copyLocales, publish, release, bundle, makeLocales }
export default publish;
export
{
build,
js,
vendor,
viewjs,
css,
live,
clean,
resourceFileCopy,
copyLocales,
publish,
release,
bundle,
makeLocales
}

View File

@ -3,8 +3,10 @@ import { LoadImagesLazy } from '../configs/lazy'
function userfieldsform(Grocy)
{
Grocy.Use("datetimepicker");
if (document.querySelector('.datetimepicker-input') !== null)
{
Grocy.Use("datetimepicker");
}
Grocy.Components.UserfieldsForm = {};
Grocy.Components.UserfieldsForm.Save = function(success, error)