zepheira / exhibit3

Simile Widgets Exhibit 3 code repository
http://simile-widgets.org/exhibit3/
MIT License
161 stars 48 forks source link

Upgrading to exhibit3: Timeline is not Defined, __history__.html #67

Closed latsami closed 11 years ago

latsami commented 12 years ago

Hi, I am trying to update from exhibit 2.2.0 to 3.0.0rc1, but have some troubles. The timeline is displayed, but the console says "Timeline is not defined" and "SimileAjax is not defined"; also it is still looking for the history.html file which is supposed to be gone in version 3?

I am using the online api btw and my json is valid according to jsonlint.

Problem can be seen here: http://esadgv2.stdin.fr/month.html Here is what it is supposed to do (with exhibit 2.2): http://esadgv2.stdin.fr/exhibit2.html

Any idea?

zepheiryan commented 12 years ago

Thanks for undertaking this process and lettings us know what isn't working, this process should be helpful to both of us.

First, we're looking into different ways of loading extensions in a manageable fashion. Our current solution is to use <link rel="exhibit-extension" type="text/javascript" href="[link to extension]"/> instead of a <script> tag to avoid the problems of different browsers using different built-in script loading strategies. This should help with the problem of the view not being defined since it should now be defined at the right time.

Next, you'll need to load the pieces of your own inline script after the things they refer to have been loaded. SimileAjax and Timeline simply aren't defined when that script is run. You may want to use the parameter mechanism in the Exhibit script like <script src="exhibit-api.js?js=path/to/my.js&postLoad=true"> or have jQuery load separately from Exhibit at the top of the page rather than the bottom and trigger it off an appropriate event, like $(document).one("scriptsLoaded.exhibit", myFunction), or something else from the Events API.

The __history__.html file is gone for Exhibit, but Timeline hasn't had a major overhaul for quite some time and still requires SimileAjax, which isn't part of Exhibit any longer either, and SimileAjax refers to the history file.

Do let us know if there's something in the documentation that could be improved to help; I realize Exhibit's modernization without Timeline's leaves a lot to be desired, but hopefully the pieces Exhibit is responsible for can be cleaned up to make this easier for your and future upgrade efforts.

zepheiryan commented 11 years ago

This may be more easily resolved with #35.