tag:blogger.com,1999:blog-5694203337413075366.post7259855462510013656..comments2021-12-19T11:56:12.305-08:00Comments on Programmers’ Patch: Adding Search and navigation by year to TimelineJSdesmondhttp://www.blogger.com/profile/01722159590093138289noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5694203337413075366.post-75598145954848625052015-05-14T13:07:37.372-07:002015-05-14T13:07:37.372-07:00Hi Bassel,
it is dangerous to modify shared code b...Hi Bassel,<br />it is dangerous to modify shared code because when it gets updated your modifications are of course embedded in the old version. But I don't have time to fix this, so I just pasted my working copy of timeline.js with the search function. But please note the previous comment: you have to embed an element to hold the search expression. You can see it working on http://charles-harpur.org/harpur/timeline?docid=english/harpur&title=Charles%20Harpur&subtitle=Life%2C%20Letters%2C%20Compositions&event_type=biography . Look for something like "Charles Chidley". desmondhttps://www.blogger.com/profile/01722159590093138289noreply@blogger.comtag:blogger.com,1999:blog-5694203337413075366.post-76087911296598426712015-04-17T12:38:53.931-07:002015-04-17T12:38:53.931-07:00the code seems to be broken. i'm attempting to...the code seems to be broken. i'm attempting to fix it but copy-paste work tends to go south. (there's an extra brace at towards the end, it seems).<br /><br />the proof of concept example no longer works, have you done anything with the code base since?Basselhttps://www.blogger.com/profile/13819308762811217048noreply@blogger.comtag:blogger.com,1999:blog-5694203337413075366.post-12428697433053911572014-05-06T13:25:16.908-07:002014-05-06T13:25:16.908-07:00You need to add HTML elements to provide the searc...You need to add HTML elements to provide the search expression and year inputs. See http://dev.austese.net/harpur/biography. In the code above " $("#search_expr").val();" obviously requires there to exist on the page an input element with the ID set to "search_expr". And for the year dropdown I used a select dropdown with id=year_dropdown. Also if you do not initialise the timeline with JSON you may have to customise the search, given that the above code relies on the existence of config.source.desmondhttps://www.blogger.com/profile/01722159590093138289noreply@blogger.comtag:blogger.com,1999:blog-5694203337413075366.post-47532068620985920722014-05-06T07:59:43.699-07:002014-05-06T07:59:43.699-07:00not seem to work when i integrate your code the ti...not seem to work when i integrate your code the timeline stop displayingDeamonicDesignhttps://www.blogger.com/profile/16323921531980161218noreply@blogger.com