minor bug fix, define 'var' in dialog.js.

The 'cell' variable isn't defined and causes and error in the
console
Merge pull request #4068 from Zsailer/jsfix

minor bug fix, define 'cell' in dialog.js.