Simile Widgets Exhibit

NPRpods

Located in xwiki » Exhibit » NPRpods
Modified by Site Administrator on 01 Mar 2015

NPRpods2

Located in xwiki » Exhibit » NPRpods2
Modified by Site Administrator on 27 Mar 2012

NPRpods3

Located in xwiki » Exhibit » NPRpods3
Modified by Site Administrator on 28 Apr 2015

pods

Located in xwiki » Exhibit » pods
Modified by Site Administrator on 27 Mar 2012

PodsHelp

Located in xwiki » Exhibit » PodsHelp
Modified by Site Administrator on 27 Mar 2012

Presidents

Located in xwiki » Exhibit » Presidents
Modified by Site Administrator on 01 Mar 2015

Presidents2

Located in xwiki » Exhibit » Presidents2
Modified by Site Administrator on 01 Mar 2015

Presidents3

Located in xwiki » Exhibit » Presidents3
Modified by Site Administrator on 01 Mar 2015

Presidents4

Located in xwiki » Exhibit » Presidents4
Modified by Site Administrator on 01 Mar 2015

PresidentsJSON

Located in xwiki » Exhibit » PresidentsJSON
Modified by Site Administrator on 01 Mar 2015

PresidentsSchemaJSON

Modified by Site Administrator on 01 Mar 2015

Exhibit

Located in xwiki » Exhibit » WebHome
Modified by Site Administrator on 27 Mar 2012

WebPreferences

Located in xwiki » Exhibit » WebPreferences
Modified by Site Administrator on 16 Aug 2017

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.

Tags:
Created by Site Administrator on 2009/04/24 02:54
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.4.4 - Documentation