Remove erroneous onload javascript

If a page needs to run javascript on load, it is easy to do so by attaching 
onload handlers or by using corresponing jQuery utilities. There is no need
to mess with templating.
This commit is contained in:
Sunil Mohan Adapa 2014-05-12 23:51:41 +05:30
parent d2a6e2332d
commit 218fc37e8f
2 changed files with 3 additions and 8 deletions

View File

@ -51,13 +51,8 @@
<script type="text/javascript" src="{{ basehref }}/static/theme/js/plinth.js"></script>
{{ main_menu_js|safe }}
{{ sub_menu_js|safe }}
<script type="text/javascript">
<!--
{{ onload|safe }}
// -->
</script>
</head>
<body onload="javascript:onload_handler();">
<body>
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://mozilla.org/firefox">Upgrade to a modern version of Firefox</a> to experience this site.</p><![endif]-->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">

View File

@ -63,8 +63,8 @@ class Message():
def render_template(template='login_nav', **kwargs):
for key in ['sidebar_left', 'sidebar_right', 'main', 'js', 'onload', 'nav',
'css', 'title', 'basehref']:
for key in ['sidebar_left', 'sidebar_right', 'main', 'js', 'nav', 'css',
'title', 'basehref']:
if not key in kwargs:
kwargs[key] = ''