Skip to content

Commit

Permalink
Merge pull request #1138 from hazendaz/master
Browse files Browse the repository at this point in the history
[javascript] Cleanup issues in dragdrop.js
  • Loading branch information
hazendaz committed Feb 15, 2018
2 parents 4cbee28 + 96719ad commit f116645
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions web/src/main/webapp/js/scriptaculous/dragdrop.js
Expand Up @@ -53,9 +53,9 @@ var Droppables = {
},

findDeepestChild: function(drops) {
deepest = drops[0];
let deepest = drops[0];

for (i = 1; i < drops.length; ++i)
for (let i = 1; i < drops.length; ++i)
if (Element.isParent(drops[i].element, deepest.element))
deepest = drops[i];

Expand Down Expand Up @@ -314,8 +314,8 @@ var Draggable = Class.create({
if(Event.isLeftClick(event)) {
// abort on form elements, fixes a Firefox issue
var src = Event.element(event);
if((tag_name = src.tagName.toUpperCase()) && (
tag_name=='INPUT' ||
const tag_name = src.tagName.toUpperCase();
if((tag_name=='INPUT' ||
tag_name=='SELECT' ||
tag_name=='OPTION' ||
tag_name=='BUTTON' ||
Expand Down Expand Up @@ -857,7 +857,7 @@ var Sortable = {
if (!match) continue;

var child = {
id: encodeURIComponent(match ? match[1] : null),
id: encodeURIComponent(match[1]),
element: element,
parent: parent,
children: [],
Expand Down

0 comments on commit f116645

Please sign in to comment.