mirror of
https://github.com/typemill/typemill.git
synced 2025-01-16 21:08:20 +01:00
Version 1.5.3.3: Fix error image size in blox editor
This commit is contained in:
parent
8fd1bef16f
commit
da6a6dfcc5
@ -205,7 +205,7 @@ class ControllerAuthorMediaApi extends ControllerAuthor
|
||||
}
|
||||
|
||||
# publish image directly, used for example by image field for meta-tabs
|
||||
if($this->params['publish'])
|
||||
if(isset($this->params['publish']) && $this->params['publish'])
|
||||
{
|
||||
$imageProcessor->publishImage();
|
||||
}
|
||||
|
@ -1591,6 +1591,7 @@ const imageComponent = Vue.component('image-component', {
|
||||
originalwidth: 0,
|
||||
originalheight: 0,
|
||||
imgloading: 'lazy',
|
||||
imagestandardwidth: 820,
|
||||
imgattr: '',
|
||||
imgfile: '',
|
||||
showresize: true,
|
||||
@ -1598,6 +1599,11 @@ const imageComponent = Vue.component('image-component', {
|
||||
}
|
||||
},
|
||||
mounted: function(){
|
||||
|
||||
if(this.isInt(imagestandardwidth))
|
||||
{
|
||||
this.imagestandardwidth = imagestandardwidth;
|
||||
}
|
||||
|
||||
this.$refs.markdown.focus();
|
||||
|
||||
@ -1701,6 +1707,11 @@ const imageComponent = Vue.component('image-component', {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isInt: function(value) {
|
||||
return !isNaN(value) &&
|
||||
parseInt(Number(value)) == value &&
|
||||
!isNaN(parseInt(value, 10));
|
||||
},
|
||||
createmarkdown: function()
|
||||
{
|
||||
if(this.imgpreview)
|
||||
@ -1718,6 +1729,11 @@ const imageComponent = Vue.component('image-component', {
|
||||
|
||||
self.calculatewidth();
|
||||
self.calculateheight();
|
||||
if(self.imgwidth > self.imagestandardwidth)
|
||||
{
|
||||
self.imgwidth = self.imagestandardwidth;
|
||||
self.calculateheight();
|
||||
}
|
||||
self.createmarkdownimageloaded();
|
||||
}
|
||||
}
|
||||
@ -1896,7 +1912,6 @@ const imageComponent = Vue.component('image-component', {
|
||||
}
|
||||
else
|
||||
{
|
||||
console.info(imgmarkdown);
|
||||
publishController.errors.message = false;
|
||||
this.$parent.activatePage();
|
||||
this.$emit('updatedMarkdown', imgmarkdown);
|
||||
|
@ -47,8 +47,8 @@
|
||||
<script src="{{ base_url }}/system/author/js/autosize.min.js?v={{ settings.version }}"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?v={{ settings.version }}"></script>
|
||||
<script>
|
||||
const FormBus = new Vue();
|
||||
let maxuploadsize = {{ settings.maxuploadsize }};
|
||||
const FormBus = new Vue();
|
||||
let maxuploadsize = {{ settings.maxuploadsize }};
|
||||
</script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-shared.js?v={{ settings.version }}"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?v={{ settings.version }}"></script>
|
||||
|
@ -58,6 +58,7 @@
|
||||
<script>
|
||||
let formatConfig = {{ settings.formats|json_encode() }};
|
||||
let maxuploadsize = {{ settings.maxuploadsize }};
|
||||
let imagestandardwidth = {{ settings.images.live.width }};
|
||||
let language = {{ settings.language|json_encode() }};
|
||||
let labels = {{ translations|json_encode() }};
|
||||
let navigation = {{ navigation|json_encode() }};
|
||||
|
Loading…
x
Reference in New Issue
Block a user