/** * @projectDescription SHRINE cell controller object * @inherits i2b2 * @namespace i2b2.SHRINE * @author Nick Benik, Griffin Weber MD PhD * @version 1.0 * ---------------------------------------------------------------------------------------- */ // Override the default help display to open a new window pointed at the centrally-hosted SHRINE help i2b2.events.afterLogin.subscribe((function(type,args) { i2b2.hive.HelpViewer = { show: function() { try { window.open('/shrine-webclient/Help/index.htm' ,'SHRINE_help_viewer' , 'width=650,height=450,toolbar=0,resizable=1,location=0,status=0,menubar=0,scrollbars=1'); } catch (e) {} } }; })); //Charles McGow - Add previous queries and workplace[if avaiable] //i2b2.events.afterLogin.subscribe((function(en,co) { i2b2.hive.MasterView.addZoomWindow("ONT"); }), "", i2b2 ); //Charles McGow - Add previous queries and workplace[if avaiable] i2b2.events.afterLogin.subscribe((function(type,args) { // all cells have been loaded. Set the viewMode, resize, etc try { if (i2b2.hive.cfg.lstCells.SHRINE.serverLoaded) { i2b2.PM.model.shrine_domain = true; } } catch (e) {} if (i2b2.h.isSHRINE()) { i2b2.SHRINE.afterLogin(type,args); } })); i2b2.SHRINE.afterLogin = function(type,args) { var msg = i2b2.SHRINE.ajax.readApprovedEntries("SHRINE"); msg.parse(); if (msg.error) { console.error("Could not get approved topic list from SHRINE"); console.dir(msg); alert('Could not get approved topics list from SHRINE.'); } else { i2b2.SHRINE.model.topics = {}; var l = msg.model.length; for (var i=0; i