From 5c7a16a112df3df91a97ee7769a60ca8f7c4a906 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 30 Sep 2025 08:04:08 +0200 Subject: [PATCH] set background of drag&drop area when entering --- views/bootstrap/styles/application.js | 3 +++ views/bootstrap4/styles/application.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js index f21d8fb5f..a249aae65 100644 --- a/views/bootstrap/styles/application.js +++ b/views/bootstrap/styles/application.js @@ -1147,9 +1147,11 @@ $(document).ready(function() { /* {{{ */ e.stopPropagation(); e.preventDefault(); $(this).css('border', '2px dashed #0B85A1'); + $(this).css('background-color', '#80808080'); }); $(document).on('dragleave', "#draganddrophandler", function (e) { $(this).css('border', '0px solid white'); + $(this).css('background-color', ''); }); $(document).on('dragover', "#draganddrophandler", function (e) { e.stopPropagation(); @@ -1157,6 +1159,7 @@ $(document).ready(function() { /* {{{ */ }); $(document).on('drop', "#draganddrophandler", function (e) { $(this).css('border', '0px dotted #0B85A1'); + $(this).css('background-color', ''); e.preventDefault(); attr_rel = $(this).data('droptarget'); diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js index 25b47f341..ae89354f6 100644 --- a/views/bootstrap4/styles/application.js +++ b/views/bootstrap4/styles/application.js @@ -1195,9 +1195,11 @@ $(document).ready(function() { /* {{{ */ e.stopPropagation(); e.preventDefault(); $(this).css('border', '2px dashed #0B85A1'); + $(this).css('background-color', '#80808080'); }); $(document).on('dragleave', "#draganddrophandler", function (e) { $(this).css('border', '0px solid white'); + $(this).css('background-color', ''); }); $(document).on('dragover', "#draganddrophandler", function (e) { e.stopPropagation(); @@ -1205,6 +1207,7 @@ $(document).ready(function() { /* {{{ */ }); $(document).on('drop', "#draganddrophandler", function (e) { $(this).css('border', '0px dotted #0B85A1'); + $(this).css('background-color', ''); e.preventDefault(); attr_rel = $(this).data('droptarget');