Remove duplicate code and avoid DOM search operation.

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

No files matched your search

+1 -5
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();
});
@@ -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();
});