Thanks, committed.
Michael Ruelle wrote:
Make the hours box and day box default to the time the guide page starts at.
------------------------------------------------------------------------
Index: guide.rpy
===================================================================
RCS file: /cvsroot/freevo/freevo/src/www/htdocs/guide.rpy,v
retrieving revision 1.9
diff -u -r1.9 guide.rpy
--- guide.rpy 18 Aug 2003 01:20:10 -0000 1.9
+++ guide.rpy 19 Aug 2003 23:13:17 -0000
@@ -93,32 +93,40 @@
class GuideResource(FreevoResource):
- def maketimejumpboxday(self):
+ def maketimejumpboxday(self,gstart):
retval='<select name="day">' + "\n"
myt = time.time()
myt_t=time.localtime(myt)
+ gstart_t=time.localtime(gstart)
myt=time.mktime((myt_t[0], myt_t[1], myt_t[2], 0, 0, 5, myt_t[6], myt_t[7], -1))
listh = tv_util.when_listings_expire()
if listh == 0:
return retval + "</select>\n"
listd = int((listh/24)+2)
for i in range(1,listd):
- retval+='<option value="' + str(myt) + '">' + time.strftime('%a %b %d', time.localtime(myt)) + "\n"
+ retval+='<option value="' + str(myt) + '"'
+ myt_t = time.localtime(myt)
+ if (myt_t[0]==gstart_t[0] and myt_t[1]==gstart_t[1] and myt_t[2]==gstart_t[2] ):
+ retval += ' SELECTED '
+ retval+='>' + time.strftime('%a %b %d', myt_t) + "\n"
myt+=60*60*24
retval+="</select>\n"
return retval
- def maketimejumpboxoffset(self):
+ def maketimejumpboxoffset(self, gstart):
retval='<select name="offset">' + "\n"
- myt = time.time()
+ myt = gstart
myt_t=time.localtime(myt)
hrstart=time.mktime((myt_t[0], myt_t[1], myt_t[2], 0, 0, 5, myt_t[6], myt_t[7], -1))
hrinc=hrstart
hrstop=hrstart + (60*60*24)
while (hrinc < hrstop):
myoff=hrinc-hrstart
- retval+='<option value="' + str(myoff) + '">' + time.strftime('%H:%M', time.localtime(hrinc)) + "\n"
+ retval+='<option value="' + str(myoff) + '"'
+ if (abs(gstart - hrinc) < 60):
+ retval += ' SELECTED '
+ retval += '>' + time.strftime('%H:%M', time.localtime(hrinc)) + "\n"
hrinc+=web.INTERVAL
retval+="</select>\n"
return retval
@@ -162,7 +170,7 @@
fv.tableOpen('border="0" cellpadding="4" cellspacing="1" width="100%"')
fv.tableRowOpen('class="chanrow"')
- fv.tableCell('<form>Jump to: ' + self.maketimejumpboxday() + self.maketimejumpboxoffset() + '<input type=submit value="Change"></form>', 'class="guidehead"')
+ fv.tableCell('<form>Jump to: ' + self.maketimejumpboxday(now) + self.maketimejumpboxoffset(now) + '<input type=submit value="Change"></form>', 'class="guidehead"')
fv.tableRowClose()
fv.tableClose()
------------------------------------------------------- This SF.net email is sponsored by Dice.com. Did you know that Dice has over 25,000 tech jobs available today? From careers in IT to Engineering to Tech Sales, Dice has tech jobs from the best hiring companies. http://www.dice.com/index.epl?rel_code=104 _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
