Update of /cvsroot/freevo/freevo/src/www/htdocs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1086

Modified Files:
        edit_favorite.rpy genre.rpy guide.rpy 
Log Message:
An impressive update to the guide code from Jason Tackaberry that
dramatically speeds up rendering and navigation of the guide.  I will be
applying this patch to future 1.5.x Debian packages, but I'm not applying
it to 1.5 branch of CVS unless people really want it.


Index: guide.rpy
===================================================================
RCS file: /cvsroot/freevo/freevo/src/www/htdocs/guide.rpy,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** guide.rpy   8 Aug 2004 19:07:55 -0000       1.26
--- guide.rpy   10 Aug 2004 12:54:22 -0000      1.27
***************
*** 12,15 ****
--- 12,21 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.27  2004/08/10 12:54:22  outlyer
+ # An impressive update to the guide code from Jason Tackaberry that
+ # dramatically speeds up rendering and navigation of the guide.  I will be
+ # applying this patch to future 1.5.x Debian packages, but I'm not applying
+ # it to 1.5 branch of CVS unless people really want it.
+ #
  # Revision 1.26  2004/08/08 19:07:55  rshortt
  # Use tv_util to cache the guide.
***************
*** 99,104 ****
  FALSE = 0
  
- MAX_DESCRIPTION_CHAR = 1000
- 
  class GuideResource(FreevoResource):
  
--- 105,108 ----
***************
*** 204,208 ****
                  )
  
-         pops = ''
          desc = ''
  
--- 208,211 ----
***************
*** 216,220 ****
          fv.tableClose()
  
!         fv.tableOpen('cols=\"%d\"' % \
                       ( n_cols*cpb + 1 ) )
          showheader = 0
--- 219,223 ----
          fv.tableClose()
  
!         fv.tableOpen('id="guide" cols=\"%d\"' % \
                       ( n_cols*cpb + 1 ) )
          showheader = 0
***************
*** 244,255 ****
              showheader+= 1
                  
              now = mfrguidestart
-             fv.tableRowOpen('class="chanrow"')
              # chan.displayname = string.replace(chan.displayname, "&", "SUB")
!             fv.tableCell(chan.displayname, 'class="channel"')
              c_left = n_cols * cpb
  
              if not chan.programs:
