++
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
.ui-property-label
|
||||
{
|
||||
width: 100%;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.ui-property-content
|
||||
@@ -145,4 +146,22 @@
|
||||
margin-right: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.ui-properties-floating
|
||||
{
|
||||
.ui-property
|
||||
{
|
||||
display: inline-flex;
|
||||
min-height: 52px;
|
||||
}
|
||||
|
||||
.ui-property + .ui-property
|
||||
{
|
||||
padding-top: 0;
|
||||
margin-top: 0;
|
||||
border-left: 1px solid var(--color-line);
|
||||
padding-left: 50px;
|
||||
margin-left: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<div class="ui-datepicker" :class="{'is-disabled': disabled }">
|
||||
<input type="text" class="ui-input ui-datepicker-input" :value="output" @input="onChange" @focus="onFocus" @blur="onBlur" :disabled="disabled" />
|
||||
<i class="fth-calendar ui-datepicker-icon"></i>
|
||||
|
||||
<ui-dropdown ref="overlay" class="ui-datepicker-overlay" @opened="overlayOpened">
|
||||
<div>
|
||||
<datepicker-overlay />
|
||||
</div>
|
||||
</ui-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import Strings from 'zero/services/strings';
|
||||
import DatepickerOverlay from './overlay';
|
||||
import { extend as _extend } from 'underscore';
|
||||
|
||||
export default {
|
||||
name: 'uiDatepicker',
|
||||
|
||||
components: { DatepickerOverlay },
|
||||
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
format: {
|
||||
type: String,
|
||||
default: 'DD.MM.YY HH:mm'
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => { }
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
data: () => ({
|
||||
id: null,
|
||||
output: null
|
||||
}),
|
||||
|
||||
|
||||
watch: {
|
||||
value()
|
||||
{
|
||||
this.updateOutput();
|
||||
},
|
||||
format()
|
||||
{
|
||||
this.updateOutput();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
created()
|
||||
{
|
||||
this.id = 'datepicker-' + Strings.guid();
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
|
||||
updateOutput()
|
||||
{
|
||||
this.output = Strings.date(this.value, this.format);
|
||||
},
|
||||
|
||||
|
||||
onChange(ev)
|
||||
{
|
||||
this.$emit('change', ev.target.value);
|
||||
this.$emit('input', ev.target.value);
|
||||
// TODO this does not trigger the forms dirty flag
|
||||
},
|
||||
|
||||
|
||||
onFocus()
|
||||
{
|
||||
this.$refs.overlay.show();
|
||||
},
|
||||
|
||||
|
||||
onBlur()
|
||||
{
|
||||
this.$refs.overlay.hide();
|
||||
},
|
||||
|
||||
|
||||
overlayOpened()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//pick()
|
||||
//{
|
||||
// this.$el.
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.ui-datepicker
|
||||
{
|
||||
position: relative;
|
||||
max-width: 260px;
|
||||
}
|
||||
|
||||
input[type="text"].ui-datepicker-input
|
||||
{
|
||||
padding-right: 36px;
|
||||
}
|
||||
|
||||
.ui-datepicker-icon
|
||||
{
|
||||
position: absolute;
|
||||
right: 13px;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
font-size: var(--font-size-l);
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<div class="ui-datepicker-overlay">
|
||||
hii
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
props: {
|
||||
model: String,
|
||||
config: Object
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
|
||||
}),
|
||||
|
||||
created()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="app-nav theme-dark">
|
||||
<div class="app-nav">
|
||||
|
||||
<h1 class="app-nav-headline" v-localize="'@zero.name'">zero</h1>
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ button::-moz-focus-inner
|
||||
height: 42px;
|
||||
line-height: 42px !important;
|
||||
border-radius: var(--radius);
|
||||
background: var(--color-bg-mid);
|
||||
background: var(--color-bg-xlight);
|
||||
color: var(--color-fg);
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
|
||||
@import "headlines";
|
||||
|
||||
@import "box";
|
||||
@import "box";
|
||||
|
||||
@import "link";
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
.ui-link
|
||||
{
|
||||
color: var(--color-primary);
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
@@ -38,6 +38,11 @@
|
||||
"title_multiple": "Choose",
|
||||
"title_autocomplete": "Enter a value",
|
||||
"max": "max. {count}"
|
||||
},
|
||||
"date": {
|
||||
"xtoy": "{x} to {y}",
|
||||
"x": "from {x}",
|
||||
"y": "until {y}"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user