webstaff: add routine for Dojo JS to detect if running in iframe
authorGalen Charlton <gmc@esilibrary.com>
Thu, 27 Aug 2015 22:23:23 +0000 (22:23 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 27 Aug 2015 22:23:23 +0000 (22:23 +0000)
commitcc8944a9a86d18789cc40256780ad5a0781f28c8
tree5dddff0c6f8ada4ff8a6275660584a0203ee3d73
parent559497200aaac0b098fa9701aff55b25584b4a6e
webstaff: add routine for Dojo JS to detect if running in iframe

Sometimes legacy Dojo interfaces may need to adjust their
behavior if they're embedded in the web staff client. This patch
adds a new utility function, openils.Util.inIFrame(), to detect
if such code is running in an iframe. If so, the presumption
is that iframe belongs to the web staff client.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/web/js/dojo/openils/Util.js