Update of /cvsroot/freevo/freevo/src/www/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv24314
Modified Files: guide.rpy Log Message: Another patch from Mike, this one adds the option to select the time you would like to view in the guide. Index: guide.rpy =================================================================== RCS file: /cvsroot/freevo/freevo/src/www/htdocs/guide.rpy,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** guide.rpy 11 Aug 2003 19:58:39 -0000 1.8 --- guide.rpy 18 Aug 2003 01:20:10 -0000 1.9 *************** *** 12,15 **** --- 12,19 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.9 2003/08/18 01:20:10 rshortt + # Another patch from Mike, this one adds the option to select the time you + # would like to view in the guide. + # # Revision 1.8 2003/08/11 19:58:39 rshortt # Patch from Mike Ruelle to add a row with the time in it every so many rows. *************** *** 75,79 **** import web ! import config import xmltv --- 79,83 ---- import web ! import tv_util import config import xmltv *************** *** 90,93 **** --- 94,127 ---- class GuideResource(FreevoResource): + def maketimejumpboxday(self): + retval='<select name="day">' + "\n" + myt = time.time() + myt_t=time.localtime(myt) + 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" + myt+=60*60*24 + retval+="</select>\n" + return retval + + + def maketimejumpboxoffset(self): + retval='<select name="offset">' + "\n" + myt = time.time() + 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" + hrinc+=web.INTERVAL + retval+="</select>\n" + return retval + def _render(self, request): fv = HTMLResource() *************** *** 99,104 **** --- 133,142 ---- mfrguidestart = time.time() mfrguideinput = fv.formValue(form, 'stime') + mfrguideinputday = fv.formValue(form, 'day') + mfrguideinputoff = fv.formValue(form, 'offset') if mfrguideinput: mfrguidestart = int(mfrguideinput) + elif mfrguideinputday and mfrguideinputoff: + mfrguidestart = float(mfrguideinputday) + float(mfrguideinputoff) now = int(mfrguidestart / INTERVAL) * INTERVAL now2 = int(time.time() / INTERVAL) * INTERVAL *************** *** 123,128 **** desc = '' ! fv.tableOpen('border="0" cellpadding="4" cellspacing="1"') showheader = 0 --- 161,171 ---- desc = '' ! 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.tableRowClose() ! fv.tableClose() + fv.tableOpen('border="0" cellpadding="4" cellspacing="1"') showheader = 0 *************** *** 131,136 **** if showheader % 15 == 0: fv.tableRowOpen('class="chanrow"') - fv.tableCell(time.strftime('%b %d'), 'class="guidehead"') headerstart = int(mfrguidestart / INTERVAL) * INTERVAL for i in range(n_cols): if i == n_cols-1 or i == 0: --- 174,179 ---- if showheader % 15 == 0: fv.tableRowOpen('class="chanrow"') headerstart = int(mfrguidestart / INTERVAL) * INTERVAL + fv.tableCell(time.strftime('%b %d', time.localtime(headerstart)), 'class="guidehead"') for i in range(n_cols): if i == n_cols-1 or i == 0: ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog