[VW7.8NC] - How to display a News ticker on the bottom of a screen

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
ron
Reply | Threaded
Open this post in threaded view
|

[VW7.8NC] - How to display a News ticker on the bottom of a screen

ron
Hi,
 
I am new to this group and new to Seaside.
 
I am trying to implement a kind of Slideshow in which the upper part of the screen displays several "slides" sequentially whereby the contents is dynamic. The lower part (consisting of one line of text) should display a News ticker scrolling from right to left and it should continue to do so even when the upper half of the screen changes.
 
The source for the news ticker woould be the headlines of an RSS-feed.
 
Any ideas how I can accomplish this? Code snippets or examples are very much appriated.
 
Regards,
 
Ron



De informatie verzonden met dit emailbericht is uitsluitend bestemd
voor de geadresseerde. Gebruik van deze informatie door anderen dan de
geadresseerde is verboden. Openbaarmaking, vermenigvuldiging,
verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan.
Afzender staat niet in voor de juiste en volledige overbrenging van de
inhoud van een verzonden email, noch voor tijdige ontvangst daarvan.
Afzender attendeert erop dat de vertrouwelijkheid van informatie verzonden per email niet gewaarborgd is.

Minder printen is beter voor het milieu.
- VolkerWessels Telecom is de handelsnaam van Volker Wessels Telecom bv - KvK Gooi-, Eem- en Flevoland 24321042-

The information contained in this communication is confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it. If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking any
action in reliance on the contents of this information is strictly prohibited and may be unlawful.
Sender is neither liable for the proper and complete transmission of
the information contained in this communication nor for any delay in
its receipt. Please note that the confidentiality of e-mail
communication is not warranted.

Less printing is better for the environment
-VolkerWessels Telecom is the tradingname of Volker Wessels Telecom bv - Chamber of Commerce for the district Gooi-, Eem- en Flevoland 24321042-

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [VW7.8NC] - How to display a News ticker on the bottom of a screen

Bob Arning
This is a start, but it's a bit jumpy. I'll poke around a bit more.

renderContentOn: html
 
    | id longString |
   
    longString _ String streamContents: [ :strm |
        1 to: 100 do: [ :i | strm nextPutAll: '   ',i asString,'. Info for this item.'].
    ].
    html div   
        id: (id _ html nextId);           
        style:
'right: -21000px;
left: 0px;
bottom: 0;
z-index: 20;
padding: 2px;
position: fixed;
text-align: left;
background-color: #eee;
border-top: 1px solid #aaa;
height: 18px;
overflow: hidden;';
        with: [
            html span   
                style: 'font-size: 14px;';
                with: longString.
        ].
   
    html document addLoadScript: ((html jQuery: id asSymbol) animate duration: 100*1000; easing: 'linear'; left: '-=10000px').

Cheers,
Bob

On 10/14/11 7:51 AM, Dobbelstein, R. wrote:
Hi,
 
I am new to this group and new to Seaside.
 
I am trying to implement a kind of Slideshow in which the upper part of the screen displays several "slides" sequentially whereby the contents is dynamic. The lower part (consisting of one line of text) should display a News ticker scrolling from right to left and it should continue to do so even when the upper half of the screen changes.
 
The source for the news ticker woould be the headlines of an RSS-feed.
 
Any ideas how I can accomplish this? Code snippets or examples are very much appriated.
 
Regards,
 
Ron



De informatie verzonden met dit emailbericht is uitsluitend bestemd
voor de geadresseerde. Gebruik van deze informatie door anderen dan de
geadresseerde is verboden. Openbaarmaking, vermenigvuldiging,
verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan.
Afzender staat niet in voor de juiste en volledige overbrenging van de
inhoud van een verzonden email, noch voor tijdige ontvangst daarvan.
Afzender attendeert erop dat de vertrouwelijkheid van informatie verzonden per email niet gewaarborgd is.

Minder printen is beter voor het milieu.
- VolkerWessels Telecom is de handelsnaam van Volker Wessels Telecom bv - KvK Gooi-, Eem- en Flevoland 24321042-

