diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js index e8f5eef9a..889995595 100644 --- a/webapp/components/ContributionForm/ContributionForm.spec.js +++ b/webapp/components/ContributionForm/ContributionForm.spec.js @@ -244,10 +244,13 @@ describe('ContributionForm.vue', () => { describe('questionable images should be blurred', () => { it('questionable images unset be blurred', async () => { - + expectedParams.variables.imageUpload = imageUpload + wrapper.find(TeaserImage).vm.$emit('addTeaserImage', imageUpload) + expect(wrapper.find('.images-set-blur').exists()).toBe(false) await wrapper.find('input[type="checkbox"]').trigger('click') expect(wrapper.find('input[type="checkbox"]').exists()).toBe(true) - expect(wrapper.find('img.img-blur-in').exists()).toBe(true) + expect(wrapper.find('.images-set-blur').exists()).toBe(true) + }) }) diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index 25be9d753..7831d8fe0 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -40,12 +40,12 @@ @@ -227,8 +227,7 @@ export default { created() {}, mounted() { if (this.contribution && this.contribution.blurImage === true) { - this.checkedChange() - this.$el.querySelector('.hc-attachments-upload-area-post img').classList.add('img-blur-in') + this.checkedBlur = true } }, computed: { @@ -242,28 +241,7 @@ export default { methods: { unBlur() { if (this.checkedBlur) { - this.checkedChange() - } - }, - checkedChange() { - if (this.$el) { - console.log(this.$el.querySelector('.crop-overlay')) - console.log(document.querySelector('.crop-overlay')) - this.elem = this.$el.querySelector('img') - } else { - } - if (this.checkedBlur) { - this.elem.classList.remove('img-blur-in') - document.querySelector('.crop-overlay').classList.remove('images-set-blur') this.checkedBlur = false - this.form.checkbox = false - } else { - if (this.elem != null) { - - this.elem.classList.add('img-blur-in') - } - this.checkedBlur = true - this.form.checkbox = true } }, submit() { @@ -362,7 +340,7 @@ export default { -o-transition: all ease 0.2s; transition: all ease 0.2s; } -.images-set-blur img{ +.images-set-blur img { -webkit-filter: blur(32px); -moz-filter: blur(32px); -ms-filter: blur(32px); @@ -417,18 +395,4 @@ export default { cursor: default; } } -input[type='checkbox'] { - display: none; -} -input[type='checkbox'] + label span { - display: inline-block; - width: 29px; - height: 27px; - vertical-align: middle; - background: url(../../static/img/checkbox/checkbox-set-blank-checked-line.png) left top no-repeat; - cursor: pointer; -} -input[type='checkbox']:checked + label span { - background: url(../../static/img/checkbox/checkbox-set-blank-checked-line.png) -30px top no-repeat; -} diff --git a/webapp/pages/moderation/images.vue b/webapp/pages/moderation/images.vue deleted file mode 100644 index 86e222f0e..000000000 --- a/webapp/pages/moderation/images.vue +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue index 769b978b8..7331daf6d 100644 --- a/webapp/pages/post/_id/_slug/index.vue +++ b/webapp/pages/post/_id/_slug/index.vue @@ -12,21 +12,21 @@ >