!                 fv.tableCell('« '+_('This channel has no data loaded')+' 
»', 'class="programnodata" colspan="%s"' % (n_cols* cpb) )
  
              for prog in chan.programs:
--- 247,259 ----
              showheader+= 1
                  
+             rowdata = []
              now = mfrguidestart
              # chan.displayname = string.replace(chan.displayname, "&", "SUB")
!             rowdata.append("<tr class='chanrow'>")
!             rowdata.append("<td class='channel'>%s</td>" % chan.displayname)
              c_left = n_cols * cpb
  
              if not chan.programs:
!                 rowdata.append('<td class="programnodata" colspan="%s">&laquo; ' % 
(n_cols*cpb) + _('This channel has no data loaded') + ' &raquo;' )
  
              for prog in chan.programs:
***************
*** 289,382 ****
                          popid = '%s:%s' % (prog.channel_id, prog.start)
  
-                         if prog.desc == '':
-                             desc = (_('Sorry, the program description for ' \
-                                       '%s is unavailable.')) % 
('<b>'+prog.title+'</b>')
-                         else:
-                             desc = prog.desc
- 
-                         desc = desc.lstrip()
-                         if MAX_DESCRIPTION_CHAR and len(desc) > MAX_DESCRIPTION_CHAR:
-                             desc=desc[:desc[:MAX_DESCRIPTION_CHAR].rfind('.')] + '. 
[...]'
- 
-                         
- 
-                         if prog.sub_title:
-                             desc = '"%s"<br/>%s' % (prog.sub_title,desc)
- 
- 
-                         pops += (
-                             u"<div id=\"%s\" class=\"proginfo\">\n"\
-                             u"   <table class=\"popup\"\n"\
-                             u"          onmouseover=\"focusPop('%s');\"\n"\
-                             u"          onmouseout=\"unfocusPop('%s');\">\n"\
-                             u"      <thead>\n"\
-                             u"         <tr>\n"\
-                             u"            <td>\n"\
-                             u"               %s\n"\
-                             u"            </td>\n"\
-                             u"         </tr>\n"\
-                             u"      </thead>\n"\
-                             u"      <tbody>\n"\
-                             u"         <tr>\n"\
-                             u"            <td class=\"progdesc\">\n"\
-                             u"               %s\n"\
-                             u"            </td>\n"\
-                             u"         </tr>\n"\
-                             u"         <tr>\n"\
-                             u"         <td class=\"progtime\">\n"\
-                             u"            <b>"+_('Start')+u":</b> %s, \n"\
-                             u"            <b>"+_('Stop')+u":</b> %s, \n"\
-                             u"            <b>"+_('Runtime')+u":</b> %smin\n"\
-                             u"            </td>\n"\
-                             u"         </td>\n"\
-                             u"      </tbody>\n"\
-                             u"      <tfoot>\n"\
-                             u"         <tr>\n"\
-                             u"            <td>\n"\
-                             u"               <table class=\"popupbuttons\">\n"\
-                             u"                  <tbody>\n"\
-                             u"                     <tr>\n"\
-                             u"                        <td 
onclick=\"document.location='record.rpy?chan=%s&start=%s&action=add'\">\n"\
-                             u"                           "+_('Record')+u"\n"\
-                             u"                        </td>\n"\
-                             u"                        <td 
onclick=\"document.location='edit_favorite.rpy?chan=%s&start=%s&action=add'\">\n"\
-                             u"                        "+_('Add to Favorites')+u"\n"\
-                             u"                        </td>\n"\
-                             u"                        <td 
onclick=\"javascript:closePop('%s');\">\n"\
-                             u"                        "+_('Close Window')+u"\n"\
-                             u"                        </td>\n"\
-                             u"                     </tr>\n"\
-                             u"                  </tbody>\n"\
-                             u"               </table>\n"\
-                             u"            </td>\n"\
-                             u"         </tr>\n"\
-                             u"      </tfoot>\n"\
-                             u"   </table>\n"\
-                             u"</div>\n"
-                             ) % ( popid, popid, popid, prog.title, desc,
-                                   time.strftime(config.TV_TIMEFORMAT,
-                                                 time.localtime( prog.start ) ),
-                                   time.strftime(config.TV_TIMEFORMAT,
-                                                 time.localtime( prog.stop ) ),
-                                   int( ( prog.stop - prog.start ) / 60 ),
-                                   prog.channel_id, prog.start,
-                                   prog.channel_id, prog.start, popid )
-                         
                          style = ''
                          if colspan == n_cols * cpb:
                              style += 'text-align: center; '
!                         
!                         fv.tableCell(cell, 'class="'+status+'" 
onclick="showPop(\'%s\', this)" colspan="%s" style="%s"' % (popid, colspan, style))
                          now += colspan * PRECISION
                          c_left -= colspan
  
!             fv.tableRowClose()
          fv.tableClose()
          
-         fv.res += pops
- 
          fv.printSearchForm()
          fv.printLinks()
          fv.res += '</div>'
          fv.printFooter()
  
--- 293,360 ----
                          popid = '%s:%s' % (prog.channel_id, prog.start)
  
                          style = ''
                          if colspan == n_cols * cpb:
                              style += 'text-align: center; '
! 
!                         rowdata.append('<td class="%s" onclick="guide_click(this, 
event)" id="%s" colspan="%s", style="%s">%s</td>' % (status, popid, colspan, style, 
cell))
                          now += colspan * PRECISION
                          c_left -= colspan
  
!             rowdata.append("</tr>")
!             fv.res += string.join(rowdata, "\n")
          fv.tableClose()
          
          fv.printSearchForm()
          fv.printLinks()
          fv.res += '</div>'
