Hi Pedro,

You need to put back the info bubble code.  Find the implementation in:
sources.js

Feel free to add it all back, or override or build the info bubble however
you like.

    fillInfoBubble: function(elmt, theme, labeller) {
        var doc = elmt.ownerDocument;

        var title = this.getText();
        var link = this.getLink();
        var image = this.getImage();

        if (image != null) {
            var img = doc.createElement("img");
            img.src = image;

            theme.event.bubble.imageStyler(img);
            elmt.appendChild(img);
        }

        var divTitle = doc.createElement("div");
        var textTitle = doc.createTextNode(title);
        if (link != null) {
            var a = doc.createElement("a");
            a.href = link;
            a.appendChild(textTitle);
            divTitle.appendChild(a);
        } else {
            divTitle.appendChild(textTitle);
        }
        theme.event.bubble.titleStyler(divTitle);
        elmt.appendChild(divTitle);

        var divBody = doc.createElement("div");
        this.fillDescription(divBody);
        theme.event.bubble.bodyStyler(divBody);
        elmt.appendChild(divBody);

        var divTime = doc.createElement("div");
        this.fillTime(divTime, labeller);
        theme.event.bubble.timeStyler(divTime);
        elmt.appendChild(divTime);

        var divWiki = doc.createElement("div");
        this.fillWikiInfo(divWiki);
        theme.event.bubble.wikiStyler(divWiki);
        elmt.appendChild(divWiki);
    }



On Fri, Apr 3, 2009 at 4:52 PM, Pedro Erzubiaki <[email protected]> wrote:

> ok scott, now appears alert, but when click in the OK… appears an empty
> balloon
>
>
> it only lacks this detail, helps me please! =D
>
>
>
> 2009/4/3 Scott Thomson <[email protected]>
>
> Hi Pedro,
>>
>> Put the over-riding code right after the code where you define your
>> timeline.
>>
>> So you might do it like this...
>>
>>     <script>
>>         var tl;
>>
>>         function onLoad() {
>>         :
>>         }
>>
>>         var resizeTimerID = null;
>>         function onResize() {
>>         :
>>         }
>>
>>         Timeline.DefaultEventSource.Event.prototype.fillInfoBubble =
>>
>>
>>         function(elmt, theme, labeller) {
>>               alert('Foo');
>>         }
>>         :
>>     </script>
>>
>>
>> Cheers,
>> Scott
>>
>>
>> On Fri, Apr 3, 2009 at 4:25 PM, Pedro Erzubiaki <[email protected]>wrote:
>>
>>> thanks scott, but in which archive I insert this function?
>>>
>>> I do not know where to insert it and nor as calls-there =(
>>>
>>> Example:
>>>
>>> in the file compact-painter.js I add the function:
>>>
>>> Timeline.DefaultEventSource.Event.prototype.fillInfoBubble =
>>> function(elmt, theme, labeller) {
>>>     alert('Foo');
>>> }
>>>
>>> in the file compact-painter.html??????????????
>>>
>>> var bandInfos = [
>>>                 Timeline.createBandInfo({
>>>                     width:          "90%",
>>>                     intervalUnit:   Timeline.DateTime.WEEK,// padrão
>>> WEEK,
>>>                     intervalPixels: 150, //150
>>>                     eventSource:    eventSource,
>>>                     date:           d,
>>>                     theme:          theme,
>>>                     eventPainter:
>>> Timeline.CompactEventPainter,               // here i call the function
>>> ?????????????/
>>>
>>>
>>> I call the function through eventPainter??????????????
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2009/4/2 Scott Thomson <[email protected]>
>>>
>>>> Sorry Pedro, I'm having a bit of trouble understanding what you are
>>>> asking.
>>>>
>>>> If you want an alert to come up when someone clicks on the timeline try
>>>> adding this code after your timeline definition
>>>>
>>>> Timeline.DefaultEventSource.Event.prototype.fillInfoBubble =
>>>> function(elmt, theme, labeller) {
>>>>     alert('Foo');
>>>> }
>>>>
>>>> Does the InfoBubble not do what you want?
>>>>
>>>>
>>>> On Fri, Apr 3, 2009 at 9:22 AM, Pedro Erzubiaki <[email protected]>wrote:
>>>>
>>>>> somebody can help me?
>>>>>
>>>>> =(
>>>>>
>>>>>
>>>>>
>>>>> 2009/4/2 Erzu <[email protected]>
>>>>>
>>>>>>
>>>>>> when click in an object of timeline I want that he calls a function,
>>>>>> somebody I could say which archive I must modify  and what I must make
>>>>>> to call the function?
>>>>>>
>>>>>> in the truth I want that when internauta click in the object of
>>>>>> timeline appears an alert (Javascript).
>>>>>>
>>>>>> somebody can help me?
>>>>>>
>>>>>> regards,
>>>>>> Erzu
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Scott Thomson
>>>> 0401 726 889
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> Scott Thomson
>> 0401 726 889
>>
>>
>>
>
> >
>


-- 
Scott Thomson
0401 726 889

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to