I ended up tacking on '?bundle=false' to both the simile-ajax-api.js and timeline-api.js url, and commented out Timeline_parameters='bundle=false', which worked.
On Fri, Apr 20, 2012 at 12:27 PM, Steve Pai <[email protected]> wrote: > Paige, > > Not sure if you got it working yet, but I noticed in your original email: > > <script> >> Timeline_ajax_url="http://paigemorgan.net/timeline/src/ajax/api/simile- >> ajax-api.js >> <http://paigemorgan.net/timeline/src/ajax/api/simile-ajax-api.js> >> ajax-api.js<http://paigemorgan.net/timeline/src/ajax/api/simile-ajax-api.js> >> " >> Timeline_urlPrefix='http://paigemorgan.net/timeline/timeline_js/'; >> Timeline_parameters='bundle=true'; >> </script> > > > Someone correct my if I'm wrong but within timeline-api.js, the 'bundle' > parameter controls this if statement: > >> > if (bundle) { > > includeJavascriptFiles(Timeline.urlPrefix, [ > "timeline-bundle.js" ]); > > includeCssFiles(Timeline.urlPrefix, [ > "timeline-bundle.css" ]); > > } else { > > includeJavascriptFiles(Timeline.urlPrefix + "scripts/", > javascriptFiles); > > includeCssFiles(Timeline.urlPrefix + "styles/", cssFiles); > > } > > > Setting Timeline_parameters='bundle=true'; will use timeline-bundle.js, a > condensed version of the .js libraries, rather than the ones you modify for > custom units. > > This section of timeline-api.js appears to parse the url/js variable > parameters: > > var parseURLParameters = function(parameters) { > > var params = parameters.split("&"); > > for (var p = 0; p < params.length; p++) { > > var pair = params[p].split("="); > > if (pair[0] == "locales") { > > desiredLocales = desiredLocales.concat(pair[1 > ].split(",")); > > } else if (pair[0] == "defaultLocale") { > > defaultServerLocale = pair[1]; > > } else if (pair[0] == "forceLocale") { > > forceLocale = pair[1]; > > desiredLocales = desiredLocales.concat(pair[1 > ].split(",")); > > } else if (pair[0] == "bundle") { > > bundle = pair[1] != "false"; > > } > > } > > }; > > My only confusion is since date-time.js also needs to be modified (which > resides in the ajax scripts), will setting 'bundle=true' also trickle into > simile-ajax-api.js, or does another param need to be included? Looks to be > initialized to true: > > var SimileAjax = { > > loaded: false, > > loadingScriptsCount: 0, > > error: null, > > params: { bundle:"true" } > > }; > > > > Steve > > On Wed, Apr 18, 2012 at 8:59 PM, Paige Morgan <[email protected]>wrote: > >> Hi, >> >> I'm trying to get Simile installed locally, using the full >> timeline_source_2.3.0.zip, so that I can customize the units of time. >> >> The wiki and other resources pointed me to these instructions, which >> are also contained in the timeline-api.js file >> >> >> http://code.google.com/p/simile-widgets/source/browse/timeline/trunk/src/webapp/api/timeline-api.js?r=2239 >> >> Those instructions suggest that I ought to be including the following >> lines of code in my <head> section. >> >> <script> >> Timeline_ajax_url="http://paigemorgan.net/timeline/src/ajax/api/simile- >> ajax-api.js<http://paigemorgan.net/timeline/src/ajax/api/simile-ajax-api.js> >> " >> Timeline_urlPrefix='http://paigemorgan.net/timeline/timeline_js/'; >> Timeline_parameters='bundle=true'; >> </script> >> >> <script src="http://paigemorgan.net/timeline/src/webapp/api/timeline- >> api.js?bundle=true<http://paigemorgan.net/timeline/src/webapp/api/timeline-api.js?bundle=true> >> " >> type="text/javascript"> >> </script> >> >> I am -- but I'm not having any luck loading timeline. The page I'm >> trying to load is here: http://www.paigemorgan.net/timelines/demo.html >> >> I tried it with a simple timeline from David Karger's really great >> tutorial here http://people.csail.mit.edu/karger/Exhibit/CAR/HandsOn/ >> -- which is where I originally learned to use Simile Timeline -- but >> no luck. >> >> I've checked the archives for this group, and googled creatively -- >> but I'm not finding any solutions. Can anyone here suggest anything? I >> would be tremendously grateful. >> >> Thanks, >> >> Paige >> >> -- >> You received this message because you are subscribed to the Google Groups >> "SIMILE Widgets" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/simile-widgets?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/simile-widgets?hl=en.