+         fv.res += (
+             u"<div id=\"popup\" class=\"proginfo\" style=\"display:none\">\n"\
+             u"<div id=\"program-waiting\" style=\"background-color: #0B1C52; 
position: absolute\">\n"\
+             u"  <br /><b>Fetching program information ...</b>\n"\
+             u"</div>\n"\
+             u"   <table id=\"program-info\" class=\"popup\">\n"\
+             u"      <thead>\n"\
+             u"         <tr>\n"\
+             u"            <td id=\"program-title\">\n"\
+             u"            </td>\n"\
+             u"         </tr>\n"\
+             u"      </thead>\n"\
+             u"      <tbody>\n"\
+             u"         <tr>\n"\
+             u"            <td class=\"progdesc\" id=\"program-desc\">\n"\
+             u"            </td>\n"\
+             u"         </tr>\n"\
+             u"         <tr>\n"\
+             u"         <td class=\"progtime\">\n"\
+             u"            <b>"+_('Start')+u":</b> <span 
id=\"program-start\"></span>, \n"\
+             u"            <b>"+_('Stop')+u":</b> <span id=\"program-end\"></span>, 
\n"\
+             u"            <b>"+_('Runtime')+u":</b> <span 
id=\"program-runtime\"></span> min\n"\
+             u"            </td>\n"\
+             u"         </td>\n"\
+             u"      </tbody>\n"\
+             u"      <tfoot>\n"\
+             u"         <tr>\n"\
+             u"            <td>\n"\
+             u"               <table class=\"popupbuttons\">\n"\
+             u"                  <tbody>\n"\
+             u"                     <tr>\n"\
+             u"                        <td id=\"program-record-button\">\n"\
+             u"                           "+_('Record')+u"\n"\
+             u"                        </td>\n"\
+             u"                        <td id=\"program-favorites-button\">\n"\
+             u"                        "+_('Add to Favorites')+u"\n"\
+             u"                        </td>\n"\
+             u"                        <td onclick=\"program_popup_close();\">\n"\
+             u"                        "+_('Close Window')+u"\n"\
+             u"                        </td>\n"\
+             u"                     </tr>\n"\
+             u"                  </tbody>\n"\
+             u"               </table>\n"\
+             u"            </td>\n"\
+             u"         </tr>\n"\
+             u"      </tfoot>\n"\
+             u"   </table>\n"\
+             u"</div>\n" )
+         fv.res += "<iframe id='hidden' style='visibility: hidden; width: 1px; 
height: 1px'></iframe>\n"
          fv.printFooter()
  

Index: genre.rpy
===================================================================
RCS file: /cvsroot/freevo/freevo/src/www/htdocs/genre.rpy,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** genre.rpy   5 Mar 2004 02:37:05 -0000       1.9
--- genre.rpy   10 Aug 2004 12:54:22 -0000      1.10
***************
*** 12,15 ****
--- 12,21 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.10  2004/08/10 12:54:22  outlyer
+ # An impressive update to the guide code from Jason Tackaberry that
+ # dramatically speeds up rendering and navigation of the guide.  I will be
+ # applying this patch to future 1.5.x Debian packages, but I'm not applying
+ # it to 1.5 branch of CVS unless people really want it.
+ #
  # Revision 1.9  2004/03/05 02:37:05  rshortt
  # Lets add in prog.desc to fill up some of this area.
***************
*** 160,164 ****
          fv.tableRowClose()
  
-         pops = ''
          desc = ''
          gotdata = 0
--- 166,169 ----
***************
*** 191,265 ****
                      fv.tableCell(chan.displayname, 'class="channel"')
                      popid = '%s:%s' % (prog.channel_id, prog.start)