The information contained in this communication is confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it. If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking any
action in reliance on the contents of this information is strictly prohibited and may be unlawful.
Sender is neither liable for the proper and complete transmission of
the information contained in this communication nor for any delay in
its receipt. Please note that the confidentiality of e-mail
communication is not warranted.

Less printing is better for the environment
-VolkerWessels Telecom is the tradingname of Volker Wessels Telecom bv - Chamber of Commerce for the district Gooi-, Eem- en Flevoland 24321042-


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: [VW7.8NC] - How to display a News ticker on the bottom of a screen

Robert Sirois
renderContentOn: html
| string | string := (String streamContents: [:s | self latestNewsHeadlines asStringOn: s delimiter: ' | ' ]).
html div
id: #container;
style: 'overflow: hidden; white-space: nowrap; width: 500px; margin: 10px; padding: 3px; border: 1px solid black; border-radius: 5px;';
with: [ html div id: #marquee; style: 'position: relative; left: 505px'; with: string ].

html document addLoadScript: (((html jQuery: #marquee) animate duration: (string size * 60); left: '-=', (string size * 6.5) asString, 'px') onComplete: (html jQuery ajax script: [:s | s add: (self loopOn: s) ])).

loopOn: html
| js string |
js := JSScript new.
" get new headlines "
string := (String streamContents: [:s | self latestNewsHeadlines asStringOn: s delimiter: ' | ' ]).
js add: ((html jQuery: #container) html: [:r | r div id: #marquee; style: 'position: relative; left: 505px'; with: string ]).
js add: (((html jQuery: #marquee) animate duration: (string size * 60); left: '-=', (string size * 6.5) asString, 'px') onComplete: (html jQuery ajax script: [:s | s add: (self loopOn: s) ])).
^js.

latestNewsHeadlines

^'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eleifend vestibulum neque, vel aliquam erat viverra eu. Nunc convallis congue eros, ut dignissim odio ullamcorper vitae. Sed pretium urna non justo varius vel interdum nibh aliquet. Proin rhoncus molestie nibh, sit amet blandit mi placerat id. Proin a leo quis turpis ultrices interdum. Etiam sed elit at justo faucibus fringilla. Nunc sit amet augue sit amet magna vulputate fermentum eu et nisi. Donec luctus mauris eu neque placerat hendrerit.' substrings asOrderedCollection.

The easing is kinda obnoxious imo.

RS


Date: Fri, 14 Oct 2011 09:59:13 -0400
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] [VW7.8NC] - How to display a News ticker on the bottom of a screen

This is a start, but it's a bit jumpy. I'll poke around a bit more.

renderContentOn: html
 
    | id longString |
   
    longString _ String streamContents: [ :strm |
        1 to: 100 do: [ :i | strm nextPutAll: '   ',i asString,'. Info for this item.'].
    ].
    html div   
        id: (id _ html nextId);           
        style:
'right: -21000px;
left: 0px;
bottom: 0;
z-index: 20;
padding: 2px;
position: fixed;
text-align: left;
background-color: #eee;
border-top: 1px solid #aaa;
height: 18px;
overflow: hidden;';
        with: [
            html span   
                style: 'font-size: 14px;';
                with: longString.
        ].
   
    html document addLoadScript: ((html jQuery: id asSymbol) animate duration: 100*1000; easing: 'linear'; left: '-=10000px').

Cheers,
Bob

On 10/14/11 7:51 AM, Dobbelstein, R. wrote:
Hi,
 
I am new to this group and new to Seaside.
 
I am trying to implement a kind of Slideshow in which the upper part of the screen displays several "slides" sequentially whereby the contents is dynamic. The lower part (consisting of one line of text) should display a News ticker scrolling from right to left and it should continue to do so even when the upper half of the screen changes.
 
The source for the news ticker woould be the headlines of an RSS-feed.
 
Any ideas how I can accomplish this? Code snippets or examples are very much appriated.
 
Regards,
 
Ron



De informatie verzonden met dit emailbericht is uitsluitend bestemd
voor de geadresseerde. Gebruik van deze informatie door anderen dan de
geadresseerde is verboden. Openbaarmaking, vermenigvuldiging,
verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan.
Afzender staat niet in voor de juiste en volledige overbrenging van de
inhoud van een verzonden email, noch voor tijdige ontvangst daarvan.
Afzender attendeert erop dat de vertrouwelijkheid van informatie verzonden per email niet gewaarborgd is.

Minder printen is beter voor het milieu.
- VolkerWessels Telecom is de handelsnaam van Volker Wessels Telecom bv - KvK Gooi-, Eem- en Flevoland 24321042-

The information contained in this communication is confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it. If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking any
action in reliance on the contents of this information is strictly prohibited and may be unlawful.
Sender is neither liable for the proper and complete transmission of
the information contained in this communication nor for any delay in
its receipt. Please note that the confidentiality of e-mail
communication is not warranted.

Less printing is better for the environment
-VolkerWessels Telecom is the tradingname of Volker Wessels Telecom bv - Chamber of Commerce for the district Gooi-, Eem- en Flevoland 24321042-


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [VW7.8NC] - How to display a News ticker on the bottom of a screen

Bob Arning
In reply to this post by ron
This one's a bit smoother...

renderContentOn: html
 
    | id longString |

    longString _ String streamContents: [ :strm |
        1 to: 100 do: [ :i | strm nextPutAll: '   ',i asString,'. Info for this item.'].
    ].
    html script: '
var UUBox = 0;
var UULeft = 0;
var UUInterval = 100;
var UUShift = 0;

function ShiftLeftALittle() {
    UULeft = UULeft + UUShift;
    UUBox.style.left = UULeft+"px";
    if (UULeft>UULimit) {window.setTimeout("ShiftLeftALittle()",UUInterval)}
}
function StartShifting(boxname,interval,x,shift,limit) {
    UUBox = document.getElementById(boxname);
    UULeft = x;
    UUInterval = interval;
    UUShift = shift;
    UULimit = limit;
    ShiftLeftALittle();
}
    '.
    html div   
        id: (id _ html nextId);           
        style:
'right: -21000px;
left: 0px;
bottom: 0;
z-index: 20;
padding: 2px;
position: fixed;
text-align: left;
background-color: #eee;
border-top: 1px solid #aaa;
height: 18px;
font-size: 14px;
overflow: hidden;';
        with: longString.
   
    html document addLoadScript:
        (JSStream new
            nextPutAll: 'StartShifting';
            arguments: {id. 20. 0. -2. -8000};
            yourself).

Cheers,
Bob


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [VW7.8NC] - How to display a News ticker on the bottom of a screen

Bob Arning
In reply to this post by Robert Sirois
So,

(html jQuery: #marquee) animate easing: 'linear'; ...

changes that.

Cheers,
Bob

On 10/14/11 11:29 AM, Robert Sirois wrote:
The easing is kinda obnoxious imo.

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: [VW7.8NC] - How to display a News ticker on the bottom of a screen

Robert Sirois
Ah, ok. I saw the method comment about a plugin and figured it wasn't worth putting in.

Lol you win Bob :p

RS


Date: Fri, 14 Oct 2011 12:17:17 -0400
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] [VW7.8NC] - How to display a News ticker on the bottom of a screen

So,

(html jQuery: #marquee) animate easing: 'linear'; ...

changes that.

Cheers,
Bob

On 10/14/11 11:29 AM, Robert Sirois wrote:
The easing is kinda obnoxious imo.

_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
ron
Reply | Threaded
Open this post in threaded view
|

RE: [VW7.8NC] - How to display a News ticker on the bottom of a screen

ron
Hi Robert and Bob,
 
Thanks alot for your help so far.
 
I've tried both of you examples, but so far didn't see any scrolling text yet. My problems might be related to the fact that I'm on VW7.8NC. I've attached my example (in which I tried to integrate the 3 examples). Maybe you can take a look at it and tell me what I'm doing wrong?
 
I've tried the example on Windows Vista on both IE 9 and Firefox.
 
Regards,
 
Ron
 

Van: [hidden email] [mailto:[hidden email]] Namens Robert Sirois
Verzonden: vrijdag 14 oktober 2011 18:29
Aan: [hidden email]
Onderwerp: RE: [Seaside] [VW7.8NC] - How to display a News ticker on the bottom of a screen

Ah, ok. I saw the method comment about a plugin and figured it wasn't worth putting in.

Lol you win Bob :p

RS


Date: Fri, 14 Oct 2011 12:17:17 -0400
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] [VW7.8NC] - How to display a News ticker on the bottom of a screen

So,

(html jQuery: #marquee) animate easing: 'linear'; ...

changes that.

Cheers,
Bob

On 10/14/11 11:29 AM, Robert Sirois wrote:
The easing is kinda obnoxious imo.

_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



De informatie verzonden met dit emailbericht is uitsluitend bestemd
voor de geadresseerde. Gebruik van deze informatie door anderen dan de
geadresseerde is verboden. Openbaarmaking, vermenigvuldiging,
verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan.
Afzender staat niet in voor de juiste en volledige overbrenging van de
inhoud van een verzonden email, noch voor tijdige ontvangst daarvan.
Afzender attendeert erop dat de vertrouwelijkheid van informatie verzonden per email niet gewaarborgd is.

Minder printen is beter voor het milieu.
- VolkerWessels Telecom is de handelsnaam van Volker Wessels Telecom bv - KvK Gooi-, Eem- en Flevoland 24321042-

The information contained in this communication is confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it. If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking any
action in reliance on the contents of this information is strictly prohibited and may be unlawful.
Sender is neither liable for the proper and complete transmission of
the information contained in this communication nor for any delay in
its receipt. Please note that the confidentiality of e-mail
communication is not warranted.

Less printing is better for the environment
-VolkerWessels Telecom is the tradingname of Volker Wessels Telecom bv - Chamber of Commerce for the district Gooi-, Eem- en Flevoland 24321042-

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

SlideShowTest.st (7K) Download Attachment
ron
Reply | Threaded
Open this post in threaded view
|

RE: RE: [Seaside] [VW7.8NC] - How to display a News ticker on the bottom of a screen

ron
In reply to this post by Robert Sirois
Oh, I think I should add that I'm using Seaside 3.0 (which is included as a package in the VWNC7.8 distribution).


Van: Dobbelstein, R.
Verzonden: maandag 17 oktober 2011 10:28
Aan: 'Seaside - general discussion'
Onderwerp: RE: [Seaside] [VW7.8NC] - How to display a News ticker on the bottom of a screen

Hi Robert and Bob,
 
Thanks alot for your help so far.
 
I've tried both of you examples, but so far didn't see any scrolling text yet. My problems might be related to the fact that I'm on VW7.8NC. I've attached my example (in which I tried to integrate the 3 examples). Maybe you can take a look at it and tell me what I'm doing wrong?
 
I've tried the example on Windows Vista on both IE 9 and Firefox.
 
Regards,
 
Ron
 

Van: [hidden email] [mailto:[hidden email]] Namens Robert Sirois
Verzonden: vrijdag 14 oktober 2011 18:29
Aan: [hidden email]
Onderwerp: RE: [Seaside] [VW7.8NC] - How to display a News ticker on the bottom of a screen

Ah, ok. I saw the method comment about a plugin and figured it wasn't worth putting in.

Lol you win Bob :p

RS


Date: Fri, 14 Oct 2011 12:17:17 -0400
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] [VW7.8NC] - How to display a News ticker on the bottom of a screen

So,

(html jQuery: #marquee) animate easing: 'linear'; ...

changes that.

Cheers,
Bob

On 10/14/11 11:29 AM, Robert Sirois wrote:
The easing is kinda obnoxious imo.

_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



De informatie verzonden met dit emailbericht is uitsluitend bestemd
voor de geadresseerde. Gebruik van deze informatie door anderen dan de
geadresseerde is verboden. Openbaarmaking, vermenigvuldiging,
verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan.
Afzender staat niet in voor de juiste en volledige overbrenging van de
inhoud van een verzonden email, noch voor tijdige ontvangst daarvan.
Afzender attendeert erop dat de vertrouwelijkheid van informatie verzonden per email niet gewaarborgd is.

Minder printen is beter voor het milieu.
- VolkerWessels Telecom is de handelsnaam van Volker Wessels Telecom bv - KvK Gooi-, Eem- en Flevoland 24321042-

The information contained in this communication is confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it. If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking any
action in reliance on the contents of this information is strictly prohibited and may be unlawful.
Sender is neither liable for the proper and complete transmission of
the information contained in this communication nor for any delay in
its receipt. Please note that the confidentiality of e-mail
communication is not warranted.

Less printing is better for the environment
-VolkerWessels Telecom is the tradingname of Volker Wessels Telecom bv - Chamber of Commerce for the district Gooi-, Eem- en Flevoland 24321042-

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [VW7.8NC] - How to display a News ticker on the bottom of a screen

Bob Arning
In reply to this post by ron
You were not loading jQuery. Change SlideShowTest class>>initialize to something like this:

initialize
"
SlideShowTest initialize
"
    (WAAdmin register: self asApplicationAt: 'slideshowtest')
        addLibrary: JQDevelopmentLibrary;
        exceptionHandler: WADebugErrorHandler;
        preferenceAt: #rootDecorationClasses put: #();
        yourself.

Cheers,
Bob

On 10/17/11 4:27 AM, Dobbelstein, R. wrote:
Hi Robert and Bob,
 
Thanks alot for your help so far.
 
I've tried both of you examples, but so far didn't see any scrolling text yet. My problems might be related to the fact that I'm on VW7.8NC. I've attached my example (in which I tried to integrate the 3 examples). Maybe you can take a look at it and tell me what I'm doing wrong?
 
I've tried the example on Windows Vista on both IE 9 and Firefox.
 
Regards,
 
Ron
 

Van: [hidden email] [[hidden email]] Namens Robert Sirois
Verzonden: vrijdag 14 oktober 2011 18:29
Aan: [hidden email]
Onderwerp: RE: [Seaside] [VW7.8NC] - How to display a News ticker on the bottom of a screen

Ah, ok. I saw the method comment about a plugin and figured it wasn't worth putting in.

Lol you win Bob :p

RS


Date: Fri, 14 Oct 2011 12:17:17 -0400
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] [VW7.8NC] - How to display a News ticker on the bottom of a screen

So,

(html jQuery: #marquee) animate easing: 'linear'; ...

changes that.

Cheers,
Bob

On 10/14/11 11:29 AM, Robert Sirois wrote:
The easing is kinda obnoxious imo.

_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



De informatie verzonden met dit emailbericht is uitsluitend bestemd
voor de geadresseerde. Gebruik van deze informatie door anderen dan de
geadresseerde is verboden. Openbaarmaking, vermenigvuldiging,
verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan.
Afzender staat niet in voor de juiste en volledige overbrenging van de
inhoud van een verzonden email, noch voor tijdige ontvangst daarvan.
Afzender attendeert erop dat de vertrouwelijkheid van informatie verzonden per email niet gewaarborgd is.

Minder printen is beter voor het milieu.
- VolkerWessels Telecom is de handelsnaam van Volker Wessels Telecom bv - KvK Gooi-, Eem- en Flevoland 24321042-

The information contained in this communication is confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it. If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking any
action in reliance on the contents of this information is strictly prohibited and may be unlawful.
Sender is neither liable for the proper and complete transmission of
the information contained in this communication nor for any delay in
its receipt. Please note that the confidentiality of e-mail
communication is not warranted.

Less printing is better for the environment
-VolkerWessels Telecom is the tradingname of Volker Wessels Telecom bv - Chamber of Commerce for the district Gooi-, Eem- en Flevoland 24321042-


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside