mirror of
https://github.com/typemill/typemill.git
synced 2025-08-04 21:27:41 +02:00
Version 1.2.8. Image Management
This commit is contained in:
2
cache/lastCache.txt
vendored
2
cache/lastCache.txt
vendored
@@ -1 +1 @@
|
||||
1543829895
|
||||
1543940450
|
28
composer.lock
generated
28
composer.lock
generated
@@ -649,16 +649,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v3.4.18",
|
||||
"version": "v3.4.19",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14"
|
||||
"reference": "d365fc4416ec4980825873962ea5d1b1bca46f1a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14",
|
||||
"reference": "db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d365fc4416ec4980825873962ea5d1b1bca46f1a",
|
||||
"reference": "d365fc4416ec4980825873962ea5d1b1bca46f1a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -708,7 +708,7 @@
|
||||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-10-30T16:50:50+00:00"
|
||||
"time": "2018-11-26T10:17:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
@@ -770,16 +770,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.8.47",
|
||||
"version": "v2.8.48",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "0e16589861f192dbffb19b06683ce3ef58f7f99d"
|
||||
"reference": "02c1859112aa779d9ab394ae4f3381911d84052b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/0e16589861f192dbffb19b06683ce3ef58f7f99d",
|
||||
"reference": "0e16589861f192dbffb19b06683ce3ef58f7f99d",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/02c1859112aa779d9ab394ae4f3381911d84052b",
|
||||
"reference": "02c1859112aa779d9ab394ae4f3381911d84052b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -816,7 +816,7 @@
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-10-02T16:27:16+00:00"
|
||||
"time": "2018-11-11T11:18:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
@@ -890,12 +890,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/valitron.git",
|
||||
"reference": "661365f3173433fd0deee625f1835377ce0947e5"
|
||||
"reference": "dc3314a0ebeafb51b3f88be6ba90060ac175058d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/661365f3173433fd0deee625f1835377ce0947e5",
|
||||
"reference": "661365f3173433fd0deee625f1835377ce0947e5",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/dc3314a0ebeafb51b3f88be6ba90060ac175058d",
|
||||
"reference": "dc3314a0ebeafb51b3f88be6ba90060ac175058d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -931,7 +931,7 @@
|
||||
"validation",
|
||||
"validator"
|
||||
],
|
||||
"time": "2018-10-14T12:01:40+00:00"
|
||||
"time": "2018-11-19T21:37:23+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
@@ -67,7 +67,10 @@ class ProcessImage
|
||||
$tmpFolder = $basePath . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR;
|
||||
$originalFolder = $basePath . DIRECTORY_SEPARATOR . 'original' . DIRECTORY_SEPARATOR;
|
||||
$liveFolder = $basePath . DIRECTORY_SEPARATOR . 'live' . DIRECTORY_SEPARATOR;
|
||||
|
||||
|
||||
if(!file_exists($originalFolder)){ mkdir($originalFolder, 0774, true); }
|
||||
if(!file_exists($liveFolder)){ mkdir($liveFolder, 0774, true); }
|
||||
|
||||
$name = uniqid();
|
||||
|
||||
$files = scandir($tmpFolder);
|
||||
@@ -232,7 +235,7 @@ class ProcessImage
|
||||
}
|
||||
|
||||
public function saveOriginal($folder, $image, $name, $type)
|
||||
{
|
||||
{
|
||||
if(!file_exists($folder))
|
||||
{
|
||||
mkdir($folder, 0774, true);
|
||||
@@ -277,6 +280,13 @@ class ProcessImage
|
||||
public function clearTempFolder()
|
||||
{
|
||||
$folder = getcwd() . DIRECTORY_SEPARATOR . 'media' . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR;
|
||||
|
||||
if(!file_exists($folder))
|
||||
{
|
||||
mkdir($folder, 0774, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
$files = scandir($folder);
|
||||
$result = true;
|
||||
|
||||
|
@@ -8,13 +8,15 @@ class Settings
|
||||
{
|
||||
$settings = self::getDefaultSettings();
|
||||
$userSettings = self::getUserSettings();
|
||||
|
||||
$imgSettings = isset($settings['images']) ? $settings['images'] : [];
|
||||
|
||||
if($userSettings)
|
||||
{
|
||||
$imgSettings = $settings['images'];
|
||||
$settings = array_merge($settings, $userSettings);
|
||||
$settings['setup'] = false;
|
||||
}
|
||||
|
||||
$settings['images'] = isset($userSettings['images']) ? array_merge($imgSettings, $userSettings['images']) : $imgSettings;
|
||||
$settings['themePath'] = $settings['rootPath'] . $settings['themeFolder'] . DIRECTORY_SEPARATOR . $settings['theme'];
|
||||
|
||||
@@ -48,7 +50,7 @@ class Settings
|
||||
'version' => '1.2.8',
|
||||
'setup' => true,
|
||||
'welcome' => true,
|
||||
'images' => ['live' => ['width' => 720], 'mlibrary' => ['width' => 50, 'height' => 50]],
|
||||
'images' => ['live' => ['width' => 820], 'mlibrary' => ['width' => 50, 'height' => 50]],
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -1447,16 +1447,22 @@ label .help, .label .help{
|
||||
display: block;
|
||||
}
|
||||
.hidden{
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
.hidden .blox:hover{
|
||||
background: #fff;
|
||||
}
|
||||
.component{
|
||||
position: relative;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index:9;
|
||||
}
|
||||
.format-bar .hidden{
|
||||
display: none;
|
||||
}
|
||||
.format-bar .component{
|
||||
position: relative;
|
||||
}
|
||||
.fade-editor-enter-active{
|
||||
transition: opacity .5s;
|
||||
}
|
||||
@@ -1475,7 +1481,7 @@ label .help, .label .help{
|
||||
.format-bar .blox-editor{
|
||||
display: inline;
|
||||
}
|
||||
.format-item{
|
||||
button.format-item{
|
||||
margin-right: 2px;
|
||||
padding: 5px;
|
||||
background: #70c1b3;
|
||||
@@ -1487,7 +1493,7 @@ label .help, .label .help{
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
.format-item:hover{
|
||||
button.format-item:hover{
|
||||
background: #66b0a3;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@ const eventBus = new Vue();
|
||||
|
||||
const contentComponent = Vue.component('content-block', {
|
||||
props: ['body'],
|
||||
template: '<div ref="bloxcomponent" class="blox-editor"><div :class="{ editactive: edit }"><div @keyup.enter="submitBlock" @click="getData"><div class="component"><transition name="fade-editor"><component :disabled="disabled" :compmarkdown="compmarkdown" @updatedMarkdown="compmarkdown = $event" :is="componentType"></component></transition><div class="blox-buttons" v-if="edit"><button class="edit" :disabled="disabled" @click.prevent="saveBlock">save</button><button class="cancel" :disabled="disabled" @click.prevent="switchToPreviewMode">cancel</button></div></div><div :class="preview"><slot></slot></div></div><div class="sideaction" v-if="body"><button class="delete" :disabled="disabled" title="delete content-block" @click.prevent="deleteBlock($event)"><i class="icon-cancel"></i></button></div></div></div>',
|
||||
template: '<div ref="bloxcomponent" class="blox-editor"><div :class="{ editactive: edit }"><div @keyup.enter="submitBlock" @click="getData"><div class="component" ref="component"><transition name="fade-editor"><component :disabled="disabled" :compmarkdown="compmarkdown" @updatedMarkdown="compmarkdown = $event" :is="componentType"></component></transition><div class="blox-buttons" v-if="edit"><button class="edit" :disabled="disabled" @click.prevent="saveBlock">save</button><button class="cancel" :disabled="disabled" @click.prevent="switchToPreviewMode">cancel</button></div></div><div :class="preview" ref="preview"><slot></slot></div></div><div class="sideaction" v-if="body"><button class="delete" :disabled="disabled" title="delete content-block" @click.prevent="deleteBlock($event)"><i class="icon-cancel"></i></button></div></div></div>',
|
||||
data: function () {
|
||||
return {
|
||||
preview: 'visible',
|
||||
@@ -27,12 +27,16 @@ const contentComponent = Vue.component('content-block', {
|
||||
this.edit = true; /* show the edit-mode */
|
||||
this.compmarkdown = self.$root.$data.blockMarkdown; /* get markdown data */
|
||||
this.componentType = self.$root.$data.blockType; /* get block-type of element */
|
||||
this.$nextTick(function () {
|
||||
this.$refs.preview.style.minHeight = this.$refs.component.offsetHeight + 'px';
|
||||
});
|
||||
},
|
||||
closeComponents: function()
|
||||
{
|
||||
this.preview = 'visible';
|
||||
this.edit = false;
|
||||
this.componentType = false;
|
||||
this.$refs.preview.style.minHeight = "auto";
|
||||
},
|
||||
switchToPreviewMode: function()
|
||||
{
|
||||
@@ -47,6 +51,7 @@ const contentComponent = Vue.component('content-block', {
|
||||
self.$root.$data.blockMarkdown = false;
|
||||
self.$root.$data.file = false;
|
||||
publishController.errors.message = false; /* delete all error messages */
|
||||
this.$refs.preview.style.minHeight = "auto";
|
||||
},
|
||||
freezePage: function()
|
||||
{
|
||||
@@ -67,14 +72,7 @@ const contentComponent = Vue.component('content-block', {
|
||||
if(self.$root.$data.blockType != '')
|
||||
{
|
||||
this.switchToEditMode();
|
||||
}
|
||||
|
||||
/*
|
||||
if(self.$root.$data.freeze == false && self.$root.$data.blockType != '')
|
||||
{
|
||||
this.switchToEditMode();
|
||||
}
|
||||
*/
|
||||
}
|
||||
},
|
||||
submitBlock: function(){
|
||||
var emptyline = /^\s*$(?:\r\n?|\n)/gm;
|
||||
@@ -421,6 +419,7 @@ const imageComponent = Vue.component('image-component', {
|
||||
self.imgpreview = e.target.result;
|
||||
self.$emit('updatedMarkdown', '');
|
||||
|
||||
|
||||
/* load image to server */
|
||||
var url = self.$root.$data.root + '/api/v1/image';
|
||||
|
||||
|
@@ -35,7 +35,7 @@
|
||||
</article>
|
||||
<footer></footer>
|
||||
</div>
|
||||
<script src="{{ base_url }}/system/author/js/color-picker.min.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/color-picker.min.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20181203"></script>
|
||||
</body>
|
||||
</html>
|
@@ -29,6 +29,6 @@
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
</div>
|
||||
<script src="{{ base_url }}/system/author/js/auth.js?20181030"></script>
|
||||
<script src="{{ base_url }}/system/author/js/auth.js?20181203"></script>
|
||||
</body>
|
||||
</html>
|
@@ -19,7 +19,7 @@
|
||||
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/fontello/css/fontello.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20181110" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20181203" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/color-picker.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -36,13 +36,13 @@
|
||||
</article>
|
||||
<footer></footer>
|
||||
</div>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?20181030"></script>
|
||||
<script src="{{ base_url }}/system/author/js/autosize.min.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/sortable.min.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vuedraggable.min.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-blox.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-navi.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/autosize.min.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/sortable.min.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vuedraggable.min.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-blox.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-navi.js?20181203"></script>
|
||||
</body>
|
||||
</html>
|
@@ -19,7 +19,7 @@
|
||||
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/fontello/css/fontello.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20181110" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20181203" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/color-picker.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -36,13 +36,13 @@
|
||||
</article>
|
||||
<footer></footer>
|
||||
</div>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/autosize.min.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/sortable.min.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vuedraggable.min.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-editor.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-navi.js?20181110"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/autosize.min.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/sortable.min.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vuedraggable.min.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-editor.js?20181203"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-navi.js?20181203"></script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user