Timeline CustomEventDetailDisplay

From SIMILE Widgets
Jump to: navigation, search

See these various messages:

From the internet archive:

Add this code after you include timeline-api.js:

    <script>
        var oldFillInfoBubble = Timeline.DefaultEventSource.Event.prototype.fillInfoBubble;
        Timeline.DefaultEventSource.Event.prototype.fillInfoBubble = function(elmt, theme, labeller) {
            oldFillInfoBubble.call(this, elmt, theme, labeller);

            var eventObject = this;
            var div = document.createElement("div");
            div.innerHTML = "<input type='checkbox' /> abc";
            div.firstChild.onclick = function() {
            ... do something ... eventObject should give you the data you need ...
            }
            elmt.appendChild(div);
        }
    </script>

Related topics:

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox