Re-adding lost javascript changes
Merge pull request #2073 from daviddavis/temp_1366891121

Re-adding lost javascript changes