equal
deleted
inserted
replaced
253 """ |
253 """ |
254 w = self.write |
254 w = self.write |
255 # 1/ variable declaration if any |
255 # 1/ variable declaration if any |
256 if self.jsvars: |
256 if self.jsvars: |
257 from simplejson import dumps |
257 from simplejson import dumps |
258 w(u'<script type="text/javascript">\n') |
258 w(u'<script type="text/javascript"><!--//--><![CDATA[//><!--\n') |
259 for var, value in self.jsvars: |
259 for var, value in self.jsvars: |
260 w(u'%s = %s;\n' % (var, dumps(value))) |
260 w(u'%s = %s;\n' % (var, dumps(value))) |
261 w(u'</script>\n') |
261 w(u'//--><!]]></script>\n') |
262 # 2/ css files |
262 # 2/ css files |
263 for cssfile, media in self.cssfiles: |
263 for cssfile, media in self.cssfiles: |
264 w(u'<link rel="stylesheet" type="text/css" media="%s" href="%s"/>\n' % |
264 w(u'<link rel="stylesheet" type="text/css" media="%s" href="%s"/>\n' % |
265 (media, cssfile)) |
265 (media, cssfile)) |
266 # 3/ ie css if necessary |
266 # 3/ ie css if necessary |