diff --git a/static/toodego/_forms.scss b/static/toodego/_forms.scss index ccf550a7..a51a2971 100644 --- a/static/toodego/_forms.scss +++ b/static/toodego/_forms.scss @@ -9,6 +9,7 @@ div.file-upload-widget { } } &.has-file div.file-button { + background-image: linear-gradient(rgba(250, 250, 250, 0.8), rgba(250, 250, 250, 0.8)), var(--image-preview-url); background-size: contain; } div.file-button.file-image { @@ -19,15 +20,15 @@ div.file-upload-widget { &::before { content: ""; background: url(img/photo-add.png) 50% 0px no-repeat; - box-sizing: content-box; - height: 40px; + height: 70px; + } + &.upload-done { + background-color: transparent; + padding-top: 30px; } } } &.has-file div.file-button.file-image { - div.widget-message { - background: rgba(250, 250, 250, 0.8); - } div.widget-message::before { background-image: url(img/photo-done.png); } @@ -40,9 +41,6 @@ div.file-upload-widget { background: $red; } } - div.fileinfo { - background: rgba(250, 250, 250, 0.8); - } } div.xtemplate-photo { div.hint { diff --git a/static/toodego/extra.js b/static/toodego/extra.js index 316474ef..a7ed010e 100644 --- a/static/toodego/extra.js +++ b/static/toodego/extra.js @@ -898,18 +898,6 @@ $(function() { $('div.buttons div.cancel-button button').text('Continuer').css('margin-right', '0'); } - /* photo upload, add a preview */ - $('.file-button.file-image').on('wcs:image-blob', function(ev, file) { - var $widget = $(this); - if (file) { - var reader = new FileReader(); - reader.onload = function(e) { - $widget[0].style.backgroundImage = 'url(' + e.target.result + ')'; - } - reader.readAsDataURL(file); - } - }); - /* custom checkboxes intertitles for publik notification */ $('.template-pn-thematiques').each(function(idx, elem) { const titles = Array();