Author: duncan
Date: Wed Dec 27 00:37:36 2006
New Revision: 8819
Modified:
branches/rel-1/freevo/ChangeLog
branches/rel-1/freevo/src/www/htdocs/genre.rpy
branches/rel-1/freevo/src/www/web_types.py
Log:
[ 1622456 ] genre.rpy produces invalid html
Fixes merged from rel-1-6
Added some temporary prints in web_types, while checking other webserver
problems
Modified: branches/rel-1/freevo/ChangeLog
==============================================================================
--- branches/rel-1/freevo/ChangeLog (original)
+++ branches/rel-1/freevo/ChangeLog Wed Dec 27 00:37:36 2006
@@ -49,6 +49,7 @@
* Fixed manual record when month is December (B#1621615)
* Fixed shopping cart for items with two or more subitems (B#1620425)
* Fixed video thumbnails not being shown with subitems (B#1620452)
+ * Fixed genre webserver module generated html (B#1622456)
== Release 1.6.2 (2006-12-22) ==
--------------------------------
Modified: branches/rel-1/freevo/src/www/htdocs/genre.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/genre.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/genre.rpy Wed Dec 27 00:37:36 2006
@@ -100,22 +100,24 @@
stime=''
if mfrguideinput:
- stime='<input name="stime" type="hidden" value="%i">' %
int(mfrguideinput)
+ stime='<input name="stime" type="hidden" value="%i"/>' %
int(mfrguideinput)
keepcat = ''
if category:
keepcat = '&category=%s' % category
bforcell=''
acelltime=mfrnextguide + 60
- aftercell=' <a href="genre.rpy?stime=%i%s"><img
src="images/RightArrow.png" border="0"></img>'\
- +'</a>' % (acelltime, keepcat)
+ aftercell=' <a href="genre.rpy?stime=%i%s">'\
+ +'<img src="images/RightArrow.png" alt="right" border="0"/></a>'\
+ % (acelltime, keepcat)
if mfrprevguide > 0:
- bforcell='<a href="genre.rpy?stime=%i%s"><img
src="images/LeftArrow.png" border="0"></a> '\
- % (mfrprevguide, keepcat)
-
+ bforcell='<a href="genre.rpy?stime=%i%s">'\
+ +'<img src="images/LeftArrow.png" alt="left"
border="0"/></a> '\
+ % (mfrprevguide, keepcat)
+
fv.tableOpen('border="0" cellpadding="4" cellspacing="1" width="100%"')
fv.tableRowOpen('class="chanrow"')
-
fv.tableCell('<form>'+bforcell+_('Show')+' '+_('Category')+': '\
- +self.makecategorybox(allcategories, category)+stime+'<input
type=submit value="'+_('Change')+'">'\
+ fv.tableCell('<form
action="">'+bforcell+_('Show')+' '+_('Category')+': '\
+ +self.makecategorybox(allcategories, category)+stime+'<input
type="submit" value="'+_('Change')+'"/>'\
+aftercell+'</form>', 'class="guidehead"')
fv.tableRowClose()
fv.tableClose()
@@ -164,9 +166,9 @@
fv.tableRowOpen('class="chanrow"')
fv.tableCell(chan.displayname, 'class="channel"')
popid = '%s:%s' % (prog.channel_id, prog.start)
-
+
fv.tableCell(prog.title+' - '+prog.desc,
'class="'+status+'" \
- onclick="guide_click(this, event)" id="%s"
width="80%%" action=""' % popid)
+ 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"')
fv.tableRowClose()
@@ -197,12 +199,12 @@
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 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" </tr>\n"\
u" </tbody>\n"\
u" <tfoot>\n"\
u" <tr>\n"\
Modified: branches/rel-1/freevo/src/www/web_types.py
==============================================================================
--- branches/rel-1/freevo/src/www/web_types.py (original)
+++ branches/rel-1/freevo/src/www/web_types.py Wed Dec 27 00:37:36 2006
@@ -44,6 +44,7 @@
class FreevoPage(page.Page):
def __init__(self, model=None, template=None):
+ print '__init__(self, model=\"%s\", template=\"%s\")' % (model,
template)
if not model:
model = {'foo': 'bar'}
@@ -59,6 +60,7 @@
class FreevoResource(Resource):
def render(self, request):
+ print 'render(self, request=\"%s\")' % (request)
username = request.getUser()
password = request.getPassword()
@@ -74,6 +76,7 @@
def auth_user(self, username, password):
+ print 'auth_user(self, username=\"%s\", password=\"%s\")' % (username,
password)
realpass = config.WWW_USERS.get(username)
if password == realpass:
return TRUE
@@ -84,27 +87,33 @@
class HTMLResource:
def __init__(self):
+ print '__init__(self)'
self.res = ''
def printContentType(self, content_type='text/html'):
+ print 'printContentType(self, content_type=\"%s\")' % (content_type)
self.res += 'Content-type: %s\n\n' % content_type
- def printHeader(self, title='unknown page', style=None, script=None,
selected='Help',prefix=0):
+ def printHeader(self, title='unknown page', style=None, script=None,
selected='Help', prefix=0):
+ print 'printHeader(self, title=\"%s\", style=\"%s\", script=\"%s\",
selected=\"%s\", prefix=\"%s\")' % \
+ (title, style, script, selected, prefix)
strprefix = '../' * prefix
self.res += '<?xml version="1.0" encoding="'+ config.encoding +'"?>\n'
- self.res += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN"\n'
- self.res += '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
+ self.res += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" '
+ self.res +=
'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n'
+ #self.res += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN"\n'
+ #self.res += '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
self.res += '<html>\n\t<head>\n'
self.res += '\t<title>Freevo | '+title+'</title>\n'
self.res += '\t<meta http-equiv="Content-Type" content= "text/html;
charset='+ config.encoding +'"/>\n'
if style != None:
self.res += '\t<link rel="stylesheet" href="styles/main.css"
type="text/css" />\n'
if script != None:
- self.res += '\t<script language="JavaScript"
src="'+script+'"></script>\n'
+ self.res += '\t<script language="JavaScript"
type="text/JavaScript" src="'+script+'"></script>\n'
self.res += '</head>\n'
self.res += '\n\n\n\n<body>\n'
# Header
@@ -140,50 +149,62 @@
def tableOpen(self, opts=''):
+ print 'tableOpen(self, opts=\"%s\")' % (opts)
self.res += "<table "+opts+">\n"
def tableClose(self):
+ print 'tableClose(self)'
self.res += "</table>\n"
def tableHeadOpen(self, opts=''):
+ print 'tableHeadOpen(self, opts=\"%s\")' % (opts)
self.res += " <thead "+opts+">\n"
def tableHeadClose(self, opts=''):
+ print 'tableHeadClose(self, opts=\"%s\")' % (opts)
self.res += " </thead>\n"
def tableBodyOpen(self, opts=''):
+ print 'tableBodyOpen(self, opts=\"%s\")' % (opts)
self.res += " <tbody "+opts+">\n"
def tableBodyClose(self, opts=''):
+ print 'tableBodyClose(self, opts=\"%s\")' % (opts)
self.res += " </tbody>\n"
def tableFootOpen(self, opts=''):
+ print 'tableFootOpen(self, opts=\"%s\")' % (opts)
self.res += " <tfoot "+opts+">\n"
def tableFootClose(self, opts=''):
+ print 'tableFootClose(self, opts=\"%s\")' % (opts)
self.res += " </tfoot>\n"
def tableRowOpen(self, opts=''):
+ print 'tableRowOpen(self, opts=\"%s\")' % (opts)
self.res += " <tr "+opts+">\n"
def tableRowClose(self):
+ print 'tableRowClose(self)'
self.res += " </tr>\n"
def tableCell(self, data='', opts=''):
+ print 'tableCell(self, data=\"%s\", opts=\"%s\")' % (data, opts)
self.res += " <td "+opts+">"+data+"</td>\n"
def formValue(self, form=None, key=None):
+ print 'formValue(self, form=\"%s\", key=\"%s\")' % (form, key)
if not form or not key:
return None
@@ -196,10 +217,12 @@
def printFooter(self):
+ print 'printFooter(self)'
self.res += '</body>\n</html>\n'
def printSearchForm(self):
+ print 'printSearchForm(self)'
self.res += """
<form id="SearchForm" action="search.rpy" method="get">
<div class="searchform"><b>"""+_('Search')+""":</b><input type="text"
name="find" size="20" /></div>
@@ -207,6 +230,7 @@
"""
def printAdvancedSearchForm(self):
+ print 'printAdvancedSearchForm(self)'
self.res += """
<form id="SearchForm" action="search.rpy" method="get">
<div class="searchform"><b>"""+_('Search')+""":</b><input type="text"
name="find" size="20" />
@@ -216,23 +240,26 @@
</form>
"""
- def printMessages( self, messages ):
+ def printMessages(self, messages):
+ print 'printMessages(self, messages=\"%s\")' % (messages)
self.res += "<h4>"+_("Messages")+":</h4>\n"
self.res += "<ul>\n"
for m in messages:
self.res += " <li>%s</li>\n" % m
self.res += "</ul>\n"
- def printMessagesFinish( self, messages ):
+ def printMessagesFinish(self, messages):
"""
Print messages and add the search form, links and footer.
"""
+ print 'printMessagesFinish(self, messages=\"%s\")' % (messages)
self.printMessages( messages )
self.printSearchForm()
self.printLinks()
self.printFooter()
def printLinks(self, prefix=0):
+ print 'printLinks(self, prefix=\"%s\")' % (prefix)
#
#try:
# if config.ICECAST_WWW_PAGE:
@@ -242,6 +269,7 @@
return
def printBreadcrumb(self, media, mediadirs, dir):
+ print 'printBreadcrumb(self, media=\"%s\", mediadirs=\"%s\", dir=%r)'
% (media, mediadirs, dir)
breadcrumb='<a href="library.rpy">Home: </a><a
href="library.rpy?media='+media+'&dir=">'+media+'</a>'
_url = ""
url = dir.split("/")
@@ -254,6 +282,7 @@
return breadcrumb
def printPassword(self, password):
+ print 'printPassword(self, password=\"%s\")' % (password)
self.res += """<script language="JavaScript"> <!--
var password;
@@ -270,6 +299,7 @@
</script>"""
def printImagePopup(self):
+ print 'printImagePopup(self)'
self.res += """<script language="JavaScript" type="text/javascript"
style="display:none;">
function openfoto(loc,width,height){
var
params="toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,top=0,left=0,width="+width+",height="+height;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog