Commits (44)
......@@ -11,7 +11,7 @@
:visible="inViewPort")
template(v-else)
div Empty cell
div.q-pa-sm Empty cell
slot
......
<template lang="pug">
.text-dark
strong {{ type }}
div(:class="setClass()")
strong {{ shortenType(type) }}
p.faded
span.q-pr-md(v-if="cell.styleClass") Class: .{{ cell.styleClass }}
span.q-pr-md(v-if="cell.author") Author: {{ cell.author.name }}
// span.q-pr-md(v-if="cell.author") Author: {{ cell.author.name }}
span.q-pr-md(v-if="cell.author") {{ cell.author.name }}
</template>
<script>
......@@ -11,6 +12,14 @@
props: {
cell: Object,
type: String
},
methods: {
setClass () {
return this.cell.data.content.length > 0 ? 'text-dark' : 'text-red'
},
shortenType (type) {
return type.substr(0, type.length - 5)
}
}
}
</script>
This diff is collapsed.
......@@ -7,32 +7,44 @@
q-item(
draggable="true",
@dragstart.native="event => {handleItemDragStart(event, item)}")
q-field(
:icon="typeToIconName(item.type)",
:helper="item.help",
:error="item.error",
:error-label="item.errorMessage",
style="width: 100%")
q-input(
:float-label="item.label",
:type="item.inputType",
:min-rows="1",
:max-height="500",
:value="item.value",
:model="item.value",
@input="value => {handleItemChanged(value, item)}",
@change="value => {handleItemChanged(value, item)}")
//----- buttons (mobile only)
.mobile-only.text-center(v-if="item.value")
//----- "add"
q-btn.bg-primary.text-white.q-mr-sm(@click="cacheNewCell(item)", flat, round)
q-icon(name="check")
//----- "clear"
q-btn.bg-dark.text-white(@click="item.value = undefined", flat, round)
q-icon(name="clear")
q-item-side.full-height.text-center
.mobile-only
q-btn.bg-primary.text-white(v-if="item.value", @click="cacheNewCell(item)", flat, round, size="sm")
q-icon(name="check", size="18px")
q-icon(v-else, :name="typeToIconName(item.type)", size="22px")
.desktop-only
q-icon(:name="typeToIconName(item.type)", size="22px")
q-item-main
// :icon="typeToIconName(item.type)",
q-field(
:helper="item.help",
:error="item.error",
:error-label="item.errorMessage",
style="width: 100%")
q-input(
:float-label="item.label",
:type="item.inputType",
:min-rows="1",
:max-height="500",
:value="item.value",
:model="item.value",
@input="value => {handleItemChanged(value, item)}",
@change="value => {handleItemChanged(value, item)}")
//
//----- buttons (mobile only)
.mobile-only.text-center(v-if="item.value")
//----- "add"
q-btn.bg-primary.text-white.q-mr-sm(@click="cacheNewCell(item)", flat, round)
q-icon(name="check")
//----- "clear"
q-btn.bg-dark.text-white(@click="item.value = undefined", flat, round)
q-icon(name="clear")
template(v-if="i < items.length - 1")
q-item-separator
......
......@@ -4,8 +4,12 @@
q-tabs(v-model="selectedTab", color="dark")
q-tab(slot="title", name="tab-default-cells", default) Cells
q-tab(slot="title", name="tab-piecemaker") Piecemaker
q-tab(slot="title", name="tab-documents", v-if="userHasDocuments") Documents
q-tab.last-tab(slot="title", name="tab-documents", v-if="userHasDocuments") Documents
//----- "close"-button
.absolute-top-right.bg-dark.text-white(style="width: 48px; height: 48px;")
q-btn.fit(@click="closeModal()", flat)
q-icon(name="clear")
//
q-btn(slot="title", icon="close",
small, flat, round, class="fixed", style="right: 2px; margin-top: 3px",
......@@ -75,6 +79,9 @@
this.$store.commit('mosys/hideSources')
},
methods: {
closeModal () {
this.$store.commit('mosys/toggleSources')
},
handleCloseTabs () {
this.$root.$emit('mosys_saveScrollPosition')
this.$store.commit('mosys/hideSources')
......@@ -93,5 +100,9 @@
display flex
flex-direction column
overflow auto */
</style>
<style scoped lang="stylus">
.last-tab
padding-right 60px
</style>