-                     if prog.desc == '':
-                         desc = _('Sorry, the program description for %s is 
unavailable.') % ('<b>'+prog.title+'</b>')
-                     else:
-                         desc = prog.desc
-                         pops += ( u"<div id=\"%s\" class=\"proginfo\">\n"\
-                                   u"   <table width=\"100%%\"\n"\
-                                   u"          cellpadding=\"0\"\n"\
-                                   u"          cellspacing=\"0\"\n"\
-                                   u"          class=\"popup\"\n"\
-                                   u"          onmouseover=\"focusPop('%s');\"\n"\
-                                   u"          onmouseout=\"unfocusPop('%s');\">\n"\
-                                   u"      <thead>\n"\
-                                   u"         <tr>\n"\
-                                   u"            <td>"\
-                                   u"               %s\n"\
-                                   u"            </td>\n"\
-                                   u"         </tr>\n"\
-                                   u"      </thead>\n"\
-                                   u"      <tbody>\n"\
-                                   u"         <tr>\n"\
-                                   u"            <td class=\"progdesc\">\n"\
-                                   u"               %s\n"\
-                                   u"            </td>\n"\
-                                   u"         </tr>\n"\
-                                   u"         <tr>\n"\
-                                   u"         <td class=\"progtime\">\n"\
-                                   u"            <b>"+_('Start')+u":</b> %s, \n"\
-                                   u"            <b>"+_('Stop')+u":</b> %s, \n"\
-                                   u"            <b>"+_('Runtime')+":</b> %smin\n"\
-                                   u"            </td>\n"\
-                                   u"         </td>\n"\
-                                   u"      </tbody>\n"\
-                                   u"      <tfoot>\n"\
-                                   u"         <tr>\n"\
-                                   u"            <td>\n"\
-                                   u"               <table width=\"100%%\"\n"\
-                                   u"                      class=\"popupbuttons\"\n"\
-                                   u"                      border=\"0\"\n"\
-                                   u"                      cellpadding=\"0\"\n"\
-                                   u"                      cellspacing=\"4\">\n"\
-                                   u"                  <tbody>\n"\
-                                   u"                     <tr>\n"\
-                                   u"                        <td 
onclick=\"document.location='record.rpy?chan=%s&start=%s&action=add'\">\n"\
-                                   u"                           "+_('Record')+u"\n"\
-                                   u"                        </td>\n"\
-                                   u"                        <td 
onclick=\"document.location='edit_favorite.rpy?chan=%s&start=%s&action=add'\">\n"\
-                                   u"                           "+_('Add to 
Favorites')+u"\n"\
-                                   u"                        </td>\n"\
-                                   u"                        <td 
onclick=\"javascript:closePop('%s');\">\n"\
-                                   u"                           "+_('Close 
Window')+"\n"\
-                                   u"                        </td>\n"\
-                                   u"                     </tr>\n"\
-                                   u"                  </tbody>\n"\
-                                   u"               </table>\n"\
-                                   u"            </td>\n"\
-                                   u"         </tr>\n"\
-                                   u"      </tfoot>\n"\
-                                   u"   </table>\n"\
-                                   u"</div>\n"
-                                   ) % (
-                             popid, popid, popid, prog.title, desc,
-                             time.strftime('%H:%M',
-                                           time.localtime( prog.start ) ),
-                             time.strftime('%H:%M',
-                                           time.localtime( prog.stop ) ),
-                             int( ( prog.stop - prog.start ) / 60 ),
-                             prog.channel_id, prog.start,
-                             prog.channel_id, prog.start, popid
-                             )
                          
!                     fv.tableCell(prog.title + '&nbsp;&nbsp;-&nbsp;&nbsp;' + 
prog.desc, 'class="'+status+'" onclick="showPop(\'%s\', this)" width="80%%"' % popid )
                      fv.tableCell(time.strftime('%H:%M', time.localtime(prog.start)), 
'class="channel"')
                      fv.tableCell(time.strftime('%H:%M', time.localtime(prog.stop)), 
'class="channel"')
--- 196,201 ----
                      fv.tableCell(chan.displayname, 'class="channel"')
                      popid = '%s:%s' % (prog.channel_id, prog.start)
                          
!                     fv.tableCell(prog.title + '&nbsp;&nbsp;-&nbsp;&nbsp;' + 
prog.desc, 'class="'+status+'" onclick="guide_click(this, event)" id="%s"  
width="80%%"' % popid )
                      fv.tableCell(time.strftime('%H:%M', time.localtime(prog.start)), 
'class="channel"')
                      fv.tableCell(time.strftime('%H:%M', time.localtime(prog.stop)), 
'class="channel"')
***************
*** 271,278 ****
              fv.tableRowClose()
          fv.tableClose()
-         fv.res += pops
  
          fv.printSearchForm()
          fv.printLinks()
          fv.printFooter()
  
--- 207,262 ----
              fv.tableRowClose()
          fv.tableClose()
  
          fv.printSearchForm()
          fv.printLinks()
+         fv.res += (
+             u"<div id=\"popup\" class=\"proginfo\" style=\"display:none\">\n"\
+             u"<div id=\"program-waiting\" style=\"background-color: #0B1C52; 
position: absolute\">\n"\
+             u"  <br /><b>Fetching program information ...</b>\n"\
+             u"</div>\n"\
+             u"   <table id=\"program-info\" class=\"popup\">\n"\
+             u"      <thead>\n"\
+             u"         <tr>\n"\
+             u"            <td id=\"program-title\">\n"\
+             u"            </td>\n"\
+             u"         </tr>\n"\
+             u"      </thead>\n"\
+             u"      <tbody>\n"\
+             u"         <tr>\n"\
+             u"            <td class=\"progdesc\" id=\"program-desc\">\n"\
+             u"            </td>\n"\
+             u"         </tr>\n"\
+             u"         <tr>\n"\
+             u"         <td class=\"progtime\">\n"\
+             u"            <b>"+_('Start')+u":</b> <span 
id=\"program-start\"></span>, \n"\
+             u"            <b>"+_('Stop')+u":</b> <span id=\"program-end\"></span>, 
\n"\
+             u"            <b>"+_('Runtime')+u":</b> <span 
id=\"program-runtime\"></span> min\n"\
+             u"            </td>\n"\
+             u"         </td>\n"\
+             u"      </tbody>\n"\
+             u"      <tfoot>\n"\
+             u"         <tr>\n"\
+             u"            <td>\n"\
+             u"               <table class=\"popupbuttons\">\n"\
+             u"                  <tbody>\n"\
+             u"                     <tr>\n"\
+             u"                        <td id=\"program-record-button\">\n"\
+             u"                           "+_('Record')+u"\n"\
+             u"                        </td>\n"\
+             u"                        <td id=\"program-favorites-button\">\n"\
+             u"                        "+_('Add to Favorites')+u"\n"\
+             u"                        </td>\n"\
+             u"                        <td onclick=\"program_popup_close();\">\n"\
+             u"                        "+_('Close Window')+u"\n"\
+             u"                        </td>\n"\
+             u"                     </tr>\n"\
+             u"                  </tbody>\n"\
+             u"               </table>\n"\
+             u"            </td>\n"\
+             u"         </tr>\n"\
+             u"      </tfoot>\n"\
+             u"   </table>\n"\
+             u"</div>\n" )
+         fv.res += "<iframe id='hidden' style='visibility: hidden; width: 1px; 
height: 1px'></iframe>\n"
          fv.printFooter()
  

Index: edit_favorite.rpy
===================================================================
RCS file: /cvsroot/freevo/freevo/src/www/htdocs/edit_favorite.rpy,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** edit_favorite.rpy   20 May 2004 15:45:07 -0000      1.17
--- edit_favorite.rpy   10 Aug 2004 12:54:22 -0000      1.18
***************
*** 12,15 ****
--- 12,21 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.18  2004/08/10 12:54:22  outlyer
+ # An impressive update to the guide code from Jason Tackaberry that
+ # dramatically speeds up rendering and navigation of the guide.  I will be
+ # applying this patch to future 1.5.x Debian packages, but I'm not applying
+ # it to 1.5 branch of CVS unless people really want it.
+ #
  # Revision 1.17  2004/05/20 15:45:07  outlyer
  # Fixes for favorites containing the '&' symbol... covert it from the HTML
***************
*** 191,201 ****
  
          fv.printHeader(_('Edit Favorite'), 'styles/main.css')
! 
!         fv.tableOpen('border="0" cellpadding="4" cellspacing="1" width="100%"')
!         fv.tableRowOpen('class="chanrow"')
!         fv.tableCell('<img src="images/logo_200x100.png" />', 'align="left"')
!         fv.tableCell(_('Edit Favorite'), 'class="heading" align="left"')
!         fv.tableRowClose()
!         fv.tableClose()
  
          fv.res += '<br><form name="editfavorite" method="get" 
action="favorites.rpy">'
--- 197,208 ----
  
          fv.printHeader(_('Edit Favorite'), 'styles/main.css')
!         fv.res += '&nbsp;<br/>\n'
!         # This seems out of place.
!         #fv.tableOpen('border="0" cellpadding="4" cellspacing="1" width="100%"')
!         #fv.tableRowOpen('class="chanrow"')
!         #fv.tableCell('<img src="images/logo_200x100.png" />', 'align="left"')
!         #fv.tableCell(_('Edit Favorite'), 'class="heading" align="left"')
!         #fv.tableRowClose()
!         #fv.tableClose()
  
          fv.res += '<br><form name="editfavorite" method="get" 
action="favorites.rpy">'
***************
*** 323,340 ****
  
          if fav.channel == 'ANY':
!             fv.res += 'document.editfavorite.chan.options[0].selected=true'
          else:
!             fv.res += 'document.editfavorite.chan.options[%s].selected=true' % 
chan_index
  
          if fav.dow == 'ANY':
!             fv.res += 'document.editfavorite.dow.options[0].selected=true'
          else:
!             fv.res += 'document.editfavorite.dow.options[(1+%s)].selected=true' % 
fav.dow
  
          if fav.mod == 'ANY':
!             fv.res += 'document.editfavorite.mod.options[0].selected=true'
          else:
              mod_index = int(fav.mod)/30 + 1
!             fv.res += 'document.editfavorite.mod.options[%s].selected=true' % 
mod_index
  
          fv.res += '</script>'
--- 330,347 ----
  
          if fav.channel == 'ANY':
!             fv.res += 'document.editfavorite.chan.options[0].selected=true\n'
          else:
!             fv.res += 'document.editfavorite.chan.options[%s].selected=true\n' % 
chan_index
  
          if fav.dow == 'ANY':
!             fv.res += 'document.editfavorite.dow.options[0].selected=true\n'
          else:
!             fv.res += 'document.editfavorite.dow.options[(1+%s)].selected=true\n' % 
fav.dow
  
          if fav.mod == 'ANY':
!             fv.res += 'document.editfavorite.mod.options[0].selected=true\n'
          else:
              mod_index = int(fav.mod)/30 + 1
!             fv.res += 'document.editfavorite.mod.options[%s].selected=true\n' % 
mod_index
  
          fv.res += '</script>'



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to