Simile Widgets Exhibit

Page Space Wiki Date Last Author
NPRpods Exhibit host_xe_nielsmayer_dot_com 2009 May 19 at 11:52 NielsMayer.com Administrator
NPRpods2 Exhibit host_xe_nielsmayer_dot_com 2009 May 25 at 16:45 NielsMayer.com Administrator
NPRpods3 Exhibit host_xe_nielsmayer_dot_com 2009 Jul 22 at 13:24 Niels Mayer
pods Exhibit host_xe_nielsmayer_dot_com 2009 May 15 at 23:03 NielsMayer.com Administrator
PodsHelp Exhibit host_xe_nielsmayer_dot_com 2009 Jul 13 at 23:57 Niels Mayer
Presidents Exhibit host_xe_nielsmayer_dot_com 2009 May 09 at 09:41 Niels Mayer
Presidents2 Exhibit host_xe_nielsmayer_dot_com 2009 May 09 at 10:31 NielsMayer.com Administrator
Presidents3 Exhibit host_xe_nielsmayer_dot_com 2009 May 15 at 15:47 NielsMayer.com Administrator
Presidents4 - Presidents4 -- Presidents3 using Macros.jQuery and Macros.Exhibit Exhibit host_xe_nielsmayer_dot_com 2009 Jun 23 at 20:31 Niels Mayer
PresidentsJSON Exhibit host_xe_nielsmayer_dot_com 2009 Apr 23 at 16:58 NielsMayer.com Administrator
PresidentsSchemaJSON Exhibit host_xe_nielsmayer_dot_com 2009 Apr 23 at 16:58 NielsMayer.com Administrator
WebHome - Exhibit Exhibit host_xe_nielsmayer_dot_com 2009 May 08 at 13:03 NielsMayer.com Administrator
WebPreferences Exhibit host_xe_nielsmayer_dot_com 2009 May 08 at 12:34 NielsMayer.com Administrator

Setup note: Previously, to use these examples, I used Administration.Administrate_Space:Exhibit.Presentation, setting field HTTP Meta Information to

<script src="http://trunk.simile-widgets.org/exhibit/api/exhibit-api.js" type="text/javascript"></script>  
<script src="http://trunk.simile-widgets.org/exhibit/api/extensions/time/time-extension.js" type="text/javascript"></script>
<script src="http://trunk.simile-widgets.org/exhibit/api/extensions/map/map-extension.js?gmapkey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" type="text/javascript"></script>
Where XXXXXXXXXXXXXXXX is the value obtained from registering the site using the Google Maps API

The better way to do this is on a per-document basis, using Xwiki's skin extensions, setup a Java Script Extension instance on the document itself:

function insertExhibitDataLink(doc, url) {
  if (doc.body == null) {
    try {
      doc.write("<link rel='exhibit/data' href='" + url + "' type='application/json'/>");
      return;
    } catch (e) {
      // fall through
    }
  }
  // never called if write() above succeeds
  var link = doc.createElement("link");
  link.setAttribute("rel", "exhibit/data");
  link.setAttribute("type", "application/json");
  link.setAttribute("href", url);
  doc.getElementsByTagName("head")[0].appendChild(link);
}
insertExhibitDataLink(window.document, "/xwiki/bin/view/Exhibit/PresidentsSchemaJSON?xpage=plain");
insertExhibitDataLink(window.document, "/xwiki/bin/view/Exhibit/PresidentsJSON?xpage=plain");
The code above gets called via $xwiki.jsx.use("$doc.fullName") in the document.

See http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents?viewer=code for details.


Creator: NielsMayer.com Administrator on Apr 23, 2009 15:54:29 GMT-08:00
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 1.8.17790 - Documentation