improve casperJS views.coffee script

Change-Id: I99f2daf269ec88ec08677a7fbce00733eb002bf8
Reviewed-on: http://review.couchbase.org/37730
Reviewed-by: Pavel Blagodov <stochmail@gmail.com>
Tested-by: Pavel Blagodov <stochmail@gmail.com>