2018-02-18 03:18:37 +00:00
|
|
|
<template lang='pug'>
|
2018-07-15 23:16:19 +00:00
|
|
|
v-bottom-sheet(
|
|
|
|
v-model='isShown'
|
|
|
|
inset
|
|
|
|
)
|
|
|
|
.dialog-header
|
2018-02-18 03:18:37 +00:00
|
|
|
v-icon(color='white') sort_by_alpha
|
2018-07-15 23:16:19 +00:00
|
|
|
.subheading.white--text.ml-2 Page Properties
|
2018-02-18 03:18:37 +00:00
|
|
|
v-spacer
|
2018-07-15 23:16:19 +00:00
|
|
|
v-btn(
|
|
|
|
outline
|
|
|
|
dark
|
|
|
|
@click.native='close'
|
|
|
|
)
|
|
|
|
v-icon(left) close
|
|
|
|
span Close
|
|
|
|
v-card(tile)
|
2018-02-18 03:18:37 +00:00
|
|
|
v-card-text
|
2018-07-15 23:16:19 +00:00
|
|
|
v-subheader.pl-0 Page Info
|
|
|
|
v-text-field(
|
2018-07-16 02:40:41 +00:00
|
|
|
ref='iptTitle'
|
2018-07-15 23:16:19 +00:00
|
|
|
outline
|
|
|
|
background-color='grey lighten-2'
|
|
|
|
label='Title'
|
|
|
|
counter='255'
|
|
|
|
v-model='title'
|
|
|
|
)
|
|
|
|
v-text-field(
|
|
|
|
outline
|
|
|
|
background-color='grey lighten-2'
|
|
|
|
label='Short Description'
|
|
|
|
counter='255'
|
|
|
|
v-model='description'
|
|
|
|
)
|
|
|
|
v-text-field(
|
|
|
|
outline
|
|
|
|
background-color='grey lighten-2'
|
|
|
|
label='Path'
|
|
|
|
prefix='/'
|
|
|
|
append-icon='folder'
|
|
|
|
v-model='path'
|
|
|
|
)
|
|
|
|
v-divider
|
|
|
|
v-card-text
|
|
|
|
v-subheader.pl-0 Tags
|
2018-07-16 02:40:41 +00:00
|
|
|
v-combobox(
|
2018-07-15 23:16:19 +00:00
|
|
|
background-color='grey lighten-2'
|
|
|
|
chips
|
|
|
|
deletable-chips
|
|
|
|
hide-details
|
|
|
|
label='Tags'
|
|
|
|
outline
|
2018-07-16 02:40:41 +00:00
|
|
|
multiple
|
2018-07-15 23:16:19 +00:00
|
|
|
v-model='tags'
|
|
|
|
single-line
|
|
|
|
)
|
|
|
|
v-divider
|
2018-07-16 02:40:41 +00:00
|
|
|
v-card-text.pb-5
|
2018-07-15 23:16:19 +00:00
|
|
|
v-subheader.pl-0 Publishing State
|
2018-07-16 02:40:41 +00:00
|
|
|
v-container.pa-0(fluid, grid-list-lg)
|
|
|
|
v-layout(row, wrap)
|
|
|
|
v-flex(xs12, md4)
|
|
|
|
v-switch(
|
|
|
|
label='Published'
|
|
|
|
v-model='isPublished'
|
|
|
|
color='primary'
|
2018-07-15 23:16:19 +00:00
|
|
|
)
|
2018-07-16 02:40:41 +00:00
|
|
|
v-flex(xs12, md4)
|
|
|
|
v-dialog(
|
|
|
|
ref='menuPublishStart'
|
|
|
|
lazy
|
|
|
|
:close-on-content-click='false'
|
|
|
|
v-model='isPublishStartShown'
|
|
|
|
:return-value.sync='publishStartDate'
|
|
|
|
full-width
|
|
|
|
width='460px'
|
|
|
|
:disabled='!isPublished'
|
2018-07-15 23:16:19 +00:00
|
|
|
)
|
2018-07-16 02:40:41 +00:00
|
|
|
v-text-field(
|
|
|
|
slot='activator'
|
|
|
|
label='Publish starting on...'
|
|
|
|
v-model='publishStartDate'
|
|
|
|
prepend-icon='event'
|
|
|
|
readonly
|
|
|
|
outline
|
|
|
|
background-color='grey lighten-2'
|
|
|
|
clearable
|
|
|
|
hint='Leave empty for no start date'
|
|
|
|
persistent-hint
|
|
|
|
:disabled='!isPublished'
|
|
|
|
)
|
|
|
|
v-date-picker(
|
|
|
|
v-model='publishStartDate'
|
|
|
|
:min='(new Date()).toISOString().substring(0, 10)'
|
2018-07-15 23:16:19 +00:00
|
|
|
color='primary'
|
2018-07-16 02:40:41 +00:00
|
|
|
reactive
|
|
|
|
scrollable
|
|
|
|
landscape
|
|
|
|
)
|
|
|
|
v-spacer
|
|
|
|
v-btn(
|
|
|
|
flat=''
|
|
|
|
color='primary'
|
|
|
|
@click='isPublishStartShown = false'
|
|
|
|
) Cancel
|
|
|
|
v-btn(
|
|
|
|
flat=''
|
|
|
|
color='primary'
|
|
|
|
@click='$refs.menuPublishStart.save(publishStartDate)'
|
|
|
|
) OK
|
|
|
|
v-flex(xs12, md4)
|
|
|
|
v-dialog(
|
|
|
|
ref='menuPublishEnd'
|
|
|
|
lazy
|
|
|
|
:close-on-content-click='false'
|
|
|
|
v-model='isPublishEndShown'
|
|
|
|
:return-value.sync='publishEndDate'
|
|
|
|
full-width
|
|
|
|
width='460px'
|
|
|
|
:disabled='!isPublished'
|
|
|
|
)
|
|
|
|
v-text-field(
|
|
|
|
slot='activator'
|
|
|
|
label='Publish ending on...'
|
|
|
|
v-model='publishEndDate'
|
|
|
|
prepend-icon='event'
|
|
|
|
readonly
|
|
|
|
outline
|
|
|
|
background-color='grey lighten-2'
|
|
|
|
clearable
|
|
|
|
hint='Leave empty for no end date'
|
|
|
|
persistent-hint
|
|
|
|
:disabled='!isPublished'
|
|
|
|
)
|
|
|
|
v-date-picker(
|
|
|
|
v-model='publishEndDate'
|
|
|
|
:min='(new Date()).toISOString().substring(0, 10)'
|
2018-07-15 23:16:19 +00:00
|
|
|
color='primary'
|
2018-07-16 02:40:41 +00:00
|
|
|
reactive
|
|
|
|
scrollable
|
|
|
|
landscape
|
|
|
|
)
|
|
|
|
v-spacer
|
|
|
|
v-btn(
|
|
|
|
flat=''
|
|
|
|
color='primary'
|
|
|
|
@click='isPublishEndShown = false'
|
|
|
|
) Cancel
|
|
|
|
v-btn(
|
|
|
|
flat=''
|
|
|
|
color='primary'
|
|
|
|
@click='$refs.menuPublishEnd.save(publishEndDate)'
|
|
|
|
) OK
|
|
|
|
|
|
|
|
v-tour(name='editorPropertiesTour', :steps='tourSteps')
|
2018-02-18 03:18:37 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-07-16 02:40:41 +00:00
|
|
|
import _ from 'lodash'
|
2018-07-15 23:16:19 +00:00
|
|
|
import { sync } from 'vuex-pathify'
|
|
|
|
|
2018-02-18 03:18:37 +00:00
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
2018-07-15 23:16:19 +00:00
|
|
|
isShown: false,
|
|
|
|
isPublishStartShown: false,
|
2018-07-16 02:40:41 +00:00
|
|
|
isPublishEndShown: false,
|
|
|
|
tourSteps: [
|
|
|
|
{
|
|
|
|
target: '.dialog-header',
|
|
|
|
content: `First-time tour help here. <strong>TODO</strong>!`
|
|
|
|
}
|
|
|
|
]
|
2018-02-19 20:41:36 +00:00
|
|
|
}
|
|
|
|
},
|
2018-07-15 23:16:19 +00:00
|
|
|
computed: {
|
|
|
|
title: sync('editor/title'),
|
|
|
|
description: sync('editor/description'),
|
|
|
|
tags: sync('editor/tags'),
|
|
|
|
path: sync('editor/path'),
|
|
|
|
isPublished: sync('editor/isPublished'),
|
|
|
|
publishStartDate: sync('editor/publishStartDate'),
|
|
|
|
publishEndDate: sync('editor/publishEndDate')
|
|
|
|
},
|
2018-02-19 20:41:36 +00:00
|
|
|
mounted() {
|
|
|
|
this.isShown = true
|
2018-07-16 02:40:41 +00:00
|
|
|
_.delay(() => {
|
|
|
|
this.$refs.iptTitle.focus()
|
|
|
|
// this.$tours['editorPropertiesTour'].start()
|
|
|
|
}, 500)
|
2018-02-19 20:41:36 +00:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
close() {
|
|
|
|
this.isShown = false
|
2018-03-19 03:12:56 +00:00
|
|
|
this.$parent.$parent.closeModal()
|
2018-02-18 03:18:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang='scss'>
|
|
|
|
|
|
|
|
</style>
|