I found a jQuery plugin that I would like to create wise extension for
https://github.com/ka215/jquery.timeline
As there are no clear instructions here is what I have done so far:
The issue I can see is that the way it is set up in itializatioon it requires
var tlElem = $(‘#my-timeline’) – so it requires referense to <div> where control is placed,
and they is is initialised in code with:tlElem.Timeline(window.tlOpts);
How can I rewrite this, so that it is self initialised?
I have included TestHTML.html in the project where native jQuery component is initialised and works correctly.
You might find this helpful: https://wisej.com/blog/integration1/
In startup.js, you do this:
var id = this.getId() + "_timeline";
this.Timeline = this.widget = $("#" + id);
this.Timeline.Timeline(window.tlOpts);
But you need to do this instead:
$(this.container).Timeline(window.tlOpts);
Also, something to keep in mind as you work on this: You’ll need to clear the cache every time you change the code in the startup.js file. Otherwise, it will use the old code.
Here is a sample:
I managed to get display working and timeline control is now displayed in wisej control.
I am now struggling how to expose: startDatetime, endDatetime, sidebar.list, rows and eventData. they are all set in window.tlOpts and I would like to define them as control properties.
I have updated code so that I can see that javascript works (references were missing as well as jQuery.min.js)
Now I can see that code from startup.js is executing and background is changed from code.
but still timeline control is not showing up.
Please login first to submit.