Remove duplicate code and avoid DOM search operation.

refs #6355
This commit is contained in:
Murtuza Zabuawala 2021-05-06 10:53:32 +05:30 committed by Akshay Joshi
parent b13627398b
commit 4c55044440
2 changed files with 2 additions and 10 deletions

View File

@ -98,11 +98,7 @@ define(
}
// Prevent browser from opening the drag file.
$('.pg-panel-content').bind('dragover', function (event) {
event.stopPropagation();
event.preventDefault();
});
$('.pg-panel-content').bind('drop', function (event) {
$container.bind('dragover drop', function (event) {
event.stopPropagation();
event.preventDefault();
});

View File

@ -493,11 +493,7 @@ define('tools.querytool', [
});
// Prevent browser from opening the drag file.
$('#datagrid').bind('dragover', function (event) {
event.stopPropagation();
event.preventDefault();
});
$('#datagrid').bind('drop', function (event) {
$('#datagrid').bind('dragover drop', function (event) {
event.stopPropagation();
event.preventDefault();
});