From: fomichev Date: Fri, 28 Mar 2025 08:57:49 +0000 (+0300) Subject: Merge branch 'refs/heads/develop' into feature_fomichev_erp-387_main_image_matrix_bou... X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=977d1f657587abe6ea0b3b2b1df1e304f5097b24;p=erp24_rep%2Fyii-erp24%2F.git Merge branch 'refs/heads/develop' into feature_fomichev_erp-387_main_image_matrix_bouquet_correction # Conflicts: # erp24/web/js/bouquet/bouquet.js --- 977d1f657587abe6ea0b3b2b1df1e304f5097b24 diff --cc erp24/web/js/bouquet/bouquet.js index d79e0b91,96f4f443..316b0a2e --- a/erp24/web/js/bouquet/bouquet.js +++ b/erp24/web/js/bouquet/bouquet.js @@@ -6,16 -6,36 +6,44 @@@ document.addEventListener('DOMContentLo this.play(); }); }); + + $('#bouquet-file-upload').on('filesorted', function(event, params) { + var order = params.stack.map(function(file) { + return file.key; + }); + //console.log(JSON.stringify(order)); + $('#photo-order').val(JSON.stringify(order)); + }); + console.log('check'); + function cleanDropZoneText(selector) { + const dropZone = document.querySelector(selector); + if (dropZone && dropZone.innerHTML.includes('(Или щёлкните, чтобы выбрать файл)')) { + dropZone.innerHTML = dropZone.innerHTML.replace('(Или щёлкните, чтобы выбрать файл)', ''); + return true; + } + return false; + } + + function observeAndClean(selector) { + if (cleanDropZoneText(selector)) { + return; + } + const observer = new MutationObserver((mutations, obs) => { + if (cleanDropZoneText(selector)) { + obs.disconnect(); + } + }); + + observer.observe(document.body, { + childList: true, + subtree: true + }); + } + observeAndClean('.field-video-file-upload .file-drop-zone-title'); + observeAndClean('.field-presentation-file-upload .file-drop-zone-title'); }); + $(document).ready(function () { if (window.location.pathname.includes('/bouquet/view')) { $('.year-picker, .month-picker').on('change', function () {