Fix a bug in variations bulk edit and fixed some standards

The bug described in #4807 occurs because not always prompt returns the value as a string.
In addition to fixing this bug, I used to fix code standards and jshint issues.