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

Robert Sirois watchlala at hotmail.com
Fri Oct 14 15:29:03 UTC 2011


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: arning at charm.net
To: seaside at lists.squeakfoundation.org
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
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

    
  


_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20111014/45f9acfa/attachment-0001.htm


More information about the seaside mailing list