Removing code duplication from dnd.js
Merge pull request #1909 from Lusito/dnd_code_duplication

Removing code duplication from dnd.js