Commit 8ee2c890 authored by Anton Koch's avatar Anton Koch

Merge branch '384-distinguishing-piecemaker-cells---mosys' into 'master'

piecemaker cells are distinguished from media cells now (#384)

See merge request !40
parents 5fe72c70 179f6395
Pipeline #54372 passed with stage
in 6 minutes and 26 seconds
......@@ -3,11 +3,12 @@
.cell-item-inner(:class="{'display-preview': preview, 'display-full': display}")
template(v-if="cell")
component.animated-opacity(
:is="cell.configuration._value.component",
:is="setComponent",
:cell="cell",
:class="cellClasses",
:display="display",
:preview="preview",
:prefix="setPrefix",
:visible="inViewPort")
template(v-else-if="temp")
......@@ -35,6 +36,15 @@
}
},
computed: {
setPrefix () {
let comp = this.cell.configuration._value.component
if (comp === 'CellPiecemaker') return 'PM'
},
setComponent () {
let comp = this.cell.configuration._value.component
if (comp === 'CellPiecemaker') return 'CellMedia'
else return comp
},
cellClasses () {
let classes = ['cell-content']
if (this.cell) {
......
This diff is collapsed.
<template lang="pug">
div
.q-caption {{ cell.configuration._value.component }}
</template>
<script>
export default {
name: 'CellFeatures',
props: ['cell'],
data () {
return {
itemSpecs: {
'CellTitle': [{
inputType: 'textarea',
type: 'Title',
label: 'Title Cell',
help: '',
error: false,
errorMessage: '',
value: '',
path: 'content'
},
{
inputType: 'url',
type: 'Title',
label: 'Link URL',
help: 'Insert any valid URL',
error: false,
errorMessage: 'Needs to be a valid URL',
value: '',
path: 'link'
}],
'CellText': [{
inputType: 'textarea',
type: 'Text',
label: 'Text Cell',
help: '',
error: false,
errorMessage: '',
value: '',
path: 'content'
}],
'CellMedia': [{
inputType: 'url',
type: 'Media',
label: 'Media Cell',
help: 'Insert a URL to: a video file or a Vimeo / YouTube video page',
error: false,
errorMessage: 'Needs to be a valid URL',
value: '',
path: 'content'
},
{
inputType: 'number',
type: 'Video',
label: 'Start',
help: 'Set start point (seconds)',
error: false,
errorMessage: 'Needs to be a valid number',
value: 0,
path: 'start'
},
{
inputType: 'number',
type: 'Video',
label: 'Duration',
help: 'Set duration (seconds)',
error: false,
errorMessage: 'Needs to be a valid number',
value: 0,
path: 'duration'
}],
'CellImage': [{
inputType: 'url',
type: 'Image',
label: 'Image Cell',
help: 'Insert a URL to an image file',
error: false,
errorMessage: 'Needs to be a valid URL',
value: '',
path: 'content'
},
{
inputType: 'url',
type: 'Image',
label: 'Link URL',
help: 'Insert any valid URL',
error: false,
errorMessage: 'Needs to be a valid URL',
value: '',
path: 'link'
}],
'CellInternalLink': [{
inputType: 'url',
type: 'Internal-Link',
label: 'Link Cell',
help: 'Insert a URL to a page in this system',
error: false,
errorMessage: 'Needs to be a valid URL',
value: '',
path: 'content'
}],
'CellIFrame': [{
inputType: 'url',
type: 'IFrame',
label: 'IFrame Cell',
help: 'Insert some URL',
error: false,
errorMessage: 'Needs to be a valid URL',
value: '',
path: 'content'
}],
'CellAnnotationList': [{
inputType: 'text',
type: 'Annotation-List',
label: 'Annotation List Cell',
help: 'Insert a Video UUID',
error: false,
errorMessage: '',
value: '',
path: 'content'
},
{
inputType: 'number',
type: 'Annotation-List',
label: 'Add annotations',
help: 'Allow user to add more annotations (0 or 1)',
error: false,
errorMessage: '',
value: 0,
path: 'allow_annotations'
},
{
inputType: 'number',
type: 'Annotation-List',
label: 'Start',
help: 'Filter from video start point (seconds)',
error: false,
errorMessage: 'Needs to be a valid number',
value: 0,
path: 'start'
},
{
inputType: 'number',
type: 'Annotation-List',
label: 'Duration',
help: 'Filter duration (seconds)',
error: false,
errorMessage: 'Needs to be a valid number',
value: 0,
path: 'duration'
},
{
inputType: 'text',
type: 'Annotation-List',
label: 'Textfilter',
help: 'Filter annotations by search string',
error: false,
errorMessage: '',
value: undefined,
path: 'textfilter'
},
{
inputType: 'text',
type: 'Annotation-List',
label: 'RegExp',
help: 'Filter annotations by regular expression',
error: false,
errorMessage: '',
value: undefined,
path: 'regexp'
},
{
inputType: 'text',
type: 'Annotation-List',
label: 'Display type',
help: 'Either "scroll-list" or "tabs"',
error: false,
errorMessage: '',
value: undefined,
path: 'displayType'
}]
}
}
},
mounted () {
}
}
</script>
<style scoped lang="stylus">
</style>
<template lang="pug">
.cell-info(:class="setClass()")
strong.prefix.text-grey-6.q-py-none.q-mr-sm(v-if="prefix") {{ prefix }}
strong.text-grey-3 {{ shortenType(type) }}
p.faded
span.q-pr-md(v-if="cell.styleClass") Class: .{{ cell.styleClass }}
......@@ -11,7 +12,8 @@
export default {
props: {
cell: Object,
type: String
type: String,
prefix: String
},
methods: {
setClass () {
......@@ -19,8 +21,14 @@
this.cell.source._value.content.length > 0 ? 'text-dark' : 'text-red'
},
shortenType (type) {
return type.substr(0, type.length - 5)
if (type.substr(type.length - 4, type.length) === 'Cell') return type.substr(0, type.length - 5)
else return type
}
}
}
</script>
<style scoped lang="stylus">
.prefix
// border-radius .1rem
// border-right 1px solid rgba(255,255,255,0.325)
</style>
......@@ -53,9 +53,8 @@
// -----------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------ grid
// modal for existing cell editing
q-modal.z-max(v-model="modal", minimized, content-css="border-radius: .35rem!important;")
cell-editor.bg-dark(@closePanel="closePanelHandler", @removeCell="removeCellHandler",
style="border: 1px solid rgba(255,255,255,0.2);")
q-modal.z-max(v-model="modal", minimized, content-css="border-radius: .35rem!important; border: 1px solid rgba(255,255,255,0.25); background-color: black;")
cell-editor.bg-dark(@closePanel="closePanelHandler", @removeCell="removeCellHandler")
// -----------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------ grid
......
......@@ -63,7 +63,7 @@
//-------------------------------------------------------------------------------------------------------- edit mode
template(v-else)
.q-pa-sm
cell-info(:cell="cell", type="Annotation List")
cell-info(:cell="cell", type="Annotation List", prefix="PM")
</template>
......
......@@ -15,7 +15,7 @@
:no-volume-panel="true")
template(v-else)
cell-info(:cell="cell", type="Media Cell")
cell-info(:cell="cell", type="Media Cell", :prefix="prefix")
</template>
......@@ -29,7 +29,7 @@
CellInfo,
MediaPlayer
},
props: ['cell', 'display', 'preview', 'visible'],
props: ['cell', 'display', 'preview', 'visible', 'prefix'],
data () {
return {
video: undefined,
......
......@@ -42,7 +42,7 @@
//------------------------------------------------------------------------------------------------------ input
q-item-tile.q-px-md(v-if="selectedItem === index")
q-field.q-mb-md.q-px-sm.q-py-xs(
q-field.q-mb-md.q-px-sm.q-py-xs.grey-background(
:helper="item.help",
:error="item.error",
:error-label="item.errorMessage",
......@@ -212,7 +212,7 @@
.border-radius-full
border-radius 100vw!important
.q-field
.grey-background
background-color $grey-9
.custom-hover
......
......@@ -23,7 +23,7 @@
q-item-tile
//----- media
q-btn.bg-primary.text-white.media-button(@click="cacheNewCell(entry.annotation, 'CellMedia')", flat)
q-btn.bg-primary.text-white.media-button(@click="cacheNewCell(entry.annotation, 'CellPiecemaker')", flat)
q-icon(name="local movies", size="22px")
//----- annotations
......@@ -63,7 +63,7 @@
}
},
methods: {
cacheNewCell (item, component = 'CellMedia') {
cacheNewCell (item, component = 'CellPiecemaker') {
const resourceCell = {
configuration: {
value: {
......@@ -74,7 +74,8 @@
value: {
id: item.id,
sourceUuid: item.id ? parseURI(item.id).uuid : undefined,
content: component === 'CellMedia' ? item.body.source.id : item.id
content: item.id
// content: component === 'CellPiecemaker' ? item.body.source.id : item.id
}
}
}
......@@ -105,6 +106,7 @@
entries.push(entry)
}
this.currentMedia = entries
console.log('#####', this.currentMedia)
this.loadingMedia = false
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment