Ror Apps And I Frames Of Other Ror Apps
<h3 class="heading-h6"><a name="THLToolboxhomegtDevelopersZonegtRubyOnRailsDevelopmentgtRoRAppsandIFramesofOtherRoRApps" class="anchorpoint"></a><a href="/tools/wiki/home.html">THL Toolbox</a> > <a href="/tools/wiki/Developers%27%20Zone.html">Developers' Zone</a> > <a href="/tools/wiki/Ruby%20On%20Rails%20Development.html">Ruby On Rails Development</a> > RoR Apps and I Frames of Other RoR Apps</h3><p class="paragraph">
</p><h3 class="heading-h1"><a name="RoRAppsandiFramesofOtherRoRApps" class="anchorpoint"></a>RoR Apps and iFrames of Other RoR Apps</h3><p class="paragraph"><strong class="bold">Contributor(s)</strong>: Jed Verity (jev3a@virginia.edu)</p><p class="paragraph">All the code that a Rails app needs to display another THL Rails app within an iFrame is located in the Javascript of the main THL frame (specifically app_plug.js and class_external.js, with a minor aesthetic function in fn.js) and the thdl_integration Rails plugin.</p><p class="paragraph">As long as the latest version of the thdl_integration plugin has been loaded and the THL frame is being imported properly, one need only put the #iframe link somewhere on the page to have it work. (See the top of app_plug.js for the proper format of #iframe links and configurable options.)</p><p class="paragraph">If the styling of the iFrame looks wrong, it could be that a bad stylesheet reference is getting sent to the Rails app. Again, look at the top of app_plug.js for info about how to send stylesheets.</p><p class="paragraph">If the dimensions of the iFrame are wrong, they can be added to thlplug.dims_load() in app_plug.js. Eventually, it makes sense to add optional x and y args to the #iframe link.
</p><h3 class="heading-h6"><a name="ProvidedforunrestrictedusebythespanclassnobrimgsrcsakairwikitoolimagesicklearrowgifaltexternallinktitleexternallinkahrefhttpwwwthliborgtargetrwikiexternalTibetanandHimalayanLibraryaspan" class="anchorpoint"></a><em class="italic">Provided for unrestricted use by the <span class="nobr"><img src="/" alt="external link: " title="external link"/><a href="http://www.thlib.org" target="rwikiexternal">Tibetan and Himalayan Library</a></span></em></h3>