modify dialog.js and add grunt