Fix panels.js syntax warnings

check out issue #1488 for more info.