Fixed bug visual editor updated composer and deleted customfields plugin

This commit is contained in:
trendschau 2020-11-03 21:34:41 +01:00
parent da1f3aa96d
commit 8487c77627
5 changed files with 20 additions and 94 deletions

43
composer.lock generated
View file

@ -779,16 +779,16 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v3.4.45",
"version": "v3.4.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "0bb9ea263b39fce3a12ac9f78ef576bdd80dacb8"
"reference": "31fde73757b6bad247c54597beef974919ec6860"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0bb9ea263b39fce3a12ac9f78ef576bdd80dacb8",
"reference": "0bb9ea263b39fce3a12ac9f78ef576bdd80dacb8",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/31fde73757b6bad247c54597beef974919ec6860",
"reference": "31fde73757b6bad247c54597beef974919ec6860",
"shasum": ""
},
"require": {
@ -810,11 +810,6 @@
"symfony/http-kernel": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
@ -853,24 +848,24 @@
"type": "tidelift"
}
],
"time": "2020-09-18T12:06:50+00:00"
"time": "2020-10-24T10:57:07+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.18.1",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
"reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
@ -878,7 +873,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -929,7 +924,7 @@
"type": "tidelift"
}
],
"time": "2020-07-14T12:35:20+00:00"
"time": "2020-10-23T14:02:19+00:00"
},
{
"name": "symfony/yaml",
@ -983,20 +978,20 @@
},
{
"name": "twig/twig",
"version": "v1.43.1",
"version": "v1.44.1",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "2311602f6a208715252febe682fa7c38e56a3373"
"reference": "04b15d4c0bb18ddbf82626320ac07f6a73f199c9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/2311602f6a208715252febe682fa7c38e56a3373",
"reference": "2311602f6a208715252febe682fa7c38e56a3373",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/04b15d4c0bb18ddbf82626320ac07f6a73f199c9",
"reference": "04b15d4c0bb18ddbf82626320ac07f6a73f199c9",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"php": ">=7.2.5",
"symfony/polyfill-ctype": "^1.8"
},
"require-dev": {
@ -1006,7 +1001,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.43-dev"
"dev-master": "1.44-dev"
}
},
"autoload": {
@ -1053,7 +1048,7 @@
"type": "tidelift"
}
],
"time": "2020-08-05T15:05:05+00:00"
"time": "2020-10-27T19:22:48+00:00"
},
{
"name": "vlucas/valitron",

View file

@ -1,29 +0,0 @@
<?php
namespace Plugins\Customfields;
use Typemill\Plugin;
class Customfields extends Plugin
{
public static function getSubscribedEvents()
{
return array(
'onTwigLoaded' => 'onTwigLoaded',
'onMetaLoaded' => 'onMetaLoaded'
);
}
public function onTwigLoaded()
{
$this->addEditorJS('/customfields/js/customfields.js');
}
public function onMetaLoaded($meta)
{
$meta = $meta->getData();
# do something with the fields:
$myTabInformation = $meta['mytab'];
}
}

View file

@ -1,15 +0,0 @@
name: Customfields Plugin
version: 1.0.0
description: Plugin to test customfields
author: Sebastian Schürmanns
homepage: http://trendschau.net
licence: No licence
metatabs:
customfields:
fields:
myfield:
type: customfields
label: Simple Custom Field
description: Please add some custom fields
data: array

View file

@ -1,26 +0,0 @@
Vue.component('tab-customfields', {
props: ['saved', 'errors', 'formdata', 'schema'],
template: '<section><form>' +
'<component v-for="(field, index) in schema.fields"' +
':key="index"' +
':is="selectComponent(field)"' +
':errors="errors"' +
':name="index"' +
'v-model="formdata[index]"' +
'v-bind="field">' +
'</component>' +
'<div v-if="saved" class="metaLarge"><div class="metaSuccess">Saved successfully</div></div>' +
'<div v-if="errors" class="metaLarge"><div class="metaErrors">Please correct the errors above</div></div>' +
'<div class="large"><input type="submit" @click.prevent="saveInput" value="save"></input></div>' +
'</form></section>',
methods: {
selectComponent: function(field)
{
return 'component-'+field.type;
},
saveInput: function()
{
this.$emit('saveform');
},
}
})

View file

@ -223,6 +223,7 @@ const contentComponent = Vue.component('content-block', {
var checkempty = this.compmarkdown.replace(/(\r\n|\n|\r|\s)/gm,"");
if(checkempty == '')
{
this.$root.$data.unsafed = false;
this.switchToPreviewMode();
}
else