Merge pull request #636 from dimagi/cz

add jqmodal references for couchlog
safer es